Accessing your robot’s sensors#
In this tutorial we’ll learn how to access to the different sensors of your robot.
Most of the sensor readings of PAL’s robots can be visualized in rviz
.
Though you can also use image_view
or rqt_gui
. Let’s have a look at both
procedures.
rviz visualization#
In order to start the rviz
GUI with a predefined configuration you need the
<robot>_robot
package corresponding to your robot. It is available from your PAL developer docker image (see
Developing with the SDK Docker image and ROS if you have not yet configured your developer environment).
First of all, make sure you are connected to the robot, by following the ROS Domain ID section.
Start rviz by running the following command:
ros2 run rviz2 rviz2
In the Add button, select:
In the Robot Model display, select:
You can then add the sensor that you want.
The image below shows an example with the robot’s RGB-D cameras.
rqt_gui visualisation#
You can also use rqt_gui
, a tool that allows incorporate multiple plugins
and thus, have a better understanding of the system. One such example is
rqt_human_radar
(see ros4hri_tools), a plugin for rqt_gui
, where
additional visualization tools for ROS4HRI can be combined.
To use rqt_gui
, follow the next steps:
Run
rqt_gui
:
ros2 run rqt_gui rqt_gui
In the top menu, select:
Select the topic of the camera you want to visualize. In the image below we are visualizing the [🤔 ROS2?] /head_front_camera/color/image_raw/*.
As a second, simpler option, if you just want to view the image, you can use this shortcut:
ros2 run rqt_image_view rqt_image_view
Afterwards, you just need to select the camera topic you want to view.
Accessing the microphones#
Please refer to microphone to learn how to access the audio data.
Plotting your data with Plot Juggler#
A useful tool for plotting and analysing your data is Plot Juggler.
If you don’t have Plot Juggler installed already, you can install it using apt
:
sudo apt install ros-humble-plotjuggler-ros
In order to use it follow the next steps:
Run
plotjuggler
:
ros2 run plotjuggler plotjuggler
In the top menu, select:
Select the topic that you want to visualize. In the image below we are visualizing the /joint_states.