Install on raspberry: Difference between revisions
Line 67: | Line 67: | ||
libv4l-dev | libv4l-dev | ||
python-dev | python-dev | ||
sudo apt-get install cmake libopencv-dev libreadline-dev libudev-dev libusb-dev libv4l-dev python-dev | |||
and maybe | |||
boost | |||
=== Get Mobotware === | === Get Mobotware === |
Revision as of 12:25, 1 May 2015
Short note on installation of (parts of) mobotware on Raspberry Pi
Prerequisite
First install 2012-10-28-wheezy-raspbian on the raspberry Pi flashdisk and expand the flash-disk to at least 4GB - see the instructions on http://elinux.org/RaspberryPiBoardBeginners
Assuming this is up and running - with internet access
Configure
Using raspi-config enable
Expand Filesystem Enable Camera Set hostname Enable SSH Enable i2c - load module as default Disable Serial login
reboot
Login
login as pi, password raspberry
add a user called local
sudo adduser local sudo usermod -a --groups adm,cdrom,sudo,audio,video,plugdev,games,users,netdev,input,spi,gpio local
switch user to local, and ensure groups are OK, and network is running
su - local groups ifconfig
Note the inet address.
Now it is possible to login from network.
Do NOT login as root
Packages needed for Mobotware RHD/MRC
The following packages needs to be installed - e.g. using apt-get like:
sudo apt-get install subversion
Package list:
subversion (to fetch mobotware from SVN) libexpat-dev (RHD) pciutils-dev (RHD) libncurses-dev (RHD) bison (MRC) libsdl-dev (MRC) telnet (MRC test) sudo apt-get install subversion libexpat-dev pciutils-dev libncurses-dev bison libsdl-dev telnet
Additional for AURS (e.g. camera server)
Package list
cmake libopencv-dev libreadline-dev libudev-dev libusb-dev libv4l-dev python-dev sudo apt-get install cmake libopencv-dev libreadline-dev libudev-dev libusb-dev libv4l-dev python-dev
and maybe
boost
Get Mobotware
Get and unpack mobotware - you need the following directories only:
mobotware/aumat mobotware/mrc mobotware/rhd mobotware/build
The rest of the directories can be deleted, so can rhd/branches
Test Gstreamer
Test to get camera working using gstreamer
Package list
alsa-tools gstreamer0.10-alsa gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-base gstreamer0.10-tools
- did not help - neither auv4lgst nor VLC can capture images
v4l-compatibility seems OK
Build
Build the needed parts of mobotware, e.g.:
cd ~/mobotware/aumat/trunk make cd ../../rhd/trunk make cd ../../mrc/trunk make
In this order
Then collect the configuration and binary files in a test directory
Test
make a test directory and fill it with the needed configuration and binary files, e.g.
mkdir live cd live cp -r ~/mobotware/build/config/ROBOT_TYPE/* . ln -s ~/mobotware/rhd/trunc/build/bin/rhd . ln -s ~/mobotware/rhd/trunk/build/bin/rhdtest . ln -s ~/mobotware/mrc/trunk/mrc/mrc . echo "" >calib/wdssparam.dat
You now need to modify the rhdconfig.xml file: Change the path to plugins, using e.g. nano
nano -w rhdconfig.xml
Change the line (assuming you use the default pi user)
from: <plugins basepath="/usr/local/smr/lib/rhdplugin/"> to: <plugins basepath="/home/pi/mobotware/rhd/trunk/build/lib/rhdplugin/">
In the rhdconfig.xml there is already a number og plugins, this list need to be updated to your configuration.
To test if the RHD is running you may just change the attribute critical="true" to critical="false", the RHD will then continue even if the plugin fails to initialize. If some plugin is not found - e.g. maestro12ch.so.1 (it is not compiled by default) - then delete it from the rhdconfig.xml file, or change enable="true" to enable="false" for this plugin.
The file calib/robot.conf needs update too. You may use the configuration files in mobotware/build/config for inspiration
Now start the RHD (in the live directory):
./rhd
It should end by saying "RHD is running", else check the rhdconfig.xml as above.
Open a new terminal tab and run rhdtest to see if it is alive:
./rhdtest
And type
connect
You should now see a list of variables, where at least the Tick is updating.
Stop the rhdtest with ctrl-c
MRC test
Start the MRC (while the RHD is running) using socket interface:
./mrc -t1
In another terminal window use telnet to connect to the MRC
telnet localhost 31001
MRC commands like
eval $time
Should now be avilable
If all this is OK, then the raspberry Pi is running, and you only need to connect it to your robot througt an appropriate set of rhd plug-ins and make a MRC script to make it run.
Performance
The RHD and MRC running in idle with an update rate of 100 HZ is consuming about 3-4% CPU load each.