Table Of Contents - CLEARPATH Turtlebot4 User Manual

Table of Contents

Advertisement

{
public:
: Node("turtlebot4_first_cpp_node")
{
this->create_subscription<irobot_create_msgs::msg::InterfaceButtons>(
// Create a publisher for the /cmd_lightring topic
lightring_publisher_ = this->create_publisher<irobot_create_msgs::msg::LightringLeds>(
rclcpp::SensorDataQoS());
}
private:
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(),
}
}
};
Note
Next, lets create a function that will populate a
// Perform this function when Button 1 is pressed.
LightringLeds
message, and publish it.
function:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Turtlebot4 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Turtlebot 4 lite

Table of Contents