****************************************************
***** Troubleshooting in Ubuntu Jaunty/Intrepid ***
****************************************************
When getting an error like this:
err: unable to open color database: No such file or directory (stage.c
stg_lookup_color)
It's because you are missing the "obsolete" rgb.txt file in the proper places
(Look for this file online), and do the following:
1) As root, copy the rgb.txt into /etc/X11/
Then
2) $ sudo mkdir -p /usr/X11R6/lib/X11
3) $ sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
Finally, take care of the proper permissions
4) $ sudo chmod 644 /etc/X11/rgb.txt
*********************************
***** Troubleshooting Gazebo ***
*********************************
After installing Gazebo (from the SVN)
while trying to run an example, such as:
$ gazebo /usr/local/share/gazebo/worlds/pioneer2dx.world
and getting this kind of error:
gazebo: error while loading shared libraries: libgazebo_server.so: cannot
open shared object file: No such file or directory
Solve with:
$ export LD_LIBRARY_PATH=/usr/local/lib
or by adding this Path to your .bashrc file
***********************************************
***** Installing Mezzanine (Video Server) ***
***********************************************
First, install these dependencies:
$ sudo apt-get install libgtk2.0-dev
$ sudo apt-get install libgtk1.2-dev
And you probably want to
$ sudo apt-get install gnome-core-devel
Then, just do (as a regular user) ...read the included README for detailed
instructions
$ make; make install
And finally,
I have the following code in my ~/.bashrc, which you can modify as needed:
# Adding executable path for mezzanine (video server)
if [[ $PATH =~ $HOME/mezzanine-0.00/bin ]]; then :
else export PATH="$HOME/mezzanine-0.00/bin:$PATH"
fi
You can test your $PATH thus:
$ . ~/.bashrc
$ echo $PATH
$ sudo echo $PATH
**** Troubleshooting:
After connecting the camera and verifying it exists as /dev/video0
When trying to start mezzanine as this:
$mezzanine --fgrab.norm NTSC
Some errors appeared, so you need:
$ sudo apt-get install libsdl1.2-dev
Then,
$ sudo apt-get install libv4l-dev
!!! However, my bug got totally fixed by using John Cumming's implementation of
Mezzanine with V4L(v.2) rather than the original one that required V4L(v.1)
**************************************************
**** Installing/Running Pyrobotics (pyro) *********
**************************************************
Very easy, to just unpack the tar.gz as root in a location
In my case, in /opt/pyrobot
then inside the pyrobot folder, just do a "make"...and that's it
To run it, use /path_to_pyrobot/bin/pyrobot
!!!! if problems, just delete the "-e" at the beginning of the scripts that have
it (in the first line)
In my case, I had to delete this "-e " from
bin/pyrobot
and
system/version
-------------------------------------------
*** Player/Stage Errors in Pyro:
With Pyro installed and running, if getting errors about "import playerc"
You need to install the python bindings from your repo: "python-playerc"
---------------------------
def set_property_int(*args): return
_playerc.playerc_simulation_set_property_int(*args)
should be:
def set_property_int(*args): return
_playerc.playerc_simulation_set_property(*args)
Solution:
Go into the source for player into:
client_libs/libplayerc/bindings/python
Then, modify the Makefile, so it installs with python (just uncomment these 2
lines:)
PYTHONINSTALL = pythoninstall
and
BUILT_SOURCES = playerc_oo.i srcbuilddirs.py
Finally, run again:
make
sudo make install
If you're missing the _playerc.so file, just copy it from the ./build directory
you are right now. For example:
sudo cp build/lib.linux-i686-2.6/_playerc.so /usr/lib/python2.6/dist-packages/
You might also want to copy the playerc.py like this:
sudo cp playerc.py /usr/share/pyshared/playerc.py
**************************************************
**** Using Player/Stage with Eclipse ***********
**************************************************
* First, add the library of playerc++ to the Linker, like this:
On the Project's Properties > C/C++ Build > Settings (Tool Settings) > GCC C++
Linker > Libraries > add "playerc++" (without the quotes)
* Setting Build flags in the Project
Open up the Project's properties > C/C++ Build > Settings (Tool Settings) > >
GCC C++ Compiler > Miscellaneous > Other flags (put the following)
-c -fmessage-length=0 `pkg-config --cflags playerc++ --libs playerc++`
* In "#include" lines i get warning "Unresolved inclusion:"
Also, in the Project's Properties, Under the point c/c++ general -> Paths and
symbols. In the tab
"includes" under GNU C++, you can add the location of the include files
/usr/local/include/player-2.1/
Then, do a right click on the Project and click "Clean Project" so all the
errors and warnings dissappear.
**************************************************
**** Using Player/Stage with Qt and Eclipse ***********
**************************************************
The GOOD way:
just add the include path of Player into the QT project file either through the
"QT Project Editor"
--- From the Qt Project Editor, you have to create a New "VARIABLE" and then
edit the variable (from the drop-down menu) and select "Include Path"
--- or manually by hand, so it reads:
INCLUDEPATH += /usr/local/include/player-2.1/
Then, for the dependency libraries, you'll have to edit the .pro file, and set
the libs with -l and the lib paths with -L, e.g.
LIBS += -L/usr/local/lib -lplayerc++
???NOTE: CFLAGS += playerc++ is not really needed!! (it works withou it)
Or you could also add a new variable "LIBS" throught the "Qt Project Editor",
and then add the necessary "values" (one at a time):
-L/usr/local/lib
-lplayerc++
then, to compile, do for example:
$ make -f Makefile.Debug
**************************************************
**** Bluetooth on the Scribbler's Fluke ********
**************************************************
After following the instructions from:
http://wiki.roboteducation.org/wiki/images/8/8e/Myro_setup_LINUX_Ubuntu.txt
Important!!!, you will need to have permissions to write in the device, like
this:
$ sudo chmod 666 /dev/rfcomm0
To automize these read/write attributes to the rfcomm device to a regular user:
Set the permissions with a custom udev rule:
$ sudo nano /etc/udev/rules.d/10-local.rules
And add:
KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users"
You would just change the GROUP to whatever group you need to give access to
rfcomm.
You're probably already in the "dialout" group (so I would choose that)
Then, just restart the udev process:
$ sudo /etc/init.d/udev restart
The following may not be necessary:
1) install the bluez-compat package with terminal
sudo apt-get install bluez-compat
2)Pair the mouse with the bluetooth manager. The manager will say that the
pairing is "successfull"
Although the mouse won't worked... this step has to be down...
3) In the terminal, type :
sudo hidd --search
You should see something like
Searching ...
Connecting to device 00:XX:XX:XX:XX:XX (your device MAC)
**************************************************
**** Python Tips ********
**************************************************
If you need to create abc.pyc -- that is, to create a .pyc file for a module
that is not imported -- you can, using the py_compile and compileall modules.
The py_compile module can manually compile any module. One way is to use the
compile() function in that module interactively:
>>> import py_compile
>>> py_compile.compile('abc.py')