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

Running ROS in pure simulation [closed]

asked 2012-04-12 02:51:20 -0500

updated 2012-04-14 00:09:37 -0500


I would assume ROS can run in pure simulation? I'm trying to build a SLAM map of simulated environment while navigating through it (with path planning and obstacle avoidance) using the simulated TurtleBot. However most of the TurtleBot tutorials assume you have the TurtleBot hardware.

FYI, I've already got the TurtleBot simulator working via:

roslaunch turtlebot_gazebo turtlebot_empty_world.launch

However I'm unsure how to:

  1. calibrate the simulated TurtleBot
  2. see the output of a simulated Kinect
  3. see the output of SLAM (and ideally the particles in the particle filter)
  4. see the output of the path planning
  5. drive the robot around (or set way points)

FYI, I would of thought I could do (5) via

roslaunch turtlebot_teleop keyboard_teleop.launch

But it doesn't move the TurtleBot in the simulator - I assume its for the real hardware only?

Any ideas?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SL Remy
close date 2017-07-21 02:01:02.598658

8 Answers

Sort by ยป oldest newest most voted

answered 2012-04-13 03:39:54 -0500

dornhege gravatar image

If the simulation is working properly the answers to your questions should be:

  1. You probably don't need this.

2-5. Exactly as in the real robot tutorials!

The commands you have posted for 5. work fine for me. Did you use the correct buttons in the focused terminal to control?

edit flag offensive delete link more

answered 2012-04-13 05:35:47 -0500

Ryan gravatar image

You don't need to calibrate the simulation (nor can you, in fact).

To view the output of the simulation, you can use rviz. I recommend:

rosrun rviz rviz -d `rospack find turtlebot_navigation`/nav_rviz.vcg

(taken from here)

Regarding driving the simulation - can you echo /cmd_vel when you're running keyboard_teleop and verify that it's publishing the right data?

edit flag offensive delete link more

answered 2012-04-13 03:22:15 -0500

Hi McMurdo,

How did you get teleop working, as the above command doesn't work for me - I've been RTFM, but not luck as yet ;) - any ideas?

What about viewing the Kinect sensor output in simulation, or path planning, or SLAM output? - Any ideas?


edit flag offensive delete link more

answered 2012-04-14 00:08:56 -0500

updated 2012-04-14 00:25:56 -0500

I'm new to ROS (however I was the co-author of a similar project DROS at, so please excuses my newbie questions about ROS. Anyway:

1) any good simulator should allow you to simulate the calibration steps. E.g. most DMU's have a roll bias, so the simulator should have a hard coded roll bias. Could you please point me to the tutorials to calibrate a robot in pure simulation?

2) domhege, I'm sure they are, but the tutorials are not the most easiest to find (they seem rather split across pages, and sometimes are missing vital prerequisite), can you please point me to the tutorials I should be following...

3) re drive the robot around. I've just started up the empty world simulation as shown above, then run that keyboard teleo command above, and when I press "q" a few times, the robot in the simulator doesn't not move. Any ideas what I maybe missing? Ryan, how do I "echo /cmd_vel"? can you point me to the tutorial on this?

4) Ryan, when I run that command it opens up, but I just see a black screen. Any ideas how to see the particles, kinect output, etc. And the output of "roslaunch turtlebot_navigation gmapping_demo.launch", keeps saying "[/openni_camera] No devices connected.... waiting for devices to be connected" - which seems to be looking for the real Kinect hardware - so how do I tell it to use a simulated Kinect?

edit flag offensive delete link more

answered 2012-04-16 01:51:08 -0500

updated 2012-04-16 21:24:51 -0500

Re: Simulation

Personally I think a pure simulation feature should be mandatory for ROS (and its packages such as turtlebot), so researchers/engineers can see the best outcome (i.e. with zero errors), and then to basically switch on the simulated noise to get a better idea of how the solution will work in a real world with real robots.

Re: Tutorials

1) One suggestion would be to have a one-page howto for newbies, that contains a simple list of commands (and small description - with links to the full data), to get ROS up and running with (or without) a robot, to show the major features (i.e. sensor output, localisation output, mapping output, etc)

2) Also the TurtleBot tutorials seems to assume you have all the hardware. Is there a ROS tutorial to show you how to setup everything without the hardware. Basically I have a heap of personal robots I would like to get running with ROS, and I was hoping to base it off the TurtleBot - but since I don't have the TurtleBot hardware, most of the tutorials keep leading me to dead ends (since the hardware is required for most steps).

Re: Driving

I see, I thought that hitting "q" alone would move the robot forward. I see need to use i, etc - so that is now solved for me.

Re: rviz

Yeah here is the following things in red, after running "roslaunch turtlebot_navigation gmapping_demo.launch" and "rosrun rviz rviz -d rospack find turtlebot_navigation/nav_rviz.vcg"

  • Robot Model -> Status: Error -> This lists a heap of errors such as: No transform from [base_footprint] to [/map]

And "roslaunch turtlebot_navigation gmapping_demo.launch" keeps saying:

[ INFO] [1334647393.669410590, 120.900000000]: [/openni_camera] No devices connected.... waiting for devices to be connected
[ INFO] [1334647394.352812232, 121.676000000]: Still waiting on map...

How do I give it a map? And the kinect error is simply because I don't have a physical kinect attached (I'm currently waiting on a power/comms cable). Any thoughts on how to deal with this errors for a pure simulation method?


edit flag offensive delete link more

answered 2012-04-12 07:16:44 -0500

McMurdo gravatar image

I have tried this once. I think you should be able to teleop the turtlebot quite easily. I have done that on the simulator. All simulators - gazebo, stage, etc - try to trick ROS into believing that the data has originated from real sensors. You should be able to do all this by following the TurtleBot tutorials exactly. However, there might arise small problems which you must be able to solve with little difficulty.

I think an empty_world will be of no help in doing anything. You need a wall for calibration. And lots of landmarks for SLAM. Search for .world files on the internet. I do not know where you can get one. But I am sure there will be a lot of world files for the simulator.

Good Luck!

edit flag offensive delete link more

answered 2012-04-14 05:09:21 -0500

Ryan gravatar image

Re: Simulation

Though it's possible to add errors to the Gazebo simulation, the turtlebot_calibration package interfaces directly with the ADC values generated by the hardware, which is not yet simulated (really, I think this has been the first time it's been mentioned as a deficiency in the TurtleBot package).

Re: Tutorials

All of the tutorials for TurtleBot are listed in order here, under the "Getting Started" heading. Do you have some ideas for how they can be more clearly laid out for new users such as yourself?

Re: Driving

My version of the keyboard teleop has "q" increasing max speed only, and driving with i/j/l/,/etc. Could you let us know what you have? Echoing cmd_vel is done with:

rostopic echo /cmd_vel

Re: rviz

Does rviz show any errors? They're usually highlighted in red on the left side

edit flag offensive delete link more

answered 2012-04-30 22:57:59 -0500

Hi, any thoughts for my previous questions?

edit flag offensive delete link more

Question Tools



Asked: 2012-04-12 02:51:20 -0500

Seen: 3,128 times

Last updated: Apr 30 '12