1. OpenSourceRoboticsFoundation
  2. Simulation
  3. srcsim

Wiki

Clone wiki

srcsim / system_setup

Setting up a system to run SRCSim

This tutorial will walk you through the setup required to make a computer ready to run SRCSim. For more information about recommended and minimum requirements see the System Requirements page.

  1. Install the Gazebo package repository

    1. Add the Gazebo7 repository. Open a new terminal and type:

      sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'

    2. Download the signing key

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

  2. Install the SRCSim package repository

    1. Add the SRCSim repository

      sudo sh -c 'echo "deb http://srcsim.gazebosim.org/src trusty main" \ > /etc/apt/sources.list.d/src-latest.list'

    2. Download the signing keys

      wget -O - http://srcsim.gazebosim.org/src/src.key | sudo apt-key add -

      wget -O - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -

  3. Update the apt database

    sudo apt-get update

  4. Install the latest Gazebo 7 release

    sudo apt-get install gazebo7

  5. Install the SRCSim package and all its dependencies

    sudo apt-get install srcsim

  6. Use Java 8:

    echo 'export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> ~/.bashrc

    sudo update-alternatives --config java # then select openjdk8

    sudo update-alternatives --config javac # then select openjdk8

    sudo rm /usr/lib/jvm/default-java

    sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/default-java

  7. Add IS_GAZEBO environment variable:

    echo 'export IS_GAZEBO=true' >> ~/.bashrc

  8. Add ROS_IP environment variable:

    echo 'export ROS_IP=127.0.0.1' >> ~/.bashrc

  9. Change ownership of ihmc_ros_java_adapter. This ROS package requires to write some files in its installation directory at runtime. We're working on a fix for this issue. In the meantime, please change the ownership of this directory to your user.

    sudo chown -R $USER:$USER /opt/ros/indigo/share/ihmc_ros_java_adapter

  10. Copy the IHMC networking ini file

    mkdir -p ${HOME}/.ihmc; curl https://raw.githubusercontent.com/ihmcrobotics/ihmc_ros_core/0.8.0/ihmc_ros_common/configurations/IHMCNetworkParametersTemplate.ini > ${HOME}/.ihmc/IHMCNetworkParameters.ini

  11. Increase real-time scheduling priority (rtprio) for group ros, which is required by the IHMC controller. Add current user to ros group:

    sudo bash -c 'echo "@ros - rtprio 99" > /etc/security/limits.d/ros-rtprio.conf'

    sudo groupadd ros

    sudo usermod -a -G ros $USER

    Logout from your current session and log in to make sure that all these changes are in place.

  12. Download the deployed Valkyrie controller

    wget -P /tmp/ http://gazebosim.org/distributions/srcsim/valkyrie_controller.tar.gz

    tar -xvf /tmp/valkyrie_controller.tar.gz -C $HOME

    rm /tmp/valkyrie_controller.tar.gz

  13. Download all the required Gazebo models

    wget -P /tmp/ https://bitbucket.org/osrf/gazebo_models/get/default.tar.gz

    mkdir -p $HOME/.gazebo/models

    tar -xvf /tmp/default.tar.gz -C $HOME/.gazebo/models --strip 1

    rm /tmp/default.tar.gz

  14. Pre-build ihmc_ros_java_adapter. Open a new terminal and run:

    source /opt/nasa/indigo/setup.bash

    roslaunch ihmc_valkyrie_ros valkyrie_warmup_gradle_cache.launch

Test your installation

  1. Open a new terminal and type:

    source /opt/nasa/indigo/setup.bash

    roslaunch srcsim qual2.launch init:=true walk_test:=true

You should see your robot appear into the Gazebo scene. After a few seconds, the robot should approach the ground, switch to high level control, detach from the virtual harness and start walking.

Here's a video of the expected behavior.

Also, the following error message is often seen in the console. This is a severe warning when controlling a real robot but is expected when running a simulation on PC hardware.

[ERROR] [1478200728.329368274, 2.971000000]: Nov 03, 2016 7:18:48 PM us.ihmc.valkyrieRosControl.ValkyrieAffinity <init>
[ERROR] [1478200728.329423149, 2.971000000]: SEVERE: WARNING: Hyper-Threading is enabled. Expect higher amounts of jitter

Updated