wiki:ARMSimulatorInstallation

Installation Instructions

System Requirements

The simulator is built on top of the  gazebo simulator package in  ROS. The ROS website lists  system requirements, although the main requirement for rendering is a graphics card that supports OpenGL 3D accelerated rendering. Basic computing requirements are a quad-core CPU with a clock speed approaching 3.0 GHz. This will provide update rates ~0.4x real-time. Dual-core processors will run at approximately half that update rate. Memory should be at least 2GB, and a minumum of 10GB of additional hard drive space is recommended.

Make sure that the accelerated hardware drivers for the graphics card are installed.

These instructions assume you are running on Ubuntu 10.04, either 32 or 64 bit. They should also work for Ubuntu 9.10, but have not been tested on 9.10. Ubuntu 10.10 is not currently supported by ROS, and will not build out of the box.

Virtual Machines

Due to the simulation's use of direct rendering for visualization, virtual machines will run much more slowly than running the operating system natively on your computer. We suggest installing your OS natively, but have seen limited success with Ubuntu 10.04 32bit in VirtualBox running under Windows.

INSTALLING ROS

This installs ROS system wide.

sudo sh -c 'echo "deb http://code.ros.org/packages/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://code.ros.org/packages/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-cturtle-ros-release ros-cturtle-pr2all python-setuptools qt4-dev-tools libqt4-core libconfig++8-dev libqt4-dev sip4 libconfig8-dev libgsl0-dev
sudo easy_install -U rosinstall

INSTALLING THE SIMULATOR

These instructions will install the simulator for the user account used during the install since it uses the home directory and configuration files of the current user.

mkdir ~/arm_simulator
cd ~/arm_simulator 
svn export http://svn.thearmrobot.com/darpa_arm_sim_servers/external-re2darmSim.rosinstall
rosinstall --delete-changed-uris ./ /opt/ros/cturtle/
rosinstall --delete-changed-uris ./ ./external-re2darmSim.rosinstall
echo export ROS_PACKAGE_PATH+=:$(pwd)/stacks                  >> ~/.bashrc
echo export ROS_RECORD_EXECUTABLE_LOCATION=$(which rosrecord) >> ~/.bashrc
echo source $(pwd)/setup.bash >> ~/.bashrc
source ~/.bashrc

BUILDING THE SIMULATOR

cd ~/arm_simulator/stacks/darpa_arm_sim_servers
rosmake re2gazeboPatch
rosmake

UPDATING

To get any changes that have occurred to the software, use svn update to download the current version of the code, and then rebuild:

cd ~/arm_simulator
rosinstall
rosmake SimRobot

TROUBLESHOOTING

  • Make sure that the accelerated hardware drivers for the graphics card are installed.
  • If any packages are missing in the above rosmake command, it is possible that there is an incomplete installation of ROS or the arm_simulator tree. Make sure you have a full installation of  ROS, including all the pr2 and cutting edge stacks, and do an rosinstall in the ~/arm_simulator directory to grab the latest code.
  • If you are running under a virtual machine and seeing gazebo crash, try running the  gazebo and  pr2_simulator tutorials. If these do not run, then either the VM setup needs to be modified or it is unable to support visualization with gazebo. The simulator can be run  headless, although this makes it difficult to visualize what is occurring within the simulation.
  • If you have problems with the display flashing, go to to the System menu from the Desktop, then Appearance, then the Visual Effects tab, and select 'None'.