1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From arsproject

Jump to: navigation, search

Contents

Robot Simulators

This page provides install tips and help to get the following robot simulators up and running.

Carmen

Installation Steps

1. Carmen installation script complains that imlib is missing. This is because the installer is looking for: imlib : libgdk_imlib.a (associated to GTK / GDK) However, RedHat's Fedora 12 release installs: libgdk_imlib.so.1.9.15 It is thus necessary to create a link "libgdk_imlib.a -> libgdk_imlib.so.1.9.15" to fool Carmen. This can be achieved by typing at the shell prompt:

    imlib : libgdk_imlib.a
    ln -s libgdk_imlib.so.1.9.15 libgdk_imlib.a

2. Install "ImageMagick". On Fedora 12 this can be done by executing:

    yum install ImageMagick

Another way to install a package is to use KPackageKit included with the KDE desktop manager included by default with the Fedora 12. KPackageKit only requires one to type in the name of the package one wishes to search/add. If found in the package repository, the user can select it and inititate the install process.

3. At the command prompt reconfigure the package build parameters by executing:

    ./configure --nojava --notcpd

4. Copy /usr/lib/gcc/i686-redhat-linux/4.4.3 to /usr/lib/gcc/i686-redhat-linux/4.4.2

5. Initally Carmen was compiled without support for the scout robot. However, it should be recompiled including scout in the list of supported robots. To do this end, use the ./configure script to build a new Makefile.

6. Install IPC manually. IPC can be obtained from http://www-2.cs.cmu.edu/~ipc. It compiles and installs cleanly in Fedora 12.

7. Remove "camera" from line 9 in the main Makefile found in CARMEN/src, if compilation errors occur due to lack of support for cameras in your operating system.

Usage

Once installation has been completed successfully, it is possible to check that the system is working using a simulated robot. To do so, execute in different shells the following commands:

    ./central &
    ./param_daemon --robot p2d8+ ../data/map1.map&
    ./simulator &
    ./robot &
    ./navigatorgui &
    ./robotgui &

These steps can be placed in a shell script file, e.g. run.sh and executed from a single shell typing './run.sh'. The code of the run.sh file is:

    #!/bin/sh
    ./central &
    sleep 1
    ./param_daemon --robot p2d8+ ../data/map1.map&
    sleep 1
    ./simulator &
    ./robot &
    ./navigatorgui &
    ./robotgui &


Similarly, a shell script to stop all Carmen process can be created. The stop.sh file is:

    #!/bin/sh
    P1=`ps -C robotgui,navigatorgui,robot,simulator,param_daemon,central -opid=`
    kill -9 $P1

Simulation Example

This section explains how to create your own simulation. As an example we will consider how to drive a robot along a square trajectory.

1. Modify file CARMEN/src/robot_main.c as follows:

1.1. Add "#include <carmen/robot_interface.h>" needed to use: carmen_robot_velocity_command(tv,rv). Here tv is the translation velocity, rv is the rotation velocity.

1.2. Modify function: int carmen_robot_run, which is called permanently within an infinite while loop in robot.c as follows: Original code:

    if (carmen_robot_sensor_tiem_of_last_update >= 0 &&...
    ...
    else if (following_trajectory)
    follow_trajectory_3d();

was replaced by:

    carmen_robot_velocity_command(1.0, 0.0); 

2. Modify Makefile in /carmen/src/robot/Makefile to include a link to libray robot_interface.a, not originally included in the executable for "robot.c", i.e.: Line 23 modified from: robot: robot.o librobot.a to: robot: robot.o librobot.a librobot_interface.a

3. Modify robot.c:

3.1. Add "#include <carmen/simulator_interface.h>" needed to use: carmen_simulator_set_truepose(point).


3.2. Modify function: int carmen_robot_run, which is called permanently within an infinite while loop in robot.c as follows: Original code: if (carmen_robot_sensor_time_of_last_update >= 0 &&... ... else if (following_trajectory)

 follow_trajectory_3d();

and replace by some other code not causing an endless loop.

4. Modify Makefile in /carmen/src/robot/Makefile to link library "libsimulator_interface.a", needed by the modified robot_main.o, which in turn is required by librobot.a, which is required by robot. This was done as follows. Line 3 modified from: LFLAGS += -lglobal -lgeometry -lbase_interface \ -llaser_interface -lparam_interface -lipc to: LFLAGS += -lsimulator_interface -lglobal -lgeometry -lbase_interface \ -llaser_interface -lparam_interface -lipc

Player-Stage-Gazebo (PSG)

Installation Steps

The following steps describe a tested installation of Gazebo (part of the Player Project) in Ubuntu 9.04.

Take in consideration that Gazebo works with many libraries and has a lot of dependencies in order to work. If you already have installed in your system any of the software below Gazebo might not work properly if they doesn't match the specified version. But it is still recommended to first try with the versions already installed, but be aware of the many possible issues regarding version incompatibilities.

1. Set the required environment variables. In order to do so, use the following commands in the shell prompt:

export PATH=/usr/local/bin:$PATH
export CPATH=/usr/local/include:$CPATH
export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

Given that these environment variables are commonly used by many installation programs, is recommended to add them in your configuration file "~/.bashrc" to make them permanent.


2. The package dependencies of all the software below are condensed here. Is probably that you already have installed many of these packages. As far we know, none of them have presented any version conflict. Use the following commands in the shell prompt to download and install the packages with the package manager "Aptitude":

sudo apt-get update
sudo apt-get install libgl1-mesa-dev libx11-dev libode0debian1 libode0-dev
sudo apt-get install libglu1-mesa-dev libglu1-xorg-dev freeglut3-dev libglu-dev 
sudo apt-get install libois-dev libcppunit-dev libxft-dev libxml2-dev wget
sudo apt-get install libxrandr-dev libfreeimage-dev nvidia-cg-toolkit tofrodos
sudo apt-get install libfreetype6-dev freeglut-dev libfltk1.1-dev zlib1g-dev
sudo apt-get install libavformat-dev libffmpegthumbnailer-dev libopenal-dev
sudo apt-get install libzzip-dev libxt-dev libxaw7-dev libxxf86vm-dev libtool
sudo apt-get install mesa-common-dev cmake cmake-gt-gui build-essential
sudo apt-get install doxygen subversion libgtk2.0-dev pkg-config automake
sudo apt-get install libboost1.40-all-dev libyaml-dev xorg-dev

Alternatively, you can use the graphical package manager "Synaptic".


3. Install Open Asset Import Library (ASSIMP) 1.1

ASSIMP (open ASSet IMPort Library) is a 3D asset import library required by Gazebo. Use the following commands in the shell prompt to download and install ASSIMP.

cd ~
wget http://downloads.sourceforge.net/project/assimp/assimp-1.1/assimp--1.1.700-sdk.zip
unzip assimp--1.1.700-sdk.zip -d assimp--1.1.700-sdk
cd assimp--1.1.700-sdk/
mkdir build
cd build/
cmake ..
make
sudo make install
sudo ldconfig


4. Install Open Dynamics Engine (ODE) 0.11.1

ODE (Open Dynamics Engine) is a rigid body dynamics library required by Gazebo. Use the following commands in the shell prompt to download and install ODE.

cd ~
wget http://downloads.sourceforge.net/project/opende/ODE/0.11.1/ode-0.11.1.zip
unzip ode-0.11.1.zip
cd ode-0.11.1/
./configure --with-trimesh=opcode --enable-new-trimesh --disable-demos --enable-shared --with-arch=nocona --enable-release --enable-malloc --enable-ou --disable-asserts --with-pic
make
sudo make install
sudo ldconfig


5. Install Fast Light Toolkit

FLTK is a cross-platform C++ GUI toolkit required by Gazebo. Use the following commands in the shell prompt to download and install Bullet.

cd ~
wget http://ftp2.easysw.com/pub/fltk/snapshots/fltk-1.3.x-r7677.tar.gz
tar xzf fltk-1.3.x-r7677.tar.gz
cd fltk-1.3.x-r7677
./configure --enable-xft
make
sudo make install
sudo ldconfig


6. Install Bullet Physics Engine 2.76

Bullet is a soft body and rigid body dynamics library required by Gazebo. Use the following commands in the shell prompt to download and install Bullet.

cd ~
wget http://bullet.googlecode.com/files/bullet-2.76.zip
unzip bullet-2.76.zip
cd bullet-2.76/


Fix some bugs in this release of bullet by downloading the sources from the subversion:

wget http://bullet.googlecode.com/svn-history/r2066/trunk/config.h.in
wget http://bullet.googlecode.com/svn-history/r2066/trunk/configure.ac
wget http://bullet.googlecode.com/svn-history/r2066/trunk/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp -O src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
wget http://bullet.googlecode.com/svn-history/r2066/trunk/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp -O src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
wget http://bullet.googlecode.com/svn-history/r2066/trunk/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp -O src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp


Open the file CMakeLists.txt in "~/bullet-2.76/" and change lines 16 and 207 to enable double precision and the installation routine:

16   OPTION(USE_DOUBLE_PRECISION "Use double precision" ON)
207  OPTION(INSTALL_LIBS "Set when you want to install libraries" ON)


Then continue with the following commands:

mkdir build
cd build/
cmake .. -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF -DGLUT_INCLUDE_DIR=Glut -DBT_USE_DOUBLE_PRECISION=ON
make
sudo make install
sudo ldconfig


7. Install Object-Oriented Graphics Rendering Engine (OGRE) 1.6.4

OGRE (Object-Oriented Graphics Rendering Engine) is a 3D rendering engine required by Gazebo. Note that the version of this package is very sensitive for Gazebo to work. Use the following command in the shell prompt to download and install OGRE with the package manager "Aptitude".

sudo apt-get install libogre-dev=1.6.4

Alternatively you can use the graphical package manager "Synaptic" with the option "Force version".

At the end of this section is an intermediate step if you also want to install "Player".


8. Install Gazebo

Use the following command in the shell prompt to download and install Gazebo.

cd ~
wget https://downloads.sourceforge.net/project/playerstage/Gazebo/0.10.0/gazebo-0.10.0.tar.bz2
tar -xjf gazebo-0.10.0.tar.bz2
cd gazebo-0.10.0/

Fix a bug by downloading a newer source from SVN:

wget http://playerstage.svn.sourceforge.net/viewvc/playerstage/code/gazebo/trunk/server/AssimpLoader.hh?revision=8529 -O server/AssimpLoader.hh
wget http://playerstage.svn.sourceforge.net/viewvc/playerstage/code/gazebo/trunk/cmake/SearchForStuff.cmake?revision=8529 -O cmake/SearchForStuff.cmake

Continue the installation

mkdir build
cd build/
cmake ..
make
sudo make install
ldconfig

If all the steps were successful, Gazebo should be installed in your machine at this point.


7.5 Optional: Install Player 3.0.1 (Before compile Gazebo)

Player communicates though a TCP connection with Gazebo and allows to control the simulated robot with a graphic interface and your mouse, keyboard and joystick. Use the following commands in the shell prompt to download and install Player.

cd ~
wget http://downloads.sourceforge.net/project/playerstage/Player/3.0.1/player-3.0.1.tar.gz
tar xzf player-3.0.1.tar.gz
cd player-3.0.1/
mkdir build
cd build/
cmake ..
make
sudo make install
sudo ldconfig

This release of Player has a known bug that can be fixed with the following commands:

cd /usr/local/include/player-3.0
sudo ln -s libplayerinterface libplayerxdr
sudo ldconfig

Then copy the config file from your personal directory to the shared directory.

sudo cp ~/playerstage/trunk/code/gazebo/trunk/player_cfgs/gazebo.cfg /usr/local/share/player/config/

After this command continue with step 7 to install Gazebo.

Usage

1. Gazebo

The Gazebo server creates graphical interface through which users can monitor the progress of the simulation. The server is initiated by specifying the "world" which must be simulated. Use the following command in the shell prompt to simulate a example.

    gazebo /usr/local/share/gazebo/worlds/pioneer2dx.world


2. Libgazebo

Libgazebo is a library that allows other programs to interact with a running simulation of Gazebo. The "Player" server uses libgazebo to send and receive commands to and from simulated devices.

In order to create a Libgazebo application, first write and compile a C program including the library "gazebo/gazebo.h".

    make test.cc

Then start the simulation server with the desired world.

    gazebo test.world

And run the program which sends the instructions to the simulated device.

    ./test


3. Player

If you installed Player before Gazebo you can use it to move the robots in the examples.

First start the simulation server (Gazebo) and the communication server (Player).

    gazebo /usr/local/share/gazebo/worlds/pioneer2dx.world
    player /usr/local/share/player/config/gazebo.cfg

After player starts, you can use "playerv" to move the robot with your mouse or "playerjoy" to move the robot with your keyboard or joystick.

    playerv

Or

    playerjoy


4. Troubleshooting

  • If gazebo can't find ogre, set <ogrePath>/usr/lib/OGRE</ogrePath> in the file "~/.gazeborc"

Alternatively, in the same location of the file ".world" you can create a file "plugins.cfg" containing the following lines:

    PluginFolder=/usr/lib/OGRE
    Plugin=RenderSystem_GL.so
  • If gazebo can't load the models, make a symbolic link to "/usr/local/share/gazebo/worlds/models/" in the folder containing the file ".world".
  • If gazebo can't find the instance of "iface" modify the file ".world" to match the names of the models.

Alternatively, use a simbolic link after each execution, like:

    ln -s /tmp/gazebo-USER-0/position.pioneer2dx_model\:\:position_iface_0 /tmp/gazebo-USER 0/position.pioneer2dx_model1::position_iface_0

Where "USER" is your linux session name.

Simulation Example

Open Dynamics Engine (ODE)

Installation Steps for Windows

The following steps describes how to intall ODE 0.11.1 in Windows XP with Code::Blocks 8.02.

Note that these steps don't describe how to install "Code::Blocks".

1. Install ODE 0.11.1

1.1 Download ode-0.11.1.zip from http://downloads.sourceforge.net/project/opende/ODE/0.11.1/ode-0.11.1.zip

1.2. Decompress the file ode-0.11.1.zip onto the top of the C drive "c:\ode-0.11.1\".

1.3. Create the workspace for Code::Blocks with premake4.exe with the following commands in the prompt:

cd c:\ode-0.11.1\build
premake4.exe --with-demos --cc=gcc --os=windows codeblocks

1.4. Check if the folder "codeblocks" was created inside the folder "build": "c:\ode-0.11.1\build\codeblocks"


2. Build a workspace with Code::Blocks 8.02

2.1. Start Code::Blocks

2.2. Open the file "c:\ode-0.11.1\build\codeblocks\ode.workspace"

2.3. Set "DebugDoubleLib" as the build target (compiling with double precision and using static libraries). Goto menu "Build", then click on "Select target" and choose "DebugDoubleLib".

2.4. Build the workspace. Goto menu "Build" and click on "Build workspace".

2.5. Check if the executable files of demonstration programs were generated in the folder "c:\ode-0.11.1\lib\DebugDoubleLib"

2.6. Execute any binary, e.g. "c:\ode-0.11.1\lib\DebugDoubleLib\demo_buggy.exe"

Installation Steps for Linux

The following steps describes how to intall ODE 0.11.1 in Ubuntu 9.04 with Code::Blocks.

Note that these steps doesn't describe how to install "Code::Blocks".

1. Install the required packages

sudo apt-get update
sudo apt-get install libgl1-mesa-dev libx11-dev
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev


2. Install ODE 0.11.1

cd ~
wget http://downloads.sourceforge.net/project/opende/ODE/0.11.1/ode-0.11.1.zip
unzip ode-0.11.1.zip
cd ~/ode-0.11.1/
./configure --enable-double-precision --with-trimesh=opcode --enable-new-trimesh --enable-shared --enable-release
make
sudo make install
sudo ldconfig


3. Download Premake 4.2.1

cd ~
wget http://downloads.sourceforge.net/project/premake/Premake/4.2.1/premake-4.2.1-linux.tar.gz
tar xzf premake-4.2.1-linux.tar.gz
mv ~/premake4 ~/ode-0.11.1/build/


4. Create the workspace for Code::Blocks with Premake

cd ~/ode-0.11.1/build
./premake4 --with-demos --cc=gcc --os=linux codeblocks


5. Build a workspace with Code::Blocks 8.02

5.1. Start Code::Blocks

5.2. Open the file "~/ode-0.11.1/build/codeblocks/ode.workspace"

5.3. Set "DebugDoubleLib" as the build target (compiling with double precision and using static libraries). Goto menu "Build", then click on "Select target" and choose "DebugDoubleLib".

5.4. Build the workspace. Goto menu "Build" and click on "Build workspace".

5.5. Check if the executable files of demonstration programs were generated in the folder "~/ode-0.11.1/lib/DebugDoubleLib"

5.6. Execute any binary, e.g.

    ~/ode-0.11.1/lib/DebugDoubleLib/demo_buggy

Usage

ODE is a platform independent library for simulating rigid body dynamics and it's not attached to any specific 3D render engine.

In order to create an ODE application, first write and compile a C/C++ program including the library "ode/ode.h" and a render engine, like the one that is available with ODE "drawstuff/drawstuff.h".

    make test.cpp

Is easier if you use Code::Blocks and you base in the previously created workspace.

Then run the simulation. The same application can be compiled in Windows or Linux if you use the corresponding Code::Block workspace.

    test.exe

Or

    ./test

Simulation Example


Microsoft Robotics Developer Studio (MRDS)

MRDS 2008 R3 combines in one package all the features contained in the previous different editions (Express, Standard and Academic), at no charge for the user. However, it is not open source, and usage different than personal or academic is restricted by certain license terms.

MRDS (ex MSRS, MicroSoft Robotics Studio) runs on Windows XP, Vista and 7. Although 64 bits versions are supported, there have been some issues (as seen in the official forums) so 32 bits is your best option.

Installation

Note: these instructions have been tested on two notebooks (HP Pavilion, Lenovo ThinkPad) running Windows 7 Professional 32-bits, with a minimum of 2 GB of RAM and Intel processor with 2 CPU cores.

Visual Studio

If you plan to manually code new services, edit existing ones, or use VisualStudio in any way related to MRDS, you must install it before. You can find a free version ("Express Edition") for C# development here

Steps

Remember this software only works in Windows!

  1. Download the installer (444.1 MB) from (hyperlinks may change; try them in the following order)
    1. http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=c185a802-5bbe-4f28-b448-aefe63a7eff7
    2. http://go.microsoft.com/fwlink/?LinkID=190572
    3. http://www.microsoft.com/robotics/#GetIt
  2. Execute Microsoft Robotics Developer Studio 2008 R3.exe
  3. View the required software that is missing from your PC. If you do not have some of them already installed, the setup will do it for you. Just click Install and the necessary packages will be extracted and installed in minutes. The whole list is
    1. Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
    2. Microsoft XNA Framework 2.0
    3. NVIDIA PhysX System Software
    4. Microsoft CCR and DSS Runtime 2008 R3
  4. InstallShieldWizard: “Extracting Microsoft Robotics Developer Studio 2008 R3.msi”
  5. Click Next
  6. License agreement: select I accept and click Next
  7. Privacy
    1. Provide feedback to Microsoft: it’s up to you.
    2. Automatically check for updates: Yes
    3. click Next
  8. Setup type: select Complete, click Next
  9. Click Next
  10. Click Install
  11. Wait for the process to complete; it shouldn’t take more than than 15 minutes. The wizard installs DirectX 9 too, without a user prompt.
  12. Click Finish

Build included samples

  1. Go to "Home / All Programs / Microsoft Robotics Developer Studio 2008 R3 / Build All Samples"
  2. A command window will show up. While samples are being compiled, red and yellow errors/warnings may be printed, which is normal, so don’t get scared if it happens. On a fast computer, it takes less than 3 minutes.
  3. Hit any key to finish, and the window will close.

That’s it!

Usage

There are several ways to start a simulation:

  • DSS Command Prompt: creates a DSS Command Prompt (window), which is different from the Windows Command Line (cmd.exe). From this console, you are able to execute the programs related to DSS. Notice that syntax is not exactly the same, and that the working directory is where you installed MRDS. To use this feature access, go to "Home / All Programs / Microsoft Robotics Developer Studio 2008 R3 / DSS Command Prompt".

Since MRDS's architecture is based on web services (which will run in localhost in the simpler case), the main GUI is accessible with a browser.

Screenshots:

File:MRDS-run-DSS-node.png

File:MRDS-web-home.png

File:MRDS-web-control-panel.png

File:MRDS-web-service-directory.png

Simulation Example

To test the installation and execute one of the included samples (Pioneer 3 DX robot)

  1. Go to "Home / All Programs / Microsoft Robotics Developer Studio 2008 R3 / Visual Simulation Environment 2008 R3 / Pioneer 3 DX Simulation".
  2. A command window will appear, displaying "Rebuilding contract directory cache. This will take a few moments ...". That will happen every time you make changes to contracts (something more sophisticated that you'll later on).
  3. If Windows Firewall is enabled, it will warn you about the software. Check both types of networks and click Allow.
  4. The command window will start to print lines as it starts some components (we will explain them later). Within a minute, two additional windows will show up: the Visual Simulation Environment interface and a Dashboard.
  5. The Dashboard allows the user to control the robot.
    1. Click Connect to enable the communication (bidirectional) between the robot and the GUI. Two lines will appear in the Service Directory list
    2. Double click on (P3DXMotorBase) /simulateddifferentialdrive/...
    3. In the Differential Drive section, Motor will appear as On.
    4. Click Drive and then again and hold on the crossed circle. Move the mouse and the robot will follow yours orders.
    5. Arrange the Dashboard and the VSE windows side-by-side, so you can see the Pioneer moving.
  6. The VSE controls the simulation. While it may look simple, many things can be done with it.
    1. Click Camera, and then Robocam to switch the view to the webcam located on top of the Pioneer.
    2. With the Dashboard, drive towards the sphere: yes, you can interact with the objects!
    3. Now click Render and then Physics. See what happens.
  7. Close the VSE window (or the command window, but not the Dashboard) and everything will shutdown cleanly.

Project Links


MediaWiki Useful Links

MediaWiki has been successfully installed.

Consult the User's Guide for information on using the wiki software.

Getting started

Project Logo

Click on the following image to upload a new version of the PNG logo image for your project:

Image:MediaWikiSidebarLogo.png

Personal tools