|
GazeboGazebo is a multi-robot simulator for both indoor and outdoor environments. Like Stage, it is capable of simulating a population of robots, sensors and objects, but does so in a three-dimensional world. It generates realistic sensor feedback, object collisions and dynamics. Gazebo is normally used in conjunction with the Player device server; Player provides an abstracted, network-centric mechanism (a server) through which robot controllers (clients) can interact with robot hardware. When used with Gazebo, Player provides simulated data in the place of real sensor data. In principle, client programs cannot tell the difference between real devices and the Gazebo simulation of those devices. Gazebo can also be controlled through a low-level C API (libgazebo). This library is included to allow third-party developers to easily integrate Gazebo into their own (non-Player) servers or architectures. Installation instructions for Gazebo can be found here. Quick-start guideThe Gazebo server can be started as follows:
$ wxgazebo [options] <worldfile>
where $ wxgazebo /usr/local/share/gazebo/worlds/example.world Advanced usageAs of version 0.5, the Gazebo server no longer has a built in GUI (it runs entirely from the command line). Thus, for example, one can use:$ gazebo /usr/local/share/gazebo/worlds/example.world $ wxgazebo /usr/local/share/gazebo/worlds/example.world wxgazebo is actually a bunch of Python scripts that executes the server as a child process.Working with Player (optional)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.cfg Player will output a message indicating that is has connected with the simulator:
libgazebo msg : opening /tmp/gazebo-<username>-default-sim-default
Users can now interact with the simulated robot exactly as they would a real robot. Try running
$ playerv --position:0 --laser:0 This 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 drive the robot around by selecting the "command" option from the menu, 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 Working with Player for examples of typical Player/Gazebo configurations, and consult the Player manual for information on specific Player drivers. Further InformationMore detailed information can be found here: |