Skip to content

Creating Custom RViz Configs

Ryan Liao edited this page Feb 11, 2024 · 2 revisions

RViz offers a platform for visualizing diverse data sets from your robot. While we have predefined configurations for essential robot data such as laser scans and robot visuals, what if you want to incorporate additional information? This guide is designed to walk you through the process of adding new data visualizations and saving your configurations for reuse in RViz. We will demonstrate this by integrating imagery from a depth camera as an example.

Adding Data

The first step to know the type of data that you want to add (i.e. Laser Scan, Point Cloud, Image). This can usually be found in the documentation, or by running ros2 topic info [topic name].

To add new data, first click the add button on the bottom left corner, then choose the data type that you wish to add (in this case image). You should see the data type show up on the right panel.

Screenshot from 2024-02-11 15-38-35

Now that there is a new image visualizer, we have to specify which topic the visualizer will visualize. First click the arrow icon on the left, then click the empty space to the right of topic. A drop down menu should show you the available topics.

2

Now, you should see the image displayed in the bottom left corner of the application! Note that for certain sensors, you may have to change certain configurations for the visualization to work. For example, for the Velodyne LiDAR, make sure PointCloud2 > Topic > Reliability is set to Best Effort.

Screenshot from 2024-02-11 15-49-00

Saving Config

To save your current visualization configuration, simply click ctrl + shift + s, then save your configuration as a file somewhere. To load the configuration, either click ctrl + o, or change the RViz config path in the launch file. Make sure to not commit the files and changes if you are using it personally!