Skip to content

filippo-bosi/rviz2_easy_slider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RViz2 Easy Slider Panel Plugin

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.

Features

  • 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.

Installation

  1. Clone the package into your ROS 2 workspace:
cd ~/ros2_ws/src
git clone https://github.com/filippo-bosi/rviz2_easy_slider.git
  1. Build the package:
cd ~/ros2_ws
colcon build --packages-select rviz2_easy_slider
source install/setup.bash
  1. Launch RViz2 and add the panel:

Panels → Add New Panel → rviz_easy_slider::EasySliderPanel

Configuration (YAML)

The plugin reads its configuration from:

rviz2_easy_slider/config/custom_topic.yaml

Example:

name: my_topic
label: "Value"
type: std_msgs/msg/Int32
int_value:
  min: 0
  max: 100
  default: 50

Parameters:

  • name: (string) Topic name to publish to.
  • label: (string) Label to display above the slider.
  • type: (string) Message type (std_msgs/msg/Int16 or std_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.

Publishing Behavior

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.

Notes

  • Only Int16 and Int32 message types are supported at the moment.
  • If the YAML is missing or malformed, fallback defaults are used.

License

MIT License

About

RViz2 panel plugin for publishing integer values to a custom topic using a slider interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published