1.0/install

Important Notes: EVERYONE READ ==

1. Make sure your system meets these requirements. 2. Do not install Ogre from a PPA. That source is broken. 3. ROS Users: Only install Gazebo from here. Never use the instruction on the ros.org website. 4. If you are new to Gazebo or just want to use Gazebo as a stand-alone application, select the Ubuntu or Tarball instructions below. 5. If you're still reading, select a download method below.

Ubuntu ==

1. Download the Debian binary from the Downloads page. 2. Select the Gazebo Debian package from your browser's download history, and click install. 3. Alternatively, open a terminal and navigate to the location of the Gazebo Debian package. Then manually install

sudo dpkg -i gazebo-1.0.0.deb

4. If the above command lists a set of failed dependencies, run the following command and try again.

sudo apt-get -f install

5. Setup environment variables

echo "source INSTALL_PATH/share/gazebo-1.0.0/setup.sh" >> ~/.bashrc source ~/.bashrc

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

echo "source /usr/share/gazebo-1.0.0/setup.bash" >> ~/.bashrc source ~/.bashrc

**Ubuntu 12.04** The debian install of Ogre is broken in 12.04. You will need to create a custom `setup.bash` file.

1. Create a configuration directory

mkdir ~/.gazebo

2. Select the option which matches your machine. Note: there are 2 possibilities for 64 bit machines: check to see whether you have a /usr/lib/x86_64-linux-gnu or a /usr/lib/amd64-linux-gnu directory on your machine. 

a. 32bit machine:

echo "export OGRE_RESOURCE_PATH=/usr/lib/i386-linux-gnu/OGRE-1.7.4" > ~/.gazebo/setup.bash

c. 64bit intel machine:

echo "export OGRE_RESOURCE_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.7.4" > ~/.gazebo/setup.bash

b. other type 64bit machine (AMD):

echo "export OGRE_RESOURCE_PATH=/usr/lib/amd64-linux-gnu/OGRE-1.7.4" > ~/.gazebo/setup.bash

3. Add the new setup.bash to your `~/.bashrc`

echo "source ~/.gazebo/setup.bash" >> ~/.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 .bz2 or .zip from the Downloads page. 1. Open a terminal and change directory to the location of the downloaded tarball. 1. Unpack the tarball

tar jxvf gazebo-.tar.bz2

or

unzip gazebo-.zip

1. Change directory into the Gazebo sources

cd gazebo-

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. 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

Optionally, you may also want:

sudo apt-get install -y 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

1. Create a build directory

mkdir build

1. Change directory in the new build directory

cd build

1. Configure Gazebo > 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 ../

> 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/nkoenig/local

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

1. Build Gazebo

make

1. Install Gazebo

make install

1. Setup environment variables

If you decide to install gazebo in a local directory ( watchout for the broken Ogre package on Ubuntu Precise 12.04)

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 "export OGRE_RESOURCE_PATH=/usr/lib//OGRE-1.7.4" >> ~/.bashrc echo "source /share/gazebo-1.0.0/setup.bash" >> ~/.bashrc source ~/.bashrc

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

echo "source /usr/share/gazebo-1.0.0/setup.bash" >> ~/.bashrc source ~/.bashrc

1. Now try running gazebo:

gazebo