ROS 2 - Data display with Rviz2

RVIZ is a ROS graphical interface that allows you to visualize a lot of information, using plugins for many kinds of available topics. RVIZ 2 is simply a port of RVIZ into ROS 2.

The zed_display_rviz2 package provides three Python launch scripts, display_zed.launch.py, display_zedm.launch.py, display_zed2.launch.py, and display_zed2i.launch.py. They run three preconfigured RVIZ 2 sessions for the ZED, ZED-M, ZED2, and ZED2i cameras respectively. The three sessions load the default RVIZ 2 plugins preconfigured to show the most used data from the ZED ROS 2 infrastructure.

To create your own RVIZ 2 configuration, you can combine the plugins described below.

Global options #

To be able to visualize the information published by the ZED camera, it is necessary to correctly configure the Global Options:

Key parameters:

  • Fixed frame: Indicates the name of the frame used as a reference for all the other frames. You can select every frame available in the combo box. mao or odom are the best choices.
  • Frame rate: The maximum frequency used to update the 3D view. 30 or 60 FPS are good values. Available computational power should guide your decision.

Grid #

This plugin allows you to visualize a grid normally associated with the floor plane.

Key parameters:

  • Reference frame: The frame used as a reference for the grid coordinates (normally: <fixed_frame>)
  • Plane cell count: The size of the grid in cells
  • Normal cell count: The number of cells in the direction normal to the grid plane (normally: 0)
  • Cell size: Dimensions in meters of each grid cell
  • Plane: The two axes that identify the grid plane

Robot model #

This plugin allows you to visualize the Robot Model according to its description from the URDF model.

Key parameters:

  • Visual enabled: Enable/disable the 3D visualization of the model
  • Description Source: You can choose between File and Topic. At the moment of writing this guide the Topic option is not working as expected, so File is the right option
  • Description File: the URDF file that contains the Robot Description zed.urdf or zedm.urdf.

By expanding the Links voice, you can see the whole model tree, with all the joints and the links available and the relative position and orientation in the space relative to the fixed frame.

TF #

This plugin allows you to visualize the position and orientation of all frames that compose the TF Hierarchy.

Key parameters:

  • Show names: Enable/disable the 3D visualization of link names
  • Show axes: Enable/disable the 3D visualization of the axes of the frames
  • Show arrows: Enable/disable the 3D visualization of the arrows that connect the various frames
  • Marker Scale: Used to rescale all the TF objects to let them be more visible and less chaotic
  • Update interval: The update time in seconds. Leave at 0 to see each update

Critical to using this plugin is the ability to enable/disable visualizing individual frames. This allows you to concentrate only on the parts that are most important for your current task.

Video #

Learn how to configure RVIZ for visualizing Video information by following the Video with RVIZ 2 tutorial.

Depth Sensing #

Learn how to configure RVIZ for visualizing Depth information by following the Depth with RVIZ 2 tutorial.

Positional Tracking #

Learn how to configure RVIZ for visualizing Position information by following the Position with RVIZ tutorial.

Object Detection #

Learn how to configure RVIZ for visualizing Object Detection information using the custom Stereolabs plugin by following the Object Detection with RVIZ tutorial.

Body Tracking #

Learn how to configure RVIZ for visualizing Body Tracking information using the custom Stereolabs plugin by following the Body Tracking with RVIZ tutorial.

Plane Detection #

Learn how to configure RVIZ for visualizing Plane Detection information by following the Object Detection with RVIZ tutorial.