Visualizing eye leds in RViz
Opening Eye LEDs Panel in RViz
Note
Instructions here assume you have installed and sourced the packages for this project.
In a new terminal, open rviz2:
rviz2
From the menu bar, select Panels > Add New Panel Select Eye LEDs Panel, under naosoccer_rviz_plugins. You should see the plugin show up.
Tip
If you don’t see the plugin show up in the list, you probably forgot to run . install/local_setup.sh in your workspace after building the packages.
Visualizing LED Commands
Important
The original rqt_publisher has a bug that doesn’t allow publishing arrays. To get around this, we build a patched version of rqt_publisher. In your workspace directory, run:
git clone -b foxy-devel https://github.com/ijnek/rqt_publisher.git src/rqt_publisher
colcon build
source install/local_setup.bash
There is a pending PR for this patch into the main repository.
In a new terminal, open rqt’s publisher plugin:
rqt -s rqt_publisher.publisher.Publisher
From topic, select /effectors/left_eye_leds (or /effectors/right_eye_leds) and click the + button to add a publisher.
Modify the r, g, b values between 0.0 and 1.0, for each LED. You should see the LEDs change color in rviz.
See also
nao_command_msgs/msg/LeftEyeLeds and nao_command_msgs/msg/RightEyeLeds for more details, such as the led locations.