Skip to content

Installation Instructions for Revolve

Milan Jelisavcic edited this page Feb 11, 2019 · 48 revisions

This page describes how to set and start up Revolve project. If you installed all the necessary prerequisites described in Installation Instructions for Gazebo, then you can proceed with the setup instructions on this page.

Install prerequisites on Ubuntu

  1. Install the required dependencies for Revolve:
    sudo apt-get install cmake                        \
                         libprotoc-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       \
                         python          

Install prerequisites on Mac OS X

  1. Install most of the dependencies using brew:
    brew install boost \
                 cmake \
                 protobuf protobuf-c

Set up Revolve

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`
  1. Clone the Revolve project locally:

    cd $SIM_HOME
    git clone https://github.com/ci-group/revolve.git
  2. Build the C++ part of the project:

    cd $SIM_HOME/revolve
    mkdir -p build && cd build
    cmake ../ \
          -DCMAKE_BUILD_TYPE="Release"
    make -j4
  3. Create a Python virtual environment:

    cd $SIM_HOME/revolve
    virtualenv --python python3 .venv
    source .venv/bin/activate

    Note: Keep in mind that your virtual environment should be set for Python 3, not Python 2.

    After you source the Python virtual environment, on the very left side of the active line in your terminal, the (.venv) marking will appear. This designates that the virtual environment is active. In all future terminal commands that should be run from the virtual environment, this marking will be added at the beginning of the command to acknowledge this, but (.venv) should not be copied with the command!

    (.venv) pip install -r requirements.txt
  4. Verify the build

    (.venv) ./revolve.py

    The result of this command should be visible in the terminal:

    Created Supervisor with:
            - manager command: None ['--restore-directory', 'output/20190211165349']
            - gazebo command: gzserver ['--verbose']
            - world file: worlds/gait-learning.world
            - gazebo plugin dir: .../projects/revolve-simulator-upgraded/revolve/build/lib
            - gazebo models dir: .../projects/revolve-simulator-upgraded/revolve/models
    
    NOTE: launching only a simulator, not a manager script!
    
    Launching the simulator...
    [simulator-launch] Gazebo multi-robot simulator, version 6.5.1
    [simulator-launch] Copyright (C) 2012-2015 Open Source Robotics Foundation.
    [simulator-launch] Released under the Apache 2 License.
    [simulator-launch] http://gazebosim.org
    [simulator-launch] 
    [simulator-launch] Gazebo multi-robot simulator, version 6.5.1
    [simulator-launch] Copyright (C) 2012-2015 Open Source Robotics Foundation.
    [simulator-launch] Released under the Apache 2 License.
    [simulator-launch] http://gazebosim.org
    [simulator-launch] 
    [simulator-launch] [Msg] transport::init() host:0
    [simulator-launch] [Msg] transport::init() hostlocalhost:11345
    [simulator-launch] [Msg] Waiting for master.
    [simulator-launch] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
    [simulator-launch] [Msg] Publicized address: 192.168.1.47
    [simulator-launch] World plugin loaded.
    

    You can stop the executin with Control+C keyboard shortcut.

  5. Verify the build with a visualised simulator

    (.venv) ./revolve.py --simulator-cmd=gazebo

    The result of this command should be:

    Created Supervisor with:
            - manager command: None ['--simulator-cmd=gazebo', '--restore-directory', 'output/20190211165447']
            - gazebo command: gazebo ['--verbose']
            - world file: worlds/gait-learning.world
            - gazebo plugin dir: .../projects/revolve-simulator-upgraded/revolve/build/lib
            - gazebo models dir: .../projects/revolve-simulator-upgraded/revolve/models
    
    NOTE: launching only a simulator, not a manager script!
    
    Launching the simulator...
    [simulator-launch] Gazebo multi-robot simulator, version 6.5.1
    [simulator-launch] Copyright (C) 2012-2015 Open Source Robotics Foundation.
    [simulator-launch] Released under the Apache 2 License.
    [simulator-launch] http://gazebosim.org
    [simulator-launch] 
    [simulator-launch] Gazebo multi-robot simulator, version 6.5.1
    [simulator-launch] Copyright (C) 2012-2015 Open Source Robotics Foundation.
    [simulator-launch] Released under the Apache 2 License.
    [simulator-launch] http://gazebosim.org
    
    [simulator-launch] [Msg] transport::init() host:0
    [simulator-launch] [Msg] transport::init() hostlocalhost:11345
    [simulator-launch] [Msg] Waiting for master.
    [simulator-launch] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
    [simulator-launch] [Msg] Publicized address: 192.168.1.47
    [simulator-launch] World plugin loaded.
    libpng warning: iCCP: known incorrect sRGB profile
    

See next: Tutorials


_________________
/ Premature      \
| optimization   |
| is the root of |
| all evil.      |
|                |
\ -- D.E. Knuth  /
-----------------
    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
Clone this wiki locally