# 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
self
.lightring_publisher.publish(lightring_msg)
# Toggle the lights on status
self
.lights_on_ =
not
self
.lights_on_
def
main
(args=
None
):
rclpy.init(args=args)
node = TurtleBot4FirstNode()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()
if
__name__ ==
'__main__'
:
main()
Summary of Contents for TurtleBot 4 Lite
Page 50: ...Running the Light Ring test...
Page 61: ...Adding Displays in Rviz2...
Page 63: ...Camera image displayed in Rviz2...
Page 82: ...TurtleBot 4 Lite with a NED2 arm...
Page 147: ...Color camera diagnostics...