RQt Image Overlay - Drawing topic overlays onto an image

RQt Image Overlay is a new RQt plugin added to ROS2 Rolling in the latest sync, that lets you easily draw information from topics onto a camera image and view them in RQt :partying_face:

GIFs are worth a thousand words!, so:

preview

In case you didn’t quite get what’s going on :woman_shrugging:, what you see is three layer plugins that are listening to three user-defined msg topics being toggled on and off.

You can effortlessly write your own plugins for RQt Image Overlay to display your custom msg type. All you have to implement is the method that does the drawing, given the msg to draw and the QImage to draw it onto. For a tutorial, see Creating a Layer.


For a bit of context, a common way of achieving something similar was to write a node that subscribes to the topics you want to visualize and the image, draw the topics, and republish the resulting image. This method had several disadvantages:

  • Bandwidth being used to republish images
  • Inability to toggle layers on/off
  • Had to write code to subscribe to the topics and image
  • Had to write code tp publish the output image
  • Can’t easily reuse the code to draw a certain msg type between projects
  • Have to recompile to add/remove layers, can’t do this during runtime

Issues and Pull Requests are welcome!

13 Likes