The gazebo_ros_actor_plugin package contains a plugin for Gazebo Harmonic and ROS2 Jazzy that enables dynamic control of actors in simulation. The plugin allows you to control actors using either pose array or velocity commands.
The ROS2 port of this plugin has been generously sponsored by Eric Schöneberg
Before using this package, make sure that you meet the following requirements:
- ROS 2 Jazzy (or later)
- Gazebo Harmonic (gz-sim8)
- ros_gz packages (
ros_gz_sim,ros_gz_bridge)
# Install ROS2 Jazzy (Ubuntu 24.04)
# Follow official instructions at: https://docs.ros.org/en/jazzy/Installation.html
# Install Gazebo and Ros Gazebo bridge packages
sudo apt-get install ros-jazzy-ros-gz ros-jazzy-ros-gz-bridge ros-jazzy-ros-gz-sim# Create a ROS2 workspace
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
# Clone this repository
git clone https://github.com/blackcoffeerobotics/gazebo-ros-actor-plugin.git -b jazzy-harmonic
# Install dependencies
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
# Build the package
colcon build --packages-select gazebo_ros_actor_plugin
# Source the workspace
source ~/ros2_ws/install/setup.bashIf you prefer using Docker:
# Build the Docker image
docker build -t bcr_ros2-jazzy_gz-harmonic:latest .
# Launch the container
cd docker_scripts
./launch_container.sh
# Enter the container shell
./bashing_container.sh
# Inside the container, build the workspace
cd /root/ros2_ws
colcon build --packages-select gazebo_ros_actor_plugin
source install/setup.bash
# To stop the container
./stop_container.sh-
Source your workspace:
source ~/ros2_ws/install/setup.bash
-
Configure the actor mode in
config/worlds/move_actor.world:- Edit the
follow_modeparameter to eithervelocityorpath
- Edit the
-
Launch the simulation:
ros2 launch gazebo_ros_actor_plugin sim.launch.py
Launch arguments:
verbose:=True/False- Enable verbose output (default: True)headless:=True/False- Run without GUI (default: False)
# Install teleop keyboard
sudo apt-get install ros-jazzy-teleop-twist-keyboard
# Run teleop
ros2 run teleop_twist_keyboard teleop_twist_keyboardUse i/j/k/l/, keys to control movement.
ros2 run gazebo_ros_actor_plugin path_publisher.pyPublishes a circular path with 10 waypoints.
| Parameter | Default | Description |
|---|---|---|
follow_mode |
velocity |
Control mode: path or velocity |
vel_topic |
/cmd_vel |
Velocity command topic |
path_topic |
/cmd_path |
Path command topic |
animation_factor |
4.0 |
Animation speed multiplier |
linear_velocity |
1.0 |
Movement speed (m/s) |
angular_velocity |
2.5 |
Rotation speed (rad/s) |
default_rotation |
1.57 |
Skin alignment offset (rad) |
/cmd_vel(geometry_msgs/msg/Twist) - Velocity commands/cmd_path(geometry_msgs/msg/PoseArray) - Path waypoints

