Ask Your Question

How can I spawn multiple of the same robot, and control them individually?

asked 2016-07-31 08:23:35 -0500

RHolland gravatar image

Hey, I'm using Indigo for a project involving swarms of robots. I want to be able to spawn and control multiple of the same URDF into Gazebo. I've been attempting to use the RRBot (from this tutorial: ) for this purpose.

I open Gazebo with one RRBot as such:

roslaunch rrbot_gazebo rrbot_world.launch

And then are able to control it with the topics that this line loads in:

roslaunch rrbot_control rrbot_control.launch

However, if I load more RRBots into the simulation with different model names and namespaces as with:

rosrun gazebo_ros spawn_model -file `rospack find rrbot_description`/urdf/rrbot.xml -urdf -y 1 -model rrbot2 -robot_namespace rrbot2

There are: a) No topics displayed with which to control the newly spawned rrbot2, b) Naming conflicts such as the one below:

[ERROR] [1469970215.112663786, 27.972000000]: Tried to advertise a service that is already advertised in this node [/rrbot/controller_manager/list_controllers]

Is there a way to spawn multiple of the same URDF that can be independently controlled and not cause conflicts? Any feedback would be much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-08-04 04:50:20 -0500

RHolland gravatar image

This repository has an excellent demo of a robot swarm:

It uses an SDF so works well with Gazebo.

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

1 follower


Asked: 2016-07-31 08:23:35 -0500

Seen: 1,152 times

Last updated: Aug 04 '16