Coder Social home page Coder Social logo

chris-arvin / gazebo-ros-actor-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blackcoffeerobotics/gazebo-ros-actor-plugin

0.0 0.0 0.0 14.07 MB

Gazebo ROS plugin to move actors using velocity or path messages

License: Apache License 2.0

Shell 2.51% C++ 75.42% Python 9.39% CMake 3.97% Dockerfile 8.71%

gazebo-ros-actor-plugin's Introduction

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:

  • ROS 1 Noetic
  • Gazebo Classic (Version 11)
  • gazebo_ros_pkgs

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:

  • follow_mode: The mode in which the actor will follow the commands. It can be set to either path or velocity.
  • vel_topic: The name of the topic to which velocity commands will be published. The default topic name is /cmd_vel.
  • path_topic: The name of the topic to which path commands will be published. The default topic name is /cmd_path.
  • animation_factor: Multiplier to base animation speed that adjusts the speed of both the actor's animation and foot swinging.
  • linear_tolerance: Maximum allowed distance between actor and target pose during path-following.
  • linear_velocity: Speed at which actor moves along path during path-following.
  • angular_tolerance: Maximum allowable difference in orientation between actor's current and desired orientation during rotational alignment.
  • angular_velocity: Speed at which actor rotates to achieve desired orientation during rotational alignment.
  • default_rotation: Angle offset for skin collada files. It's set to 1.57 by default but should be adjusted for the skin. It can be changed by adding or subtracting pi/2 to make the actor stand upright. For "DoctorFemaleWalk" actor, the value is "0".

ROS API

The gazebo_ros_actor_plugin subscribes to information from the following inbound topics:

  • /cmd_vel: to receive linear and angular velocity commands
  • /cmd_path: to receive path commands

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:

  • Detailed Article: This article provides in-depth support and explanation of the contents of this repository.
  • Demo Videos: This video playlist demonstrates Actor Plugin in action and also shows potential use case of this work, showcasing crowd behavior.

References

Here are some additional references that may be useful:

gazebo-ros-actor-plugin's People

Contributors

animesh-singhal avatar ggupta9777 avatar kvkpraneeth avatar shtseng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.