• Diff for "simulator_gazebo/Tutorials/StartingGazebo"
Differences between revisions 37 and 38
Revision 37 as of 2010-09-27 23:05:38
Size: 2877
Editor: hsu
Comment:
Revision 38 as of 2010-09-27 23:06:12
Size: 2886
Editor: hsu
Comment:
Deletions are marked like this. Additions are marked like this.
Line 60: Line 60:
The script simply starts the Gazebo executable with a default world file (`empty.world`). The world file is where you can customize basic features of the simulator, such as physics engine parameters, the ground plane, and lighting. For most users, the standard world file loaded by empty_world.launch should suffice. The ROS parameter '''/use_sim_time''' tells all nodes on this ROS system to use the simulation time in the '''/clock''' ROS topic published by gazebo rather than the system wall clock time. The script simply starts the Gazebo executable with a default world file (`empty.world`). The world file is where you can customize basic features of the simulator, such as physics engine parameters, ground plane textures, lighting and etc. For most users, the standard world file loaded by empty_world.launch should suffice. The ROS parameter '''/use_sim_time''' tells all nodes on this ROS system to use the simulation time in the '''/clock''' ROS topic published by gazebo rather than the system wall clock time.

Note: This tutorial assumes that you have completed the previous tutorials: ROS tutorials.
(!) Please ask about problems and questions regarding this tutorial on answers.gazebosim.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Installing and Starting Gazebo

Description: How to get Gazebo up and running.

Tutorial Level: BEGINNER

Next Tutorial: Spawn objects in the world

Installation

Install ROS and download the personal robots repository (more here). Skip to next section if you are installing binaries.

If you are compiling from source, ensure that you have Gazebo's system dependencies

rosdep install gazebo_worlds

Build Gazebo itself. If you haven't previously built dependencies such as Ogre, this will take a long time (tens of minutes).

rosmake gazebo_worlds

Launching Gazebo

The standard Gazebo launch file is started using:

roslaunch gazebo_worlds empty_world.launch

This should start the simulator and open up a GUI window that looks like this:

  • simulator_gazebo/Tutorials/empty_world_cturtle.jpg

*see here for Box-Turtle GUI interaction keys.

If youre system does not have sufficient graphics support, you can run gazebo headless.

Launch Script Explained

Looking at the gazebo_worlds/launch/empty_world.launch,

<launch>
  <!-- start gazebo with an empty plane -->
  <param name="/use_sim_time" value="true" />
  <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"/>
</launch>

The script simply starts the Gazebo executable with a default world file (empty.world). The world file is where you can customize basic features of the simulator, such as physics engine parameters, ground plane textures, lighting and etc. For most users, the standard world file loaded by empty_world.launch should suffice. The ROS parameter /use_sim_time tells all nodes on this ROS system to use the simulation time in the /clock ROS topic published by gazebo rather than the system wall clock time.

Next Tutorial: Spawn objects in the world

Wiki: simulator_gazebo/Tutorials/StartingGazebo (last edited 2014-11-11 19:16:11 by LucasWalter)