DOC PREVIEW
UTK CS 594 - Gazebo Tutorial

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Gazebo Tutorial(by Rasko Pjesivac )What is Gazebo?Gazebo is a simulator for a small group of robots in а 3D environment. Similarly to Stage, a 2D environment simulator, Gazebo can simulate a population of robots, objects and sensors. There are a few differences between the two simulators. Gazebo is designed for a small number of robots while Stage can handle hundreds of robots. In addition, Gazebo has a higher precision then Stage. Since both Gazebo and Stage are Player-compatible, client programs written using one simulator can usually be run on the other one with some or no modifications.Installing GazeboYou do not need to worry about installing Gazebo since it is already installed on UTK CS Linux machines. However, if you decide to do it yourself, this tutorial describes the process that you have to follow (this process can be tricky!). First, you should go to official Player-Stage/Gazebo website http://playerstage.sourceforge.net/gazebo/gazebo.html. Then go to the download section to get the latest version of Gazebo along with the updated documentation. Read the documentation!Steps to install Gazebo.1) Installing the requirements of Gazebo:GUI component of Gazebo requires two third-party packages SWIG and wxPython (Python bindings for wxWidgets).Beside these two packages, minimal Gazebo installation also requires ODE (OpenDynamicEngine). In addition, some terrain models and roads require OPCODE collision detection library, which is now part of the ODE distribution. Therefore, when installing ODE package make sure that you are installing it with OPCODE collision detection library enabled.To support terrain builder utility of Gazebo, GDAL library (Geospatial Data Abstraction Library) has to be installed as well. Links to these packages and installation instructions are provided on Gazebo's website. Once all these packages are installed you can start configuring and installing Gazebo.2) Installing Gazebo:First, you need to get the source code from the official website (if you still have not done it). After this, you will need to set up some necessary compiler paths for your shell. The paths for UTK-CS machines are listed bellow:export PATH="$PATH:/usr/local/lib"export PLAYERPATH="/usr/local/lib"export LD_LIBRARY_PATH="/usr/local/lib:/usr/local/pkgs/Python-2.4.1/lib"In addition to these paths, you might need to set up the following flags (these are UTK-CS specific):export CFLAGS="-I/pkgs/player-stage-2.0.3/include -I/usr/local/include"export CPPFLAGS="-I/pkgs/player-stage-2.0.3/include -I/usr/local/include"export LDFLAGS="-L/pkgs/player-stage-2.0.3/lib -L/usr/local/lib -Wl,-rpath=/pkgs/player-stage-2.0.3/lib -Wl,-rpath=/usr/local/lib"export PYTHONPATH="/pkgs/player-stage-2.0.3/lib/python2.4/site-packages/:/pkgs/player-stage-2.0.3/lib/python2.4/site-packages/wx-2.7.2-gtk2-ansi"You are now ready to run ./configure and make scripts to install Gazebo.With ./configure script (which you have downloaded with the source code) you can specify the path where you want to install Gazebo. This can be done by typing:linux:~> ./configure –prefix=/home/username/wherever/After this, the ./configure script will have adapted the Makefile to use the proper libraries, compiler options and installation directory. If you have enabled some optional features of Gazebo, ./configure script would include them into the Makefile as well.Now you just need to run:linux:~> makelinux:~> make installmake will try to compile all the parts of Gazebo. Depending on the speed of your machine, this process can take a while. make install will put all the binaries into the directory specified earlier. If everything has been properly set up and make and make install have been completed without errors, the installation process is finished.Terrain Builder Utility of Gazebo: Gzbuilder Gzbuilder is a terrain-builder part of Gazebo. Gzbuilder can build different terrains depending on kind of data provided as its input. It can create a 3D terrain of a floor plan or an outdoor map if a Digital Elevation Model (DEM) is passed as its input. Output is *.gzb file that is usable by Gazebo. Basic syntax for Gzbuilder is the following: linux:~> gzbuilder [options] -i <inputfile> -o <outputfile> where the options are: -i <filename> Input terrain file. -o <filename> Output Gazebo terrain file.-e <double> Acceptable error bound on terrain approximation (meters). Set this to zero for no approximation.-h <double> Horizontal scaling factor (m).-v <double> Vertical scaling factor (m).-n Normalize Z-values before scaling.-x <double> X offset (m).-y <double> Y offset (m).-z <double> Z offset (m).-u <int> UTM zone. Default is 11-s <double> X size of texture (meters)-t <double> Y size of texture (meters)Here is an example command that creates a 3D map based on the image file hospital_section.png:linux:~> gzbuilder –i hospital_section.png –o hospital.gzb –n –v 2.4 –h 0.1 –e 0.1where the options are:–n : normalizes the input image in the range 0 for black pixels and 1 for white pixels.–v 2.4 : scales heights so the white pixels correspond to an elevation of 2.4 meters–h 0.1 : scales the image so the distance between each pixel on the map correspond to distance of 0.1 meter–e 0.1 : allows Gzbuilder to create a terrain with maximum elevation error of 0.1 meter. NOTE1: Gzbuilder can take any file in format supported by GDAL library as an input. For the full list of supported formats visit: www.gdal.org/formats_list.htmlNOTE2: The version of hospital_section.png given earlier in the class had black pixels representing the walls and white pixels representing the free area. However, Gzbuilder needs this to be reversed. The reversed version of hospital_section.png can be found in /research/playerstage/examples/ directory.How to use GazeboCreating a world file:As mentioned above, Gazebo is a multi-robot simulator for both indoor and outdoor environments. Gazebo takes a *.world file as an input. This is an XML file containing the description of the world. The following header block is required at the beginning of each *.world file.<?xml version="1.0"?><gz:world xmlns:gz="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz" xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model" xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window" xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#params"


View Full Document

UTK CS 594 - Gazebo Tutorial

Documents in this Course
Load more
Download Gazebo Tutorial
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Gazebo Tutorial and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Gazebo Tutorial 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?