Gentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc



Player/Stage/Gazebo is a set of robotics control and simulation software that is not currently in Portage..
An excellent how-to can already be found at:

Portage overlay

Because Player/Stage/Gazebo don't exist as official Gentoo ebuilds (yet), before we can install Player/Stage/Gazebo, we need to create a portage overlay (if you don't have one already...).

mkdir /usr/local/portage -p

Now we obtain the necessary ebuilds

cd /usr/local && wget

(the tar.bz2 is a mini portage tree)

tar xjvf psg-portage-current.tar.bz2 && rm psg-portage-current.tar.bz2

Note: don't forget to set PORTDIR_OVERLAY="/usr/local/portage" (in /etc/make.conf)!

echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf


Compilation Note:

I was only able to get wxgazebo working properly with nVidia's GLX libraries, YMMV. Also, unless the nVidia GLX libraries are installed before the compile, it seems that even though it compiles cleanly, wxgazebo bombs out with GLX errors. However, if you switch to nVidia's GLX libraries before the compile (over xorg-x11's GLX), you might get linking errors against /usr/lib/opengl/nvidia/lib/

Assuming you're planning on installing wxgazebo:

 echo "x11-drivers/nvidia-drivers ~x86 >> /etc/portage/package.keywords"
 emerge -av x11-drivers/nvidia-drivers
 eselect opengl set xorg-x11

Setting USE Flags:

Probably you want the USE flags to persists in case of rebuilds or upgrades:

 echo "sci-misc/player gazebo" >> /etc/portage/package.use
 echo "sci-misc/gazebo 3ds" >> /etc/portage/package.use


Now for the long part, lets emerge this puppy:

emerge -av gazebo player stage

which should result in something like this:

bookoo ~ #  emerge -av gazebo player stage 
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] sci-misc/gazebo-0.6.0  USE="3ds" 0 kB [1]
[ebuild  N    ] sci-misc/player-2.0.2  USE="gazebo ieee1394 python ssl -doc -fixedtones -howl -opencv-cvs -sphinx2 -v4l -wifi" 0 kB [1]
[ebuild  N    ] sci-misc/stage-2.0.2  USE="-doc" 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
 [1] /usr/local/portage

Do you want me to merge these packages? [Yes/No] yes


If you are using a nVidia card, you should switch back to nVidia's GLX libraries

eselect opengl set nvidia


To see if things worked...


player /usr/share/stage/worlds/simple.cfg
# or as of the latest version (adjust for actual path on your machine)
PLAYERPATH=/usr/lib player /usr/share/stage/worlds/simple.cfg

You should get a windows with a top view of some terrain over a grid and a robot in red in the lower left corner.


gazebo /usr/share/gazebo/worlds/

You should get the Gazebo init messages along with some updated time info.


wxgazebo /usr/share/gazebo/worlds/  

You should see a window with some terrain, a ball, and a robot; all in 3D.


Xorg has probably changed since this ebuild was created (I have Modular Xorg 7.0) so I had to create a symlink for rgb.txt (you might not need to).

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

Otherwise, you might get

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

You might also see:

scotty ~ # player /usr/share/player/config/gazebo.cfg

* Part of the Player/Stage/Gazebo Project
* Copyright (C) 2000 - 2006 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig, and contributors. Released under the GNU General Public
* Player comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
* are welcome to redistribute it under certain conditions; see COPYING
* for details. 

error   : Couldn't find driver "gz_sim"
error   : failed to parse config file



Like it says in the documentation, depending on what is already installed on your system, Player/Stage/Gazebo may have quite a few dependencies, so emerging may take a while...

Also, using the GUI features of gazebo will require emerging it with wxPython. A detailed HowTo is available at

Retrieved from ""

Last modified: Sat, 12 Apr 2008 19:26:00 +0000 Hits: 9,196