Writing an RViz plugin for teleoperation
In this section, we will see how to create an RViz plugin from scratch. The objective of this plugin is to teleoperate the robot from RViz. Normally, we use separate teleoperation nodes for controlling the robot, but using this plugin, we can mention the teleop
topic and the linear and angular velocity, as shown in the following screenshot:
In the following section, we discuss the detailed procedure of building this plugin.
The methodology of building a RViz plugin
Before starting to build the teleoperation plugin, we should understand how to write a RViz plugin in general. The standard method to build a ROS plugin is applicable for this plugin too. The difference is that the RViz plugin is GUI-based. RViz is written using a GUI framework called Qt, so we need to create a GUI in Qt and, using Qt APIs, we have to get the GUI values and send them to the ROS system.
The following...