A highly customizable RViz2 panel plugin that provides a generic slider-based UI for publishing numeric values to a ROS 2 topic.
The topic name, message type, value range, and label are fully configurable via a YAML file.
- Slider to control a numeric value in a custom range.
- Pause button to set the value to 0.
- Play button to resume the last value before pause.
- Supports publishing:
std_msgs/msg/Int16
std_msgs/msg/Int32
- Custom topic name, value range, and label text via YAML config.
- Clone the package into your ROS 2 workspace:
cd ~/ros2_ws/src
git clone https://github.com/filippo-bosi/rviz2_easy_slider.git
- Build the package:
cd ~/ros2_ws
colcon build --packages-select rviz2_easy_slider
source install/setup.bash
- Launch RViz2 and add the panel:
Panels → Add New Panel → rviz_easy_slider::EasySliderPanel
The plugin reads its configuration from:
rviz2_easy_slider/config/custom_topic.yaml
name: my_topic
label: "Value"
type: std_msgs/msg/Int32
int_value:
min: 0
max: 100
default: 50
name
: (string) Topic name to publish to.label
: (string) Label to display above the slider.type
: (string) Message type (std_msgs/msg/Int16
orstd_msgs/msg/Int32
).int_value.min
: (int) Minimum value for the slider.int_value.max
: (int) Maximum value for the slider.int_value.default
: (int) Initial/default value when the panel starts.
The panel publishes messages to the configured topic, for example:
/my_topic [std_msgs/msg/Int32]
The message contains a single data
field representing the slider value.
- Only
Int16
andInt32
message types are supported at the moment. - If the YAML is missing or malformed, fallback defaults are used.
MIT License