Gazebo relies on a number of third-party libraries, most of which will probably be installed on your system by default. You may, however, have to install the following additional packages before installing Gazebo:
The Gazebo source tarball can be obtained from
http://playerstage.sourceforge.net/
After unpacking the tarball, read the generic instructions in README and INSTALL. If you don't feel like reading those
files, the following should suffice in most cases:
$ ./configure $ make $ make installGazebo will be installed in the default location: /usr/local/. The configure script accepts a number of options for customizing the build process, including changing the install location and adding/removing device drivers. For example, to change the install location for Gazebo to
~/local
in your home directory, use:
$ ./configure --prefix /home/<username>/localPlease read the FAQ entry on local installations, available here:
To see a complete list of build options, use:
$ ./configure --helpIf you are going to use Gazebo with Player, note that Gazebo must be installed before Player.
The Gazebo server can be started as follows:
$ gazebo <worldfile>where
<worldfile>
is the file containing the description of the
world and everything in it. Sample world files can be found in the
worlds directory of the source distribution, or in the
installed version under /usr/local/share/gazebo/worlds/
(default install). For example:
$ gazebo /usr/local/share/gazebo/worlds/example1.worldwill create a simple world with a single robot. Gazebo will display a window with a view of the simulated world; the camera viewpoint can be changed by dragging around with the mouse.
The Player device server treats Gazebo in exactly the same way that it treats real robot hardware: as a device that is a source of data and a sink for commands. Users must therefore run Player seperately, and point it at an running instance of Gazebo. Player has a number of specific drivers, such as gz_position and gz_laser that can be used to interact with Gazebo models.
For example, after starting Gazebo as per the above example, run Player like this:
$ player -g default /usr/local/share/player/config/gazebo.cfgPlayer will output a message indicating that is has connected with the simulation:
libgazebo msg : opening /tmp/gazebo-<username>-default-sim-defaultUsers can now interact with the simulated robot exactly as the would a real robot. Try running playerv, for example:
$ playerv --position:0 --laser:0This will pop up the standard Player viewer utility. You should see an outline of the robot and the laser scan. Use the mouse to pan and zoom. You can driver the robot around by selecting the "command" option from the menu, and then dragging the little cross hairs to where you want the robot to go. You should see the the robot in the Gazebo window moving at the same time.
See Chapter 4 for examples of typical Player/Gazebo configurations, and consult the Player manual for information on specific Player drivers.
Gazebo recognizes the following command line options.
Argument | Meaning |
-v | Print the version string. |