Player/Stage on OS X 10.5 with Macports

by Carson Reynolds

Below is a quick recipe for installing and testing Player/Stage 2.0.4 on OS X 10.5 Leopard using Macports. First, if you have not already, install Macports. Once Macports is installed, from the terminal execute:

sudo port install playerstage-stage playerstage-player

At this point, I tried to launch Player/Stage, but received errors about rgb.txt:

unable to open color database /usr/X11R6/lib/X11/rgb.txt :
No such file or directory (stage.c stg_lookup_color)

To correct this problem, player/stage needs a link to the X11 color map in the place it expects:

sudo ln -s /usr/X11/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt

Now you are ready to launch and test player/stage:

player /opt/local/var/macports/software/playerstage-stage\
/*/opt/local/share/stage/worlds/simple.cfg

If you are sucessful, you should see the following window. You can drive player/stage using an example program in another terminal:

/opt/local/var/macports/software/playerstage-player\
/*/opt/local/share/player/examples/libplayerc++/laserobstacleavoid

After playing around a bit, I am sure you will agree that player/stage is the best thing going right now for open source robot simulation, control, and development.

Advertisements