Sign In
Upload
Download
Table of Contents
Contents
Add to my manuals
Delete from my manuals
Share
URL of this page:
HTML Link:
Bookmark this page
Add
Manual will be automatically added to "My Manuals"
Print this page
×
Bookmark added
×
Added to my manuals
Manuals
Brands
CLEARPATH Manuals
Robotics
Turtlebot4
User manual
Table Of Contents - CLEARPATH Turtlebot4 User Manual
Hide thumbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
page
of
153
Go
/
153
Contents
Table of Contents
Bookmarks
Table of Contents
Advertisement
class TurtleBot4FirstNode : public rclcpp::Node
{
public:
TurtleBot4FirstNode()
: Node("turtlebot4_first_cpp_node")
{
// Subscribe to the /interface_buttons topic
interface_buttons_subscriber
_ =
this->create_subscription<irobot_create_msgs::msg::InterfaceButtons>(
"/interface_buttons
",
rclcpp::SensorDataQoS()
,
std::bind(&TurtleBot4FirstNode::interface_buttons_callback, this, std::placeholders::_1))
;
// Create a publisher for the /cmd_lightring topic
lightring_publisher_ = this->create_publisher<irobot_create_msgs::msg::LightringLeds>(
"/cmd_lightring
",
rclcpp::SensorDataQoS());
}
private:
// Interface buttons subscription callback
void interface_buttons_callback(
const irobot_create_msgs::msg::InterfaceButtons::SharedPtr create3_buttons_msg)
{
// Button 1 is pressed
if (create3_buttons_msg->button_1.is_pressed) {
RCLCPP_INFO(this->get_logger(),
}
}
// Interface Button Subscriber
rclcpp::Subscription<irobot_create_msgs::msg::InterfaceButtons>::SharedPtr
interface_buttons_subscriber
_;
// Lightring Publisher
rclcpp::Publisher<irobot_create_msgs::msg::LightringLeds>::SharedPtr lightring_publisher
_;
};
Note
The Lightring publisher uses the
Next, lets create a function that will populate a
Add this code below your
// Perform this function when Button 1 is pressed.
"Button 1
LightringLeds
interface_buttons_callback
Pressed!");
message type
.
LightringLeds
message, and publish it.
function:
Previous
Page
Next
Page
1
...
103
104
105
106
Advertisement
Chapters
Public
104
Subscribe to the Create® 3 Interface Buttons
115
Table of Contents
Need help?
Do you have a question about the Turtlebot4 and is the answer not in the manual?
Ask a question
Questions and answers
Subscribe to Our Youtube Channel
Related Manuals for CLEARPATH Turtlebot4
Robotics CLEARPATH DINGO User Manual
Indoor platform (20 pages)
Robotics CLEARPATH Turtlebot 2 User Manual
Personal robot (25 pages)
Robotics CLEARPATH HUSKY User Manual
(24 pages)
Robotics CLEARPATH TURTLEBOT 2 User Manual
(30 pages)
Robotics CLEARPATH HUSKY A200 User Manual
Unmanned ground vehicle (25 pages)
Robotics CLEARPATH ROBOTICS KINGFISHER USV User Manual
Unmanned surface vessel (9 pages)
Robotics CLEARPATH BOXER User Manual
Indoor mobile robot (21 pages)
Robotics CLEARPATH OTTO 600 Operation And Maintenance Manual
(51 pages)
Related Products for CLEARPATH Turtlebot4
CLEARPATH BOXER
CLEARPATH DINGO
CLEARPATH HUSKY
CLEARPATH HUSKY A200
CLEARPATH OTTO 600
CLEARPATH ROBOTICS KINGFISHER USV
CLEARPATH Turtlebot 2
This manual is also suitable for:
Turtlebot 4 lite
Table of Contents
Print
Rename the bookmark
Delete bookmark?
Delete from my manuals?
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL
Need help?
Do you have a question about the Turtlebot4 and is the answer not in the manual?
Questions and answers