Contents

Overview

We assume that you have installed both Gazebo and Player locally (in your home directory).

This tutorial demonstrates how to move a robot around in Gazebo using a graphical tool in Player called playerv.
By the end of this tutorial, you will know how to launch Gazebo, edit a player config file to correspond to a robot in Gazebo, and use the playerv tool to move the robot around.

Launching Gazebo

The first step is to launch Gazebo and place a robot in the world. Gazebo takes at a minimum one command line argument, which is a word file. This file tells Gazebo how to setup the world, and what to place in it. We won't delve into the guts of the world file in this tutorial.

First go to the location of all the default world files.

$ cd ~/local/share/gazebo/worlds

Now run gazebo with the pioneer2dx.world file

$ gazebo pioneer2dx.world

At this point, a new window should appear that contains a Pioneer2dx sitting on a flat surface.

Launching Player

Once Gazebo is up and running, you can also run Player to control robots inside Gazebo.

In a new terminal:

$ cd ~/local/share/gazebo/player_cfgs

Run player:

$ player gazebo.cfg

Not too much will happen here. Player should output something along the lines of:

Here is how the filenames break down: <interface_type>.<gazebo_model>.<interface_name>. For the position2d interface, the type is position, the model which contains the interface (or your can think of this as the model that is controlled by the interface) is the pioneer2dx_model1, and the name of the interface itself is position_iface_0.

This information is used in the Player configuration file. Take a look at the gazebo.cfg file used previously in this tutorial. Look at this section:

The provides tag tells this driver what type of interface this driver uses, and the gz_id tells the driver where to find the matching Gazebo interface. This name must match a name in the Gazebo shared memory interfaces.]
essay papers