Player stage with the Khepera III
Contents |
Installing Player/stage on the computer
We assume the computer is running Ubuntu 9.10 (Karmic Koala). The instructions for other distributions should be similar. Instructions for Mac OS X are added. (from Installing Player Stage in Ubuntu)
Installing the packages
Run the following command:
sudo apt-get update sudo apt-get install autotools-dev build-essential cmake cpp libboost-signals1.40.0 libboost-signals1.40-dev libboost-thread1.40.0 libboost-thread1.40-dev libcv1 libcv-dev libgnomecanvas2-0 libgnomecanvas2-dev libgsl0-dev libgtk2.0-dev libjpeg62-dev libtool libxmu-dev swig freeglut3 freeglut3-dev libfltk1.1 libfltk1.1-dev libltdl7 libltdl7-dev libpng12-0-dev libpng12-0 libswscale-dev libraw1394-dev libdc1394-22-dev libmagick++ libmagick++-dev libmagickcore-dev libmagickwand-dev libhighgui-dev libcvaux-dev
update for Ubuntu 10.10
Player dependencies:
sudo apt-get install autotools-dev build-essential cmake cpp libboost-signals1.42.0 libboost-signals1.42-dev libboost-thread1.42 libboost-thread1.42-dev libcv2.1 libcv-dev libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-dev libgnomecanvas2-0 libgnomecanvas2-dev libgsl0-dev libgtk2.0-dev libjpeg62-dev libtool libxmu-dev swig
Stage dependencies;
sudo apt-get install freeglut3 freeglut3-dev libfltk1.1 libfltk1.1-dev libltdl7 libltdl7-dev libpng12-0-dev libpng12-0
This will install a whole bunch of libraries and tools. (Approximately 100MB)
Mac users: Install the boost libraries
Create symbolic link
sudo mkdir -p /usr/X11R6/lib/X11/ sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
Mac users:sudo ln -s /usr/X11/share/X11/rgb.txt /usr/X11R6/lib/X11/
Get the necessary files
wget http://sourceforge.net/projects/playerstage/files/Stage/2.1.1/stage-2.1.1.tar.gz/download wget http://sourceforge.net/projects/playerstage/files/Player/2.1.3/player-2.1.3.tar.gz/download
Add the following to your ~/.bashrc file:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Mac users:export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
Mac users:install gtk2 using port
Install the files by running
tar zxvf player-2.1.3.tar.gz tar zxvf stage-2.1.1.tar.gz cd player-2.1.3 ./configure make sudo make install cd ../stage-2.1.1 ./configure make sudo make install
Get the Khepera III configuration
We have set up an SVN repository for the default Khepera III configuration needed for Player/stage. Run the following command to checkout the needed files anonymously (read-only):
svn co https://como.vub.ac.be/svn/Robotics/KheperaIII/Player_stage/
CoMo members can do the following or specify their username in the above command for read-write:
svn co https://como.vub.ac.be/svn/Robotics/
Following files should now be available:
| Filename | Description |
|---|---|
| on_pc/KheperaIII.cfg | Player server configuration file |
| on_pc/kheperaIII.inc | Definitions of robot devices |
| on_pc/kheperaIII.world | Simulation parameters |
| on_pc/map.inc | Definitions of the map model |
| on_pc/bitmaps/cave.png | map of the virtual world |
| on_pc/bitmaps/kh3.png | Image of the virtual Khepera III |
Additionally, to test your Khepera-simulation, a very simple obstacle avoidance program is available:
| Filename | Description |
|---|---|
| sonar/sonarobstacleavoid.cc | A very simple obstacle avoiding program |
Do NOT download these files from the K-Team server because they contain errors. The files in the SVN version have been corrected and work!!!
To compile this simple program, just use
make
Running the program is done by first starting the server
player KheperaIII.cfg &
And then the program, which will connect to the server
./sonarobstacleavoid
Something similar to this should show up (although with a different map and only one Khepera):
The configuration of the sensors is as follows:
Installing Player/stage on the Khepera
| Filename | Description |
|---|---|
| on_kh3/kheperaIII.cc | |
| on_kh3/kheperaIII.h | |
| on_kh3/Makefile | |
| on_kh3/KheperaIII.cfg | |
| on_kh3/KheperaIII.so | |
| on_kh3/libltdl3_1.5.10-r3_armv5te.ipk | |
| on_kh3/libstdc++6_4.1.1-r16_armv5te.ipk | |
| on_kh3/player_2.1.1-r0_armv5te.ipk |