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

How do I run and control more than one Turtlebot in a single simulation gazebo / Ros.

asked 2015-01-23 17:49:12 -0500

ThiagoHMBezerra gravatar image

I found no .cpp file or .h. I've tried every way but can not find how to make a smooth and efficient way to each turtlebot own your odometer.

I have lost months trying to edit the xml / launch in several ways but in the end do not get anywhere. And I see that is a very common question.

Please be clear. If not understood my question is: How do I run and control more than one Turtlebot in a single simulation gazebo / Ros.

(Ros hydro)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-01-26 11:04:43 -0500

updated 2015-01-26 11:07:21 -0500

I'm not sure what the real solution is (such that gazebo will directly publish odometry and tf for multiple robots), but I put together a hacky solution which was usable for me. Check out the two launch files in rosh_turtlebot_demo for how to startup gazebo and spawn two robots, and publish_odom.py for publishing odometry and tf.

The key is subscribing to gazebo/model_states and republishing the odom/tf data.

edit flag offensive delete link more

Comments

Perfect, really was that I needed. I made some changes to be able to work with my project. Thank you very much.

PS: I will not need it but at some script "r = Rand ()" (I think that's it) is returning error.

Solved!

ThiagoHMBezerra gravatar image ThiagoHMBezerra  ( 2015-01-27 19:20:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-23 17:49:12 -0500

Seen: 292 times

Last updated: Jan 27 '15