Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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: http://gazebosim.org/tutorials/?tut=ros_control) 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.