Rviz_2d_plot_plugin: Live 2D Plotting Inside RViz 2

Hi everyone,

I’m happy to share an open-source RViz 2 plugin I have been working on:

rviz_2d_plot_plugin

The plugin provides live 2D plotting directly inside RViz 2 as a screen-space overlay. The goal is to make it easier to monitor ROS 2 topic data, controller signals, odometry-related values, diagnostics, and other runtime signals without leaving the RViz environment.

Some of the current features include:

  • Runtime discovery of plottable ROS 2 topic fields
  • Time-series plotting
  • XY plotting
  • Multi-series plotting from different topics
  • Reference lines, limits, setpoints, and tolerance bands
  • Axis control, auto-scaling, grid, legend, and styling options
  • QoS configuration
  • Pause, clear, and history preservation

The plugin is currently supported and tested on ROS 2 Humble. Support for additional ROS 2 distributions is planned and will be released soon.

The project is released under the MIT license.

I would be happy to receive feedback from the ROS community, especially regarding:

  • API/design improvements
  • Compatibility with other ROS 2 distributions
  • Useful plotting features for robotics debugging workflows
  • Packaging and release suggestions

Repository:

Thanks, and I hope this can be useful for others working with RViz 2 and ROS 2 system visualization.

5 Likes

This is absolutely awesome! I’ll send a PR with Jazzy/Kilted compatibility shortly. Do you plan to release this package on the buildfarm?

1 Like

PR sent, adding compatibility up to Rolling!

2 Likes

Thanks @peci1 for your contribution, I already merged it.

1 Like

Looks quite nice and I learned something new about conditions in the package.xml depends :tada:

It does, however, reinvent the wheel a couple of times.
You could’ve used

to extract the numerical values from messages without having to do all the introspection work yourself again (which also requires testing and maintenance work, as this part of ROS tends to change occasionally).

and

allows overlaying any QML or QtWidget UI on top of the RViz 3D scene, including interactive graphs.
This would allow you not only to visualize the data you want to monitor, but also to interact with your robot without leaving RViz.

One reason I’m saying this is that by reinventing the wheel, you risk making the same mistakes that others have already solved.
For example, your plot overlay will render in any camera display added, and it’s not possible to hide it there. You can only disable it to hide it everywhere, but not just for the camera display.
Had the same issue in the hector_rviz_overlay and only recently found a solution to fix that.

1 Like