../_images/tiagopro-icon.png ../_images/kangaroo-icon.png ../_images/tiago-icon.png ../_images/ari-icon.png ../_images/talos-icon.png ../_images/mobile-bases-icon.png

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.

  1. Start rviz by running the following command: ros2 run rviz2 rviz2

  2. In the Add button, select: By display type ‣ Robot Model

  3. In the Robot Model display, select: Description topic ‣ robot_description

  4. You can then add the sensor that you want.

The image below shows an example with the robot’s RGB-D cameras.

../_images/tiago-Camera_RGB-D.png

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:

  1. Run rqt_gui:

ros2 run rqt_gui rqt_gui
  1. In the top menu, select: Plugins ‣ Visualization ‣ Image View

  2. 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/*.

../_images/camera_topic.png

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:

  1. Run plotjuggler:

ros2 run plotjuggler plotjuggler
  1. In the top menu, select: Streaming ‣ Start

  2. Select the topic that you want to visualize. In the image below we are visualizing the /joint_states.

../_images/plotjuggler.png

Visualization of the joint states in Plot Juggler.#