1.3/install


 * 1) Tutorial: Install#


 * 1) Important Notes: EVERYONE READ##

1. ROS Users: 1. Only install Gazebo from here, and only follow tutorials from this website. Documentation on ros.org for Gazebo is old and not actively maintained. 1. G-Turtle will be the last release of ROS to pull in version of Gazebo. As of H-Turtle, ROS will use the standalone version of Gazebo. 1. If you are new to Gazebo or just want to use Gazebo as a stand-alone application, select the Pre-compiled binaries or Tarball instructions below. 1. If you're still reading, select a download method below.

Pre-compiled binaries -


 * 1) Ubuntu Linux 12.04 (precise)

1. Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

1. Setup your computer to accept software from packages.osrfoundation.org.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu precise main" > /etc/apt/sources.list.d/gazebo-latest.list'

1. Retrieve and install the keys for the ROS and DRC repositories.

wget http://packages.ros.org/ros.key -O - | sudo apt-key add - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -

1. Update apt-get and install Gazebo.

sudo apt-get update sudo apt-get install gazebo

1. Check your installation

. /usr/share/gazebo-1.3/setup.sh       gazebo

Note: setup.sh can fails exporting paths. In this case, try adding it to .bashrc: echo "source /usr/share/gazebo-1.3/setup.sh" >> ~/.bashrc source ~/.bashrc

Gentoo ==


 * Note: This is a work in progress**

sudo emerge --noreplace layman git sudo layman -a ezod sudo emerge gazebo


 * Issues:**

1. The official Portage tree doesn't have an ebuild for OGRE 1.7.1 or later yet, so you will also need to add the "gamerlay" overlay (which contains an ebuild for OGRE 1.7.3). 2. Similarly, there is no ebuild for Player in the official tree, but one is available in the "science" overlay. Compiling with Player support is optional and controlled via the "player" USE flag.

Tarball ==

1. Download the .tar.gz from the Repository page. 1. Open a terminal and change directory to the location of the downloaded tarball. 1. Unpack the tarball

tar -xvf gazebo_1.3.0-0ubuntu5.tar.gz

1. Change directory into the Gazebo sources

cd gazebo-1.3.0

1. Continue with the Compiling From Source section below

Mercurial == 1. Clone the repository

hg clone https://bitbucket.org/osrf/gazebo gazebo

1. Change directory in the repository

cd gazebo

1. Continue with the Compiling From Source section below

Compiling From Source ==


 * 1) WARNING ##

The pre-compiled binaries install in /usr/bin/gazebo. By default, source installation will be performed in /usr/local/bin/gazebo. If you install the pre-compiled binaries on a system that has gazebo installed in /usr/local/bin, YOU MUST REMOVE gazebo from /usr/local (otherwise the os will try to load dynamic libs from your source install into your pre-compiled gazebo). It is a good idea to consider using CMAKE_INSTALL_PREFIX to install your compiled version in a different directory than /usr/local.


 * 1) Instructions ##

1. Download the source code using Mercurial or a  Tarball.

1. Install prerequisites. A clean Ubuntu system will need:

sudo apt-get install build-essential libtinyxml-dev libtbb-dev libxml2-dev libqt4-dev pkg-config libprotoc-dev libfreeimage-dev libprotobuf-dev protobuf-compiler libboost-all-dev freeglut3-dev cmake libogre-dev libtar-dev libcurl4-openssl-dev

1. Create a build directory

mkdir build

1. Change directory in the new build directory

cd build

1. Configure Gazebo (choose either method `a` or `b` below) > a. Release mode: This will generate optimized code, but will not have debug symbols. Use this mode if you don't need to use GDB. >       cmake ../ > b. Debug mode: This will generate code with debug symbols. Gazebo will run slower, but you'll be able to use GDB. >       cmake -DCMAKE_BUILD_TYPE=DEBUG ../ 1. The output from `cmake ../` may generate a number of errors about missing packages. You must install these missing packages and re-run `cmake ../`. Make sure all the build errors are resolved before continuing (they should be there from the earlier step in which you installed prerequisites).

1. Make note of your install path, which is output from `cmake` and should look like:

-- Install path: /home/$USER/local

You can specify the the install path on the command line by defining the CMAKE_INSTALL_PREFIX : >       cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../

1. Build Gazebo

make > Note: You can decrease compile time by using more cores

>        make -jX

> Where X is the number of cores you want to use. 1. Install Gazebo

make install

1. Setup environment variables

If you decide to install gazebo in a local directory

echo "export LD_LIBRARY_PATH=/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc echo "export PATH=/local/bin:$PATH" >> ~/.bashrc echo "export PKG_CONFIG_PATH=/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> ~/.bashrc echo "source /share/gazebo-1.3/setup.sh" >> ~/.bashrc source ~/.bashrc

If Gazebo was installed to `/usr` (which is the default) then:

echo "source /usr/share/gazebo-1.3/setup.sh" >> ~/.bashrc source ~/.bashrc

1. Now try running gazebo:

gazebo