lightring_msg.leds[
0
].blue =
0
;
lightring_msg.leds[
0
].green =
0
;
// LED 1
lightring_msg.leds[
1
].red =
0
;
lightring_msg.leds[
1
].blue =
255
;
lightring_msg.leds[
1
].green =
0
;
// LED 2
lightring_msg.leds[
2
].red =
0
;
lightring_msg.leds[
2
].blue =
0
;
lightring_msg.leds[
2
].green =
255
;
// LED 3
lightring_msg.leds[
3
].red =
255
;
lightring_msg.leds[
3
].blue =
255
;
lightring_msg.leds[
3
].green =
0
;
// LED 4
lightring_msg.leds[
4
].red =
255
;
lightring_msg.leds[
4
].blue =
0
;
lightring_msg.leds[
4
].green =
255
;
// LED 5
lightring_msg.leds[
5
].red =
0
;
lightring_msg.leds[
5
].blue =
255
;
lightring_msg.leds[
5
].green =
255
;
}
// Lights are currently on
else
{
// Disable system override. The system will take back control of the lightring.
lightring_msg.override_system =
false
;
}
// Publish the message
lightring_publisher_->publish(lightring_msg);
// Toggle the lights on status
lights_on_ = !lights_on_;
}
// 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_;
Содержание TurtleBot 4 Lite
Страница 50: ...Running the Light Ring test...
Страница 61: ...Adding Displays in Rviz2...
Страница 63: ...Camera image displayed in Rviz2...
Страница 82: ...TurtleBot 4 Lite with a NED2 arm...
Страница 147: ...Color camera diagnostics...