User Tools

Site Tools


ros:turtlebot:simu

This is an old revision of the document!


#Simulating a Turtlebot in a virtual world These steps will allow you to simulate and play with a virtual Turtlebot powered by gazebo.

#Install

first take a look at gazebo simulator, please refer to gazebo wiki if not installed yet, you need turtlebot simulator.

  sudo apt-get install ros-hydro-turtlebot-simulator

#Run simulations

##Connectivity and bugs

It seems that a lot of issues I had trying to simulate the turtlebot with gazebo came from a bad internet connection. Gazebo needs to acces the server to download files.

I had some other more or less random segmentation fault. All this stuff doesn't seem to be really stable but hey! how much did you pay for it? …

I had more problems with

  roslaunch turtlebot_gazebo turtlebot_playground.launch

first launch usualy returns a segmentation fault second launch usualy works without segfault but seems to strugle a little to download files and run simulation. After the second try, gazebo is launched and we can see the turtlebot and the environment. When launching gmaping SLAM example, I get stuck on a recusive:

  update ld=3.3651e-05 ad=0.000384513
  Laser Pose= 0.219767 -0.197273 -2.03917
  m_count 321
  Average Scan Matching Score=139.592
  neff= 79.9996
  Registering Scans:Done
  update frame 1355
  update ld=3.05822e-05 ad=0.000347994
  Laser Pose= 0.219738 -0.197264 -2.03882
  m_count 322

I started with m_count=0 and stoped manualy at m_count 322 after around 30min. something went wrong…

##First simulations

First you can try to run an empty world:

  roslaunch turtlebot_gazebo turtlebot_empty_world.launch

you should wait a little until you see the turtlebot model in gazebo, Or a bug in the terminal (refer to Connectivity and bugs).

If you see your robot, your simulation should run correctly. You can check all the ROS nodes ans topics by launching

  rqt-graph

You should see a /gazebo bubble replacing the robot when you are playing with the real robot. That means you can now use the usual demo software for the turtlebot such as keyboard teleop, revitz navigation, SLAM, …

You will create your physical world in gazebo (placing obstacles, creating a world) and then everything should be as if you were using the real robot including sensons feedback.

##Advaced simulation

If you are bored of the flat map, you cal load a map with some obstacles:

  roslaunch turtlebot_gazebo turtlebot_playground.launch

##Next steps It's time for you to play with demo codes such as:

  roslaunch turtlebot_gazebo gmapping_demo.launch
  roslaunch turtlebot_rviz_launchers view_navigation.launch

And of course all the kickass obstacle avoidance algorithms you could think of ;-).

Have fun!

#References Basicaly everything comes from the ROS wiki

/home/share/www/redox.ws/wiki/data/attic/ros/turtlebot/simu.1386974887.txt.gz · Last modified: 2023/11/24 21:55 (external edit)