Install on (K)UBUNTU: Difference between revisions

From Rsewiki
Line 104: Line 104:
'''startup files'''
'''startup files'''


Make a script - here mercury.init - in /etc/init.d and make it executable
Add a script to start rhd in the file /etc/rc.local


/etc/init.d/mercury.init:
/etc/rc.local:


  # script to start mercury robot
  #!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
  #
  #
  # start rhd
  # start rhd
  export LD_LIBRARY_PATH="/usr/local/lib"
  export LD_LIBRARY_PATH="/usr/local/lib"
  export PATH="$PATH:/usr/local/bin"
  export PATH="$PATH:/usr/local/bin"
  rhd /usr/local/bin/rhdconfig/rhdconfig.mercury.xml >/home/chr/log/rhd.out
  rhd /usr/local/bin/rhdconfig/rhdconfig.mercury.xml 1>/home/chr/log/rhd.out 2>/home/chr/log/rhd.err &
  aukeeper -a -s /home/chr/live/aukeeper.ini >/home/chr/log/aukeeper.log
  #aukeeper -a -s /home/chr/live/aukeeper.ini >/home/chr/log/aukeeper.out &
 
  #
then run:
  exit 0
cd /etc/init.d/
  sudo chmod +x mercury.init
  sudo update-rc.d mercury.init defaults


==Test==
==Test==
(to be continued with test and example instructions)
(to be continued with test and example instructions)

Revision as of 07:22, 5 June 2011

This is intended as a guidance to install MOBOTWARE

The platform tested is KUBUNTU, but should be much the same on UBUNTU.

Sofar only 32-bit LINUX distributions is tested successfully.

KUBUNTU version 10.4/10.10

(Version 11.04 of UBUNTU, KUBUNTU or XUBUNTU do not support USB-webcam until a new vesion of campool plug-in is generated.) (do NOT install the 64 bit version of - most works, but there are unsolved issues)

After successfully installing KUBUNTU, install the following packages

e.g. install a package from the command-prompt like:

$ sudo apt-get install cmake

Needed packages:

- subversion
- gcc
- g++
- cmake
- doxygen  (for documentation only)
- libcv-dev
- libhighgui-dev (to run (and compile) client)
- libraw1394-dev
- libdc1394-22-dev
- libpng-dev
- libexpat-dev
- ncurses-dev
- pciutils-dev
- libreadline-dev
- libsdl-dev
- bison (for MRC)
- icedtea6-plugin  (to run MARG)
- libusb MUST be version 1.0.3 or better (to run Kinect only)
- ffmpeg (to convert a recorded image sequence to a video - see camera server)

If your distribution (like UBUNTU 10.10) has libusb version 1.0.0, you must install libusb from the libusb-1.0 homepage http://www.libusb.org/wiki/libusb-1.0 .

A bit of the Kinect code needs G++ compiler version 4.4 (or newer), this should be no problem on newer linux installations, but on our Jensen and Nyquist servers the default compiler is not version 4.4, so a nickname is generated g++44 to solve this issue, you should either change the g++44 to g++ in the Makefile (in the aukinect subdirectory) or make a link:

sudo ln -s /usr/bin/g++ /usr/bin/g++44

SVN Source

Get the source from our repository:

You need logon access to timmy.elektro.dtu.dk - talk to Nils Nielsen building 326.

make a directory for the mobotware:

mkdir ~/mobotware
cd ~/mobotware

Get the source (checkout)

svn co svn+ssh://[timmy username]@timmy.elektro.dtu.dk/home/project-users/rse/svnrepo .

You will need to supply password 3-4 times!, to avoid this you may look at RSE SVN SSH shared keys

Prepare to compile

Some of the current cameradrivers are not compatible with latest firewire drivers in ubuntu, so disable, as instructed in AU Robot Servers section installation without FIREWIRE

goto the created mobotware directory and make the package

make

This should now compile the set of needed libraries and applications (some need a "make" in its own subdirectory)

Maintain SVN source

New version is fetched from command prompt by:

cd ~/mobotware
svn update

When you have changed a file send it back to the svn-repository from the directory with the file one of the parent folders known to svn (svn will ask for a note for the change log):

svn commit

To add a new set of files, just make a new set of source files - preferably in a new directory (inside the mobotware file tree) - and add the new directory by (e.g. called foo):

svn add foo
A         foo
A         foo/Makefile
A         foo/bar.cpp
A         foo/bar.cpp~
A (bin)   foo/bar.o

This adds the directory and all the files in it, if too many files were added the surplus can be removed by e.g.:

svn rm --force foo/bar.cpp~ foo/bar.o

Then the additions must be comittet to go to the repository

svn commit

XUBUNTU

Experiments of running XUBUNTU on the robot (mercury) on a 4GB flash disk

startup files

Add a script to start rhd in the file /etc/rc.local

/etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# start rhd
export LD_LIBRARY_PATH="/usr/local/lib"
export PATH="$PATH:/usr/local/bin"
rhd /usr/local/bin/rhdconfig/rhdconfig.mercury.xml 1>/home/chr/log/rhd.out 2>/home/chr/log/rhd.err &
#aukeeper -a -s /home/chr/live/aukeeper.ini >/home/chr/log/aukeeper.out &
#
exit 0

Test

(to be continued with test and example instructions)