Contents |
First either Gazebo-0.7 or Fedora Core 7 is out-dated. However, this article can be a good reference for learning about the old version of Gazebo.
In the MARHES lab, we have a desktop computer with Fedora 7 linux system has the Gazebo-0.7 installed. The hardware and software specifications are listed here:
| System | Fedora Core 7 | |
| Kernel Version | Kernel-2.6.23-17-88.fc7 | |
| Kernel-devel-2.6.23-17-88.fc7 | ||
| Kernel-headers-2.6.23-17-88.fc7 | ||
| GCC/G++ Version | 4.1.2/4.1.2 | |
| CPU | Intel Pentium 4 2.8GHz, 1024K L2 Cache | |
| Memory | 1GB | |
| Display Card | NVIDIA GeForce FX5200 | |
| Display Driver | NVIDIA-Linux86-173.14.18 |
Using the YUM tool of Fedora, we can install Player-2.0.4/Stage-2.0.3 /Gazebo-0.7 quickly. The operations are:
/etc/yum.repos.d/pyrobot.repo
[pyrobot]
name=Python Robotics
baseurl=http://pyrorobotics.org/pyro/fedora/$releasever/$basearch
gpgkey=http://pyrorobotics.org/pyro/fedora/RPM-GPG-KEY-dblank
enabled=1
gpgcheck=1
and then type (root permission is required)
#yum install player stage gazebo
you will see the packages information:
====================================================
| Package | Arch | Version | Repository | Size |
====================================================
| Installing: | ||||
| gazebo | i386 | 0.7.0-f7 | pyrobot | 2.5 M |
| player | i386 | 2.0.4-f7 | pyrobot | 1.9 M |
| stage | i386 | 2.0.3-f7 | pyrobot | 321 k |
| Installing for dependencies: | ||||
| freeglut | i386 | 2.4.0-11.fc7 | fedora | 142 k |
| freeglut-devel | i386 | 2.4.0-11.fc7 | fedora | 13 k |
| gazebo-ode | i386 | 0.6-f7 | pyrobot | 2.6 M |
| gsl | i386 | 1.8-3.fc7 | fedora | 761 k |
| libtool-ltdl | i386 | 1.5.22-11.fc7 | fedora | 38 k |
| wxBase | i386 | 2.8.7-2.fc7 | updates | 681 k |
| wxGTK | i386 | 2.8.7-2.fc7 | updates | 3.8 M |
| wxGTK | i386 | 2.8.3-2.fc7 | fedora | 4.3 M |
| wxGTK-gl | i386 | 2.8.7-2.fc7 | updates | 31 k |
| wxPython | i386 | 2.8.7.1-4.fc7 | updates | 11 M |
| Transaction Summary |
====================================================
However, I think, the YUM sources do not very well in checking all the dependencies of the Gazebo, so even all the above process are done without any errors, the Gazebo may possibly not work well.
Refer [1] and [2], the dependencies consist of
* giflib3g-dev
* lib3ds-dev
* libatk1.0-0
* libcfitsio-dev
* libgeos-dev
* libhdf4g-dev
* libjasper-1.701-dev
* libnetcdf++3
* libpq-dev
* libxerces26-dev
* netcdfg-dev
* python-gdal
Technical Notes:
The Gazebo-0.7 relies on the wxPython to display the GUI. Therefore, the following process illustrates how to install and configure the wxPython.
The basis of wxPython is wxWidgets/wxGTK. I use wxWidgets-2.8.10. Refer the documents [3] and [4] from the official website of wxPython, the process is:
[root@TxT1-Server wxGTK-2.8.10]# cd wxGTK-2.8.10
[root@TxT1-Server wxGTK-2.8.10]# mkdri bld
[root@TxT1-Server wxGTK-2.8.10]# cd bld
[root@TxT1-Server bld]# ../configure --prefix=/opt/wx/2.8 \
--with-gtk \
--with-gnomeprint \
--with-opengl \
--enable-debug \
--enable-geometry \
--enable-graphics_ctx \
--enable-sound --with-sdl \
--enable-mediactrl \
--enable-display \
--disable-debugreport \
--enable-unicode \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-libtiff=builtin
then we can write a simple script to accomplish the make and make install
[root@TxT1-Server bld]#vim make-sh
the script file contains:
#!/bin/sh
make $*
make -C contrib/src/gizmos $*
make -C contrib/src/stc $*
And do not forget to set the file permission:
[root@TxT1-Server bld]#chmod u+x make-sh
[root@TxT1-Server bld]#./make-sh
[root@TxT1-Server bld]# ./make-sh install
If all the work has been done smoothly, the next tip is about the configuration file for the dynamic linker /etc/ld.so.conf:
[root@TxT1-Server bld]# vim /etc/ld.so.conf
and add context "/usr/local/lib", then run command
[root@TxT1-Server bld]# /sbin/ldconfig
I use wxPython-2.8.7.1, it can be found here. I unzip the file at folder "/opt", and enter its directory named "wxPython":
cd /opt/wxPython-src-2.8.7.1/wxPython
[root@TxT1-Server wxPython]# python2.5 setup.py build_ext --inplace --debug WX_CONFIG=/opt/wx/2.8/bin/wx-config BUILD_GLCANVAS=0
you may see the information:
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GIZMOS...
running build_ext
running build_ext
running build_ext
Once the above process finishes, do not forget to set the environment variables:
export LD_LIBRARY_PATH =/ opt / wx / 2.8 / lib:$LD_LIBRARY_PATH
export PYTHONPATH =/ opt/wx /2.8/ wxPython:$PYTHONPATH
export PYTHONPATH=/usr/local/lib/python2.5/site-packages :$PYTHONPATH
Finally, we can install Gazebo-0.7 from source package now. What we should do is to enter the directory of the package and run ./configure , make && make install .
Even there was no error message while the installation of Gazebo-0.7, the following error may possibly happen when running command "wxgazebo":
\Python25\Lib\site-packages\wx-2.8-msw-unicode\wxPython\_misc.py", line 456, in <module>
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute'DateTime_GetNumberOfDaysinYear'
The solution is obtained from [5] and [6]: Go to [6], download "_misc.py" and "_core.py" files to replace the existed ones:
# cp _misc.py /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wxPython/
# cp _core.py /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wxPython/
Now we can run the "wxgazebo"" command and see how the the simulator looks like in Figure 2:
wxgazebo pioneer2at.world
[1] Player 2.0.4 / Gazebo 0.7.0 Installation on Fedora 7
[2] Player/Gazebo 0.7 under Ubuntu Dapper 6.06
[3] Installing wxPython 2.8 from Source
[4] Building wxPython 2.8 for Development and Testing
[5] http://old.nabble.com/New-here-and-having-issues-td17974470.html