Developing plugins for RViz2
An RViz2
plugin is a modular extension for RViz2
, the visualization tool in ROS 2, designed to display and interact with robotic data. Plugins allow users to add custom functionality, such as new display types for specific message formats, custom visualization panels, or tools for user interaction. They are implemented as shared libraries using the pluginlib
framework, enabling dynamic loading without modifying RViz2
's core. By creating RViz2
plugins, developers can tailor the visualization experience to specific applications, enhancing debugging, monitoring, and control in robotic systems. In this example, we will create a plugin to display a circumference with a given center coordinates and a radius. The final shape of the circumference shown on RViz2
is displayed in Figure 16.3.

Figure 16.3: Circumference published on RViz2 using a custom plugin
Writing the source code
To develop the plugin, let’s start by creating the ROS...