1. Pyro 5 Installation

1.1. Linux

1.1.1. Ubuntu 10.10

Does not work with Python 3.

  1. sudo apt-get install libjpeg62-dev swig

  2. svn co pyrobot

  3. cd pyrobot

  4. make (answer 'y' only to those things you need/want; enter 2.6 for Python version number)

  5. bin/pyrobot

Example "make config" session:

$ make
Makefile:7: Makefile.cfg: No such file or directory
Checking for versions of Python...

This is the script for installing Pyro, Python Robotics.
Pressing ENTER by itself will accept the default (shown in brackets).

Please answer the following questions either by supplying a complete
answer, or by pressing ENTER to accept the default. This uses the
'locate' command on systems (where available) to search for the best
possible answer. If there is no default, you should enter a valid
answer or 'none'.

1. Python version number?
Default = [3.1]:  2.6
2. Where are Python's include files?
Looking for 'include/python2.6'...
Default = [/usr/include/python2.6]:  
3. What is Python's binary? (enter path and name)
Looking for 'bin/python2.6'...
Default = [/usr/bin/python2.6]:  
4. Where is the X11 include directory (need rgb.txt)?
Looking for '/usr/share/X11'...
Default = [/usr/share/X11]:  
 5. Where is the player include directory (if one, or 'none')?
Looking for 'include/player-2'...
Default = [none]:  

6. Options:
Option:    Do you want to build Image Processing? (y/n)
Default = [y]:  
Option:    Do you want to build Video for Linux 
(requires Image Processing)? (y/n)
Default = [y]:  n
Option:    Do you want to build Video for Linux2 
(requires Image Processing)? (y/n)
Default = [y]:  n
Option:    Do you want to build BT848 Video for old Pioneers 
(requires Image Processing)? (y/n)
Default = [n]:  n
Option:    Do you want to build Simulated vision from files 
(requires Image Processing)? (y/n)
Default = [y]:  y
Option:    Do you want to build Stage simulated vision 
(requires Image Processing and Player)? (y/n)
Default = [n]:  n
Option:    Do you want to build Gazebo simulated vision 
(requires Image Processing and Player)? (y/n)
Default = [n]:  n
Option:    Do you want to build Aibo vision 
(requires Image Processing)? (y/n)
Default = [y]:  y
Option:    Do you want to build Robocup simulated vision 
(requires Image Processing)? (y/n)
Default = [y]:  n
Option:    Do you want to build Splits a camera view in 2 or 4 
(requires combined camera image)? (y/n)
Default = [y]:  y
Option:    Do you want to build Stereo Vision from two cameras 
(requires 2 cameras)? (y/n)
Default = [y]:  y
Option:    Do you want to build Self-organizing Map (SOM)? (y/n)
Default = [y]:  y
Option:    Do you want to build Cluster Analysis Tool? (y/n)
Default = [y]:  y

Configuration is complete!

You just created Makefile.cfg. You can run this again, or edit
Makefile.cfg by hand if you need to.

Now you are ready to run 'make' (if you aren't already)

1.2. Mac OS X

svn co pyrobot
cd pyrobot

1.3. Windows

svn co pyrobot
cd pyrobot

2. Pyro 4 Installation

This page describes the process of installing Pyro and associated programs. This process automatically will keep Fedora Core computers up-to-date. This page describes the automatic method, followed by the manual method if that doesn't work for you.

You should get the latest Pyrobot from the CVS repository: PyroDeveloperCVS

If you find that you need any files, please check here:

2.1. New: Pyro on Windows

To run Pyro on Windows:

  1. Get Python (python2.4.1.msi), python-imaging (PIL-1.1.5.win32-py2.4.exe), and python-numeric (Numeric-23.8.win32-py2.4.exe) for Windows (available [WWW]here)

  2. Install those (either for just you, or for all users)

  3. Get a pyro-windows-*.zip file (available [WWW]here)

  4. Install in the Python\Libs\site-packages\ subdirectory.

You may also need the "python for windows extensions" package (available [WWW]here) which corresponds to your version of Python. This adds the 'win32file' which is needed for serial communication with your robot.

You can then run the file in the pyrobot/bin directory. Currently, only Pyrobot Simulator is supported. This does not include any vision code (or any C/C++ code) yet.

If you would like to run the latest Pyrobot from cvs under Windows:

  1. Get Pyrobot from CVS: PyroDeveloperCVS

  2. Put the pyrobot directory in Python\Libs\site-packages\

  3. Copy the file pyrobot\build\pyrobot to pyrobot\bin\

  4. You may also want to put the Python.exe in your PATH, as Pyrobot spawns a Python program to run the simulator

  5. Finally, create the file pyrobot\system\ with the following contents:

def version():
    return "5.0.0"

(or whatever the latest version is)

Not everything runs under Windows, so you may wish to remove the following files so they don't show up in the Server load list:

Also, any Pyrobot world that mentions a Camera you will want to remove as the C++ code doesn't currently run under Windows.

2.2. New: Pyro on Mac

See PyroMac for details of running Pyro on OSX.

2.3. Pyro RPM Repository

First, as root create the file /etc/yum.repos.d/pyrobot.repo with these contents:

name=Python Robotics

or simply, as root:

cd /etc/yum.repos.d/

Then, all you need to do is issue an install command as root:

yum install player stage gazebo pyrobot

That will find the RPMs and any other dependencies, and install them. That's it!

You should then be able to run "pyrobot" and start Gazebo, Stage, and the Khepera simulators. If you have an Sony AIBO robot dog, you can also connect onto it. FC5 Livna/Yum Changes

For graphics (see below):

yum install xorg-x11-drv-nvidia kmod-nvidia-smp

2.3.1. Gazebo Graphics

If you use ATI or NVidia graphics boards, you may wish to use the Livna kernel modules.

First, add their repositories as above, or right to /etc/yum.conf.

For Fedora Core 3:

[livna-stable] Fedora Compatible Packages (stable)

[livna-unstable] Fedora Compatible Packages (unstable)

[livna-testing] Fedora Compatible Packages (testing)

For Fedora Core 4 and greater:

[livna-stable] Fedora Compatible Packages (stable)

Next, add their public key to your rpm:

rpm --import

If you have ATI graphics card, do this:

yum install kernel-module-fglrx

If you have an NVIDIA graphics card, do this:

yum install kernel-module-nvidia

Then you only need restart X (control + alt + backspace).

If your kernel is updated, do one of these if you have a livna-based video rpm:

yum install kernel-module-ntfs-$(uname -r)
yum install kernel-module-fglrx-$(uname -r)
yum install kernel-module-nvidia-$(uname -r)

Testing: when you type "glxinfo | less" in an xterm under X, it should show "Direct rendering: Yes".

2.4. Manual installation of RPM files

You can also download the RPMs manually, and install them. First, download the rpms from . Next:

rpm -ihv *.rpm
This did not work for me. 
I downloaded all the RPM files in that directory. When I gave the command "rpm -ihv *.rpm", I got these error messages:
 warning: gazebo-0.5.2-fc3.i386.rpm: V3 DSA signature: NOKEY, key ID c17d8428
 error: Failed dependencies:
        freeglut-devel is needed by gazebo-0.5.2-fc3.i386
        gsl is needed by gazebo-0.5.2-fc3.i386
        gsl is needed by player-1.6.4-fc3.i386 is needed by player-1.6.4-fc3.i386 is needed by player-1.6.4-fc3.i386
        python-imaging is needed by pyrobot-4.0.2-fc3.i386

I interpreted "You can also download the RPMs manually, and install them" as meaning
"instead of using yum as in section 1.1". Apparently this does not give me
all the files I need. I am currently on the road and have only dialup Internet access
(and that only while running windows XP), so I cannot use yum right now.
Any suggestions would be helpful. -- MJC 

(!) You should do what rpm is telling you to do: add all of the missing dpendencies. You need freeglut-devel, gsl, and python-imaging.

In that subdirectory, you will also find the source RPMs and the SPEC files. If you make packages for another distribution or architecture, please let us know.

2.5. Pioneer

We now use Player to talk to the Pioneers. Onboard the Pioneer, you really just need the following:

  1. Python 2.2.2 or greater

  2. PIL

  3. Numeric

  4. Player-1.6.4

  5. Tkinter

You can find Player on or in

To build player:

tar xfz player-1.6.4.tgz
cd player
./configure --disable-alldriver --enable-p2os --enable-sonyevid30 --enable-canonvcc4
make install

You might have to build the Python scripts:

cd client_libs/libplayerc/bindings/python
make install

Make sure that those python bits go into the correct site-packages directory. It will use the default "python" so if you want them to go elsewhere, you can temporarily rename python to your other python version.

If you have an older Pioneer with BT848 camera:

cd pyrobot/camera/bt848

You may need a cable from your PTZ to /dev/ttyS1 on top of the computer as Player does not support the camera's PTZ command in the same manner that ActivMedia does. Thus, you will connect onto the PTZ through the serial port (/dev/ttyS1). You can make these cables (Canon and Sony have different wiring schemes), but ActivMedia will sell you these cables for about $15 each (you just need one for your camera).

/!\ WARNING: Player requires that the host computer be able to look itself up though DNS. That means that you should have appropriate /etc/resolv.conf and /etc/hosts files. If you have a DNS server that Player can't connect onto, then Player will either abort or hang for 45 seconds on startup.

The rest of this page goes through manually building the packages from source.

3. Player/Stage/Gazebo

Player, Stage, and Gazebo are three programs that Pyro can utilize. Player is an interface to robots, both real and simulated. Stage is a 2D simulator, and Gazebo is a 3D simulator. These programs are highly recommended for use with Pyro.

This section describes using the latest versions of their software.

3.1. Preliminaries for Player/Stage/Gazebo

You should have the following installed:

If necessary, you should add /usr/local/lib to /etc/ and run ldconfig as root.

If your python packages are installed in /usr/lib/, then you could do this:

mkdir -p /usr/local/lib/python2.3/
cd /usr/local/lib/python2.3/
ln -s /usr/lib/python2.3/site-packages

That will allow the packages that put items in the default Python location to do so, but they will still end up in the right place.

You could also direct the locations with a parameter to the install command, like python install --prefix=/usr/lib/python2.3/site-packages/. You would do that to every python setup command below.

To build Player/Stage/Gazeo you should have the PKG_CONFIG_PATH set so that you can find the .pc files. You may have to:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig/

before you begin (or put it in your .bashrc file)

The following will assume that you are logged in as root. If you are not, you will need to run some commands as root (for example, "make install"), Ok, let's begin the P/S/G installation.

3.2. Open Dynamics Engine

  1. install ode-0.5

    1. get it

tar xvzf ode-0.5.tgz
cd ode-0.5

We need to fix something here if you want OPCODE installed. OPCODE provides some models (e.g., terrains and roads) the collision detection library. Without OPCODE these models will run, but won't have the terrains and roads, for example. To add OPCODE:

edit config/user-settings
change the last line from:

Continue with the installation of ODE:

make configure
make ode-lib
cp -r include/ode /usr/local/include/
cp lib/libode.a /usr/local/lib/

3.3. wxPython

  1. install wxPython

  2. We used wxPython-src-

tar xfz wxPython-src-
cd wxPython-src-
make install

That will install wxWidgets. Now to install wxPython:

cd wxPython

Before I could get it to build on Redhat 9, Fedora Core 2, and Fedora Core 3, I had to edit

BUILD_GLCANVAS = 0 # If true, build the contrib/glcanvas extension module
BUILD_OGL = 0      # If true, build the contrib/ogl extension module
BUILD_STC = 0      # If true, build the contrib/stc extension module
BUILD_GIZMOS = 0   # Build a module for the gizmos contrib library

Then it would build:

python build
python install

3.4. Geospatial Data Abstraction Library

  1. Install GDAL

tar xvzg gdal-1.2.5.tar.gz
cd gdal-1.2.5
make install

3.5. GNU Scientific Library

tar xfz gsl-1.6.tar.gz
cd gsl-1.6
make install

3.6. lib3ds

This allows the "skins" to work in Gazebo.

tar xfz lib3ds-1.2.0.tgz
cd lib3d-1.2.0
make install

3.7. OpenCV

The Open Computer Vision project is used in Player.

tar xfz opencv-0.9.6.tar.gz
cd opencv-0.9.6
make install

This could have used ffmpeg; do we need that?

3.8. Gazebo


For now, you should get a version compatible with player-1.6.4. You'll find a copy in our [WWW]download area.

Later, you will be able to build from CVS. Instructions follow.

To get from CVS, first login:

cvs login

You only have to do that once.

cvs -z3 co -P gazebo
  1. install gazebo (currently, from CVS from

cd gazebo
make install

You can test this with:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
wxgazebo /usr/local/share/gazebo/worlds/

3.8.1. Troubleshooting

If that didn't work, you should make sure you have direct rendering and pbuffer support (by running glxinfo).

Some notes on Fedora Core 3 with ATI Graphics card:

You need to have "direct rendering" on to take effecient advantage of Gazebo. Otherwise, Gazebo will use software to render the scenes. Even with hardware acceleration, it may not run in real time.

To get my ATI graphics card under Fedora Core 3 to render Gazebo, I had to use the Livna kernel modules. Here are the steps:

  1. Add the following to /etc/yum.conf:

[livna-stable] Fedora Compatible Packages (stable)

[livna-unstable] Fedora Compatible Packages (unstable)

[livna-testing] Fedora Compatible Packages (testing)
  1. Install the proper kernel module:

yum install kernel-module-fglrx-$(uname -r)
  1. Restart X

To test, you can "glxinfo | less". You should see "direct rendering: Yes".

3.9. Player

Get Player from CVS:

cvs -z3 co -P player

Build and install it:

cd player
make install

If you had a previous version of Player, you may have to delete in your Python site-package directory. Try:


and if one shows up in a place like /usr/local/lib/python2.2/site-package/, you should delete it.

3.10. Stage

Get Stage from CVS:

cvs -z3 co -P stage

Build and install it:

cd stage
make install

Stage is now a Player plugin. To run, you need to set PLAYERPATH to where resides:

export PLAYERPATH=/usr/local/lib
player /usr/local/share/stage/worlds/everything.cfg

3.11. Testing

See for testing Player/Stage/Gazebo.

4. Pyro

You will need SWIG, Python Image Library, and Numeric.

4.1. Numeric

Also called numpy.

tar xfz Numeric-24.0b2.tar.gz
cd Numeric-24.0b2
python build
python install

4.2. Imaging

Also called PIL, Python Image Library

You will need tk-devel and tcl-devel for this.

yum install tk-devel tcl-devel
tar xfz Imaging-1.1.5.tar.gz
cd Imaging-1.1.5
python build
python install

4.3. Other details

You might want to look at Pyro3Installation. See PyroDeveloperCVS for details about getting CVS code.

4.4. Multiuser Robocup-Type Events

Here is an easy project: build a Gazebo or Stage world with as many robots as you have students. Start it on the server. Each student is assigned a port (or you could make files for each student with the port/hostname already defined). Then each would connect onto the server. You could:

  1. Play soccer

  2. Race to see who grabs the most pucks

  3. Play tag (if your bumpers fire, your out)

  4. Indy 500 racing

One issue with this is that you will need to be able to access each machine. If you have a firewall up, here is how to poke some holes in it. You need to edit /etc/sysconfig/iptables by adding the appropriate lines:

In RedHat 9.0, add:

-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6665:6765 --syn -j ACCEPT

In Fedora Core 2, add:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6665:6765 --syn -j ACCEPT

Related topics:

  1. DevelopmentalRoboticsSummer2002 . . . . 1 match
  2. Pyro3Installation . . . . 1 match
  3. Pyro4Installation . . . . 1 match
  4. PyroDeveloper . . . . 1 match
  5. PyroSoftware . . . . 1 match
  6. Running Pyro . . . . 1 match