Ask Your Question

Spawning multiple robots in Gazebo with ROS2 with namespaces

asked 2021-02-25 04:06:34 -0600

Rinkeeee96 gravatar image

Hey all, Ive been trying for a couple of days but am unable to get this working. My goal is to spawn multiple robots in Gazebo using a Ros2 launch file. Each robot should have its own namespace. I have followed a couple of different tutorials and I have a launch file running, which is capable of launching my own Gazebo world file. Starting 2 robot nodes with their own namespace However the robots do not show up in Gazebo.

Followed another tutorial to spawn robots in gazebo, this does work, but the topics are not launched.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-03-04 13:57:41 -0600

RDaneelOlivaw gravatar image


I created a small example of how to spawn infinite number of robots in ROS2 with tehir own namespaces, both in the Tfs, the imu and the cmd_vel topics.

The basic idea is that we parse the URDF/SDF file in a way that we place a remapping of the different topics like tf and also spawn with namespaces. Using that it seems at least this basic example work:

Here is the GIT:BOX BOT GIT

Here is the video explaining it and with a demo:link text

Here is the rosject with the whole project ready to test: rosject multirobotboxbot

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-02-25 04:06:34 -0600

Seen: 400 times

Last updated: Mar 04