-
Notifications
You must be signed in to change notification settings - Fork 1
Install Instructions for Gazebo 6.5
Gazebo is a general-purpose robotic simulator, capable of simulating populations of robots in outdoor and indoor environments. Revolve is using a custom-altered Gazebo 6.5 version and it requires installing or building from the source several dependencies.
[ Ubuntu (prerequisites) . Mac OS X (prerequisites) ]
Note: These prerequisites are base on Ubuntu Xenial 16.04.5 LTS. If you have a different version, fix accordingly.
-
Make sure you have removed the Ubuntu pre-compiled binaries before installing from source:
sudo apt-get remove '.*gazebo.*' \ '.*sdformat.*' \ '.*ignition-math.*' \ '.*ignition-msgs.*' \ '.*ignition-transport.*'
-
Install the basic dependencies:
sudo apt-get update sudo apt-get install build-essential \ cmake \ cppcheck \ xsltproc \ python \ mercurial
-
Install the required dependencies for Gazebo:
sudo apt-get install libogre-1.9-dev \ libbullet-dev \ python-dev \ python-protobuf \ libprotoc-dev \ libprotobuf-dev \ libfreeimage-dev \ protobuf-compiler \ libboost-thread-dev \ libboost-signals-dev \ libboost-system-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ libboost-regex-dev \ libboost-iostreams-dev \ freeglut3-dev \ libqt4-dev \ libcurl4-openssl-dev \ libtar-dev \ libtbb-dev \ libgts-dev \ ruby \ uuid-dev \ libswscale-dev \ libavformat-dev \ libavcodec-dev \ libgraphviz-dev \ libhdf5-dev \ libopenal-dev \ pkg-config
-
Install Ignition Math v2 from the OSRF repository:
hg clone https://bitbucket.org/ignitionrobotics/ign-math /tmp/ign-math cd /tmp/ign-math hg up ign-math2 mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr make -j4 sudo make install
-
Install SDFormat v3.1.1 dependancy:
cd /tmp wget http://osrf-distributions.s3.amazonaws.com/sdformat/releases/sdformat-3.1.1.tar.bz2 tar -xaf /tmp/sdformat-3.1.1.tar.bz2 cd /tmp/sdformat-3.1.1 mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=/usr make -j4 sudo make install
See next: Installation instructions for newer Gazebo (Linux)
For the reasons of simplicity of navigating between the projects, we will make a joint directory for the Gazebo and Revolve and refer to it under the variable $SIM_HOME
.
Otherwise, it is not necessary to keep the Gazebo source after the successful installation.
mkdir -p ~/projects/revolve-simulator
cd ~/projects/revolve-simulator
export SIM_HOME=`pwd`
-
Clone the Gazebo 6.5 project locally:
cd $SIM_HOME git clone https://github.com/ci-group/gazebo.git -b gazebo6-revolve
-
Disable
gz
target on Ubuntu (on other distros it works just fine), it won't compile for some weird reason.Note: This is only for the Linux build; Mac OS X does not run into the same issue.
cd $SIM_HOME/gazebo echo >tools/CMakeLists.txt 'include ( ${QT_USE_FILE} ) add_definitions(${QT_DEFINITIONS}) include_directories( ${tinyxml_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIR} ${SDFormat_INCLUDE_DIRS} ) link_directories( ${CCD_LIBRARY_DIRS} ${SDFormat_LIBRARY_DIRS} ${tinyxml_LIBRARY_DIRS} ) if (HAVE_BULLET) link_directories(${BULLET_LIBRARY_DIRS}) endif() if (HAVE_DART) link_directories(${DARTCore_LIBRARY_DIRS}) endif() if (CURL_FOUND) include_directories(${CURL_INCLUDEDIR}) link_directories(${CURL_LIBDIR}) if (WIN32) add_definitions(-DCURL_STATICLIB) endif() endif() set (test_sources gz_log_TEST.cc gz_TEST.cc ) gz_build_tests(${test_sources}) install (PROGRAMS gzprop DESTINATION ${BIN_INSTALL_DIR}) if (NOT WIN32) manpage(gzprop 1) endif() '
-
Build the project:
cd $SIM_HOME/gazebo mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_SSE4=True \ -DENABLE_TESTS_COMPILATION:BOOL=False make -j4
-
Install Gazebo on your machine:
sudo make install
-
Test if the installation was successful. You can do this in two ways.
- First, if you run
gzserver
in verbose mode:The result of this command should be:gzserver --verbose
Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] transport::init() host:0 [Msg] transport::init() hostlocalhost:11345 [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.72
- Second, if
gzserver
works as expected you can rungazebo
:The result of this command should be:gazebo
Note: After installing Gazebo, you can remove its source code directory to free up disk space.
See next: Installation requirements for Revolve
In a clean Mac OS X installation you can install pre-compiled versions of all dependencies:
-
If not already available, install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Install XQuartz, which provides X11 support and is required by Gazebo and OGRE.
-
For 10.8 and earlier, install Xcode command-line tools by downloading them from Apple. For 10.9 and later, they should prompt you to install them when you install Homebrew in step 1.
xcode-select --install
-
Install most of the dependencies using
brew
:brew install boost \ bullet \ cmake \ doxygen \ ffmpeg \ freeimage \ gdal \ git \ gsl \ gts \ hg \ libtar \ protobuf protobuf-c \ python \ tbb \ tinyxml \ yaml-cpp
-
Link
gettext
library to/usr/include
since some of the dependencies may not link properly:brew link --force gettext
NOTE: If not linked, this type of error occurs during a build-time:
ld: library not found for -lintl clang: error: linker command failed with exit code 1 (use -v to see invocation)
-
Install Qt:
brew tap cartr/qt4 brew tap-pin cartr/qt4 brew install cartr/qt4/qt --without-webkit
-
Install OSRF simulation dependancies:
brew tap osrf/simulation brew install ignition-math2 \ ogre \ sdformat3 \ simbody
-
Install Python virtual environment:
pip install virtualenv
-
Make sure all packages are up-to-date:
brew update brew upgrade
See next: Installation instructions for newer Gazebo (Mac OS X)
For the reasons of simplicity of navigating between the projects, we will make a joint directory for the Gazebo and Revolve and refer to it under the variable $SIM_HOME
.
Otherwise, it is not necessary to keep the Gazebo source after the successful installation.
mkdir -p ~/projects/revolve-simulator
cd ~/projects/revolve-simulator
export SIM_HOME=`pwd`
-
Clone the Gazebo 6.5 project locally:
cd $SIM_HOME git clone https://github.com/ci-group/gazebo.git -b gazebo6-revolve
-
Build the project:
cd $SIM_HOME/gazebo mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DENABLE_SSE4=True \ -DENABLE_TESTS_COMPILATION:BOOL=False make -j4
-
Install Gazebo on your machine:
make install
-
Test if the installation was successful. You can do this in two ways.
- First, if you run
gzserver
in verbose mode:The result of this command should be:gzserver --verbose
Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] transport::init() host:0 [Msg] transport::init() hostlocalhost:11345 [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.72
- Second, if
gzserver
works as expected you can rungazebo
:The result of this command should be:gazebo
Note: After installing Gazebo, you can remove its source code directory to free up disk space.
See next: Installation requirements for Revolve
For more information about the Triangle of Life concept visit http://evosphere.eu/.
_________________
/ Premature \
| optimization |
| is the root of |
| all evil. |
| |
\ -- D.E. Knuth /
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||