ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

multiple robots under one core?

asked 2012-01-16 04:03:49 -0500

apalomer gravatar image

Hi all!

I'm planning to use multiple turtlebots under the same core. The thing is that, for example, all the robots uses the same name for the topics. My question is: Is it possible to modifying a little bit the code I get different names for each robot or do I need to manually go through all the code and change all the names of the nodes?

What I want is to get something like, instead of cmd_vel turtlebot1/cmd_vel, instead of joy turtlebot1/joy and so on.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-01-16 05:53:09 -0500

mmwise gravatar image

updated 2012-01-19 08:21:10 -0500

You should be able to push the TurtleBots into their own namespaces.. so when you launch the TurtleBots do something like this in your rolsaunch file

<launch>
  <group ns=turtlebot1>

    all your regular launch stuff.....

  </group>
</launch>

see this page for more roslaunch XML markup help http://www.ros.org/wiki/roslaunch/XML

edit flag offensive delete link more

Comments

1
Maybe, also set tf_prefix to the robot name.
dornhege gravatar image dornhege  ( 2012-01-16 21:27:09 -0500 )edit
1

answered 2012-01-16 21:23:28 -0500

apalomer gravatar image

Thank you mwise_wg, it's been really usefull.

Only thing to coment is that the correct command is < group ns="turtlebot1"> and < /group> instead of ns and /ns.

Thanks!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-01-16 04:03:49 -0500

Seen: 381 times

Last updated: Jan 19 '12