cloisim_rviz_plugin is a ROS 2 RViz plugin package for CLOiSim operator panels.
Current package scope:
- one RViz panel plugin:
cloisim_rviz_plugin::JogControlPanel - Qt5 Widgets-based panel UI with numeric sliders and direct viewport drag control
- ROS 2 topic integration through the RViz node abstraction
- Interactive Markers for per-joint drag handles in the RViz 3D viewport
- plugin registration through
pluginlib
The jog panel is an operator-facing joint command panel.
It currently:
- subscribes to
/robot_description - subscribes to
/joint_states - publishes to
/joint_command
Practical behavior:
- reads URDF joint limits from
robot_description - shows current joint positions from
joint_states - lets the operator type or slide target joint values
- publishes one-shot
control_msgs/msg/JointJogcommands - can generate a simple time-based move sequence from current state to target state
- places interactive drag handles in the RViz 3D viewport for each joint (revolute/continuous → yellow ring, prismatic → cyan arrow)
Key files:
include/panels/jog_control_panel.hpp— panel declarationsrc/panels/jog_control_panel.cpp— panel implementationplugin_description.xml— RViz/pluginlib registrationCMakeLists.txt— shared library build, Qt MOC wiring, install/export rules
Customization files added for this package:
.github/instructions/cpp.instructions.md.github/instructions/rviz-panel.instructions.md.github/skills/add-rviz-panel/SKILL.md.github/skills/narrow-qt-rviz-fix/SKILL.md
This package depends on:
- ROS 2
rviz_commonpluginlibrclcppQt5::Widgetssensor_msgscontrol_msgsstd_msgsTinyXML2interactive_markersvisualization_msgsgeometry_msgs
Language/build constraints from the package today:
- C++17
-Wall -Wextra -Wpedantic- shared-library plugin build, not a standalone app
Build from the ROS 2 workspace that contains the package:
cd /home/yg/Workspace/cloi_ws
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build --packages-select cloisim_rviz_plugin
source install/setup.bashThe old README command used --sym. That is wrong here.
After building:
cd /home/yg/Workspace/cloi_ws
source /opt/ros/$ROS_DISTRO/setup.bash
source install/setup.bash
rviz2- Open
rviz2 - Open the panels menu
- Add the
JogControlPanelplugin fromcloisim_rviz_plugin
Once the panel is running and robot_description is received, drag handles appear automatically on each joint in the 3D viewport.
| Joint type | Marker | Interaction |
|---|---|---|
| revolute / continuous | Yellow flat cylinder (ring) | Rotate around joint axis |
| prismatic | Cyan tall cylinder | Slide along joint axis |
To enable the markers in RViz:
- Add Display → InteractiveMarkers
- Set Update Topic to
/jog_control_markers/update
Dragging a handle updates the panel sliders and command values in real time and publishes a JointJog command. Joint limits from the URDF are respected.
Screencast.from.2026-06-25.20-44-42.mp4
- If a panel header uses
Q_OBJECT, it must stay in the MOC header list inCMakeLists.txt. - New panels must be registered in
plugin_description.xml. - RViz ROS publishers/subscriptions should be created in
onInitialize(). - Be careful with Qt ownership and shutdown paths; avoid unnecessary manual deletion of Qt-owned child widgets.
- plugin builds but does not appear in RViz because
plugin_description.xmlis incomplete - panel class uses
Q_OBJECTbut the header is missing from MOC input - exported class name does not match the registered plugin type
- topic wiring is stale after panel field changes
- panel shutdown misbehaves because of thread/lifetime mistakes
