To use this package you need a Care-O-bot light modul connected via USB.
cob_light.pyThe cob_light.py node takes in std_msgs/ColorRGBA messages and send this directly to the hardware. If no hardware is present, the node runs in a simulated mode only publishing visualization markers.
Subscribed Topicscommand (std_msgs/ColorRGBA)
- Receives color commands in RGBA format.
Published Topicsmarker (visualization_msgs/Marker)
- Publishes the current state of the light.
Parameters~devicestring (string, default: Required)
- Device identifier for hand, e.g. /dev/ttyUSB3
- Baudrate of serial interface, e.g. 230400
The package can be used via a launch file which loads all parameters and starts the light node. For starting the light use
roslaunch cob_bringup light.launch
For including the light in your overall launch file use
<include file="$(find cob_bringup)/components/light.launch" />
A sample parameter file could look like this
devicestring: /dev/ttyUSB3 baudrate: 230400
For testing the light you can start a test_script which changes the LEDs to different colors.
rosrun cob_light test.py