Basic Mobile Robot System

From irlab
Jump to: navigation, search

Contents

Installing the dependencies

On Ubuntu 10.10 you need to install (at least) the following packages using apt-get or synaptic:

  subversion automake autoconf libtool g++ libboost1.40-all-dev libgtkmm-2.4-dev libgtkglextmm-x11-1.2-dev libxcb-render-util0-dev cmake-curses-gui libzeroc-ice3.3-java libzeroc-ice33-dev python-zeroc-ice openjdk-6-jdk liblog4cxx10-dev liblog4j1.2-java libfltk1.1-dev

e.g.

 sudo apt-get install subversion automake autoconf libtool g++ libboost1.40-all-dev libgtkmm-2.4-dev libgtkglextmm-x11-1.2-dev libxcb-render-util0-dev cmake-curses-gui libzeroc-ice3.3-java libzeroc-ice33-dev python-zeroc-ice openjdk-6-jdk liblog4cxx10-dev liblog4j1.2-java libfltk1.1-dev


You also need to install the following packages from source

CAST

CAST is our middleware package that is used for programming the robot. Download the latest svn sources using the command:

 svn co https://codex.cs.bham.ac.uk/svn/nah/cast/tags/latest

Then follow the install instructions (as appropriate) here: http://www.cs.bham.ac.uk/research/projects/cosy/cast/doxygen/manual/html/man_installation.html

Peekabot

Peekabot is the visualization tool used in the spatial.sa. It is not strictly necessary to have peekabot installed but working with the system is much easier when you see what is going on "inside" it. The homepage of peekabot can be found at http://www.peekabot.org.

Library Issues

As of 19/10/10 there is a bug in Ubuntu 10.10 that prevents Peekabot compiling without some minor edits to library files. To perform these edits you need to open the files

 /usr/lib/libgtkglextmm-x11-1.2.la
 /usr/lib/libgdkglextmm-x11-1.2.la  

and replace any occurrences of

 /usr/lib/libgdk_pixbuf-2.0.la

with

 -lgdk_pixbuf-2.0

Install

Under Ubuntu 10.10 you can install peekabot as follows (but feel free to substitute in paths that you'd rather use on your machine):

Fetch stable release source from http://www.peekabot.org/download/

 tar -jxvf peekabot-0.8.1.tar.bz2
 cd peekabot-0.8.1
 ./configure --prefix=/usr/local  
 make
 sudo make install


Cure

To build and run the spatial subarchitecture you need to have CURE installed. CURE is a software package developed at KTH aiming at providing a solution for navigation, localization and mapping. Most of the components in the version of spatial.sa that you will be working with are in fact wrappers around components in CURE. CURE also contains some nifty little helper classes for performing transformations between coordinate frames and working with matrices.

To install CURE on Ubuntu 10.10 you need to do the following:

svn co https://codex.cs.bham.ac.uk/svn/nah/cosy/development/kth/cosycure
cd cosycure
autoreconf --install 
./configure --prefix=/usr/local
make
sudo make install

This will install cosycure in the directory specified by the prefix. When you build the system, if you need to specify where CURE is installed and in the example above that would be in /usr/local.

Player

To access all(?) the robot hardware we have except cameras (so robots, lasers, etc) we use player as a hardware interface layer. The main advantage of this is that it allows us to run the system in simulation without any changes to any of the code in the system. Player can be installed thus:

Download the source for player-2.1.3 from http://sourceforge.net/projects/playerstage/files/ then

tar -zxvf player-2.1.3.tar.gz
cd player-2.1.3
./configure --prefix=/usr/local  
make
sudo make install


Stage

Stage is the simulation part of the player project. Currently the Ubuntu packages for this appear to be broken, so it must be installed from source.

Download the source for stage-2.1.1 from http://sourceforge.net/projects/playerstage/files/ then follow these steps:

tar -zxvf  stage-2.1.1.tar.gz
cd stage-2.1.1
./configure --prefix=/usr/local  
make
sudo make install

Installing the system itself

Get the system code by doing the following:

svn co https://codex.cs.bham.ac.uk/svn/nah/irlab/systems/basic-spatial


You should then be able to compile the system by doing the following:

cd basic-spatial
mkdir BUILD
cd BUILD
ccmake ..
<Hit c a couple of times to configure the code, then g to generate. The default values should be fine>
cd ..
make -C BUILD install
ant

Running the system

Assuming everything else went to plan you should now be able to run the system. Everyone has different approaches for this, but this is mine:

1. Open 4 terminals, or 4 tabs in a terminal. 2. In one terminal start player with a stage simulation configuration using the following command:

player instantiations/stage/spring-school/cogxp3-spring-school.cfg

3. In other terminal start Peekabot the following command (this is optional):

peekabot

4. In another terminal start the CAST server using the system-specific script:

./output/bin/cast-server-start

5. In the remaining terminal start the CAST client using the system-specific script and passing it the basic system configuration file:

./output/bin/cast-client-start ./instantiations/basic-spatial-system.cast

When running you should see the robot and the map it's building in Peekabot. You can drag the robot around in the Player/Stage simulation and you should see the robot move in Peekabot and the map get bigger. If you want to drive the robot around you can plug a joystick into your machine before starting the CAST client, or you playerjoy or playerv when the system is running.

Next steps

After this is all working you should take a look at (but not necessarily do the Spatial SA Tutorial (ignore the installation step as you've just done that). This covers the basic workings of the robot's mapping and movement software.

Personal tools