blackcoffeerobotics / gazebo-ros-actor-plugin

Gazebo ROS plugin to move actors using velocity or path messages
Apache License 2.0
37 stars 7 forks source link
actor gazebo gazebo-simulator ros

Gazebo ROS Actor Plugin

About

The gazebo_ros_actor_plugin package contains a plugin for Gazebo Classic (Version 11) and a ROS package that enables dynamic control of actors in Gazebo. The plugin allows you to control actors using either position or velocity commands.

System Requirements

Before using this package, make sure that you meet the following requirements:

Installation

If you want to use this package with a Docker container, follow these steps:

  1. Build the Docker image using docker build -t bcr_ros-noetic_gz-11:latest .
  2. Launch the container by running cd docker_scripts and ./launch_container.sh. This will mount the package to /root/ros2_ws/src/.
  3. To enter a bash session, run ./bashing_container.sh.
  4. To stop the container, run ./stop_container.sh.

Usage

Running the gazebo_ros_actor_plugin

To use the gazebo_ros_actor_plugin, follow these steps:

  1. Build the package using catkin_make.
  2. Source setup.bash for the workspace containing this package.
  3. Edit the parameters in the move_actor.world file and choose the method of subscription using the follow_mode tag corresponding to the plugin of the actor actor1. It could be either subscribing to path or velocity commands.
  4. Launch the sim.launch file by running:

    roslaunch gazebo_ros_actor_plugin sim.launch

Running the Publishers

To use the plugin, you need to start a publisher that sends velocity or path commands to the actor. This package includes two example publishers:

Velocity Publisher

To run this publisher, enter the following command:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Then give keyboard inputs to command linear and angular velocities. This publisher is based on the ros-noetic-teleop-twist-keyboard package.

Velocity control of actor

Path Publisher

To run this publisher, enter the following command after sourcing the workspace:

rosrun gazebo_ros_actor_plugin path_publisher.py

Note that the path_publisher.py file can be found in the /scripts directory in the package.

Path control of actor

Working with different skins

To work with different skins on the actor change the default_rotation parameter in the world file to adjust the actor.

Different Skin Actor

Parameters in move_actor.world

The move_actor.world file contains the following parameters:

ROS API

The gazebo_ros_actor_plugin subscribes to information from the following inbound topics:

Note that the names of the topics can be overridden in the move_actor.world file present in this package's /config directory.

Additional Resources

For more detailed information and examples, please refer to the following resources:

References

Here are some additional references that may be useful: