Giter VIP home page Giter VIP logo

multi_burger_sim's Introduction

multi_turtlebot_sim

Introduction

The credit goes to Franco Cipollone who created this package for Turtlebot3 Waffle model. I just edited and added files for it to make it work for turtlebot3 Burger model. This package is meant to be an example on how robots needs to be configured in order to support simulating multi robots in the same environment.

Platform

ROS 2 Version: Foxy

Notes

TF

  • One /tf topic is expected to be published for any number of robots
  • Each frame should have a prefix to know which robot they belong to

ROS

  • Topics should be namespaced.
    • <robot_prefix>/robot_description
    • <robot_prefix>/joint_states
    • <robot_prefix>/cmd_vel
    • <robot_prefix>/odom
    • <robot_prefix>/scan
  • Nodes should be namespaced.
    • robot_state_publisher: Reads robot description and:
      • Publishes <robot_prefix>/robot_description topic.
      • Publishes transforms to /tf. Transforms should be prefixed for the robot.
      • Subscribes to joint_states. Topic should be prefixed for the robot.
    • Gazebo related nodes
      • gazebo_ros_diff_drive plugin: Should be namespaced.
      • gazebo_ros_joint_state_publisher plugin: Should be namespaced.

Try it!

  • Launch the standalone simulation, no robot is spawned
ros2 launch multi_burger_sim standalone_world.launch.py

Note: By default the empty world is used, you can also use world_name:=turtlebot3_world.world.

  • Spawn a robot using a robot_prefix in a particular x_pose and y_pose.
ros2 launch multi_burger_sim spawn_turtlebot3.launch.py robot_prefix:=burger1 x_pose:=0.5 y_pose:=0.5

The robot_prefix will affect both the ros namespace and the tf prefix for that robot

  • Spawn another robot in a different position
ros2 launch multi_burger_sim spawn_turtlebot3.launch.py robot_prefix:=burger2 x_pose:=-0.5 y_pose:=-0.5

Check how the tf tree is conformed:

ros2 run tf2_tools view_frames.py
  • The tf tree of each robot aren't connected therefore both robots in rviz can't be seen. As the simulation is starting the odom frame for each robot in the {0,0} world position we can add a static transform between both odometry frames to achieve the full tf_tree all connected.
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 burger1/odom burger2/odom

multi_burger_sim's People

Contributors

nitish-209 avatar

Stargazers

Rudresh Singh avatar

Watchers

 avatar

Forkers

ruudddiiii

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.