Install GUI-less UBUNTU
Contents |
Introduction
This guide is a guide to install UBUNTU on a robot without GUI.
Further to install mobotware, and connect the logon and home directory to the AU server (kalman).
NB!
RTAI installation requires patching and recompiling the kernel, and the pt newest patch requires kernel version 2.6.32.11. This kernel did not compile out-of-the-box, and is postponed, as the rest of the system is from ubuntu version 11.10 with kernel version 3.0.0.15, and is therefore likely to not be compatible with kernel 2.6.32.
Project stalled (30 jan 2012) Christian
UBUNTU installation
Disk space of at least 4GB is needed, internet access for use during installation and a connected CD-drive for the initial boot.
The installation follows in general the guide in: https://help.ubuntu.com/community/Installation/LowMemorySystems
Make a UBUNTU 11.10 minimal from the page https://help.ubuntu.com/community/Installation/MinimalCD Select the x86 32bit version of ubuntu 11.10 (mobotware do not support 64bit yet)
Installed with the following selections:
- local user selected as "demo", do not use one you want to use over the network.
- Installed on entire disk (160GB and 2GB swap - swap should later be removed and disk image reduced to 4 or 8 GB)
- Language: English (UK)
- Time: UTM with local time beeing København
When asked for packages to install, just install (i.e. no GUI):
- server basis
- ssh server
Then finish and reboot.
After reboot, the default virtual screen is 7 (the not installed GUI screen), switch to virtual screen 1 by Ctrl-Alt-F1 (we will fix this later).
Login at the prompt.
install packages
Install packages like:
sudo apt-get install cmake
UBUNTU packages
Install also the following packages:
- cmake
- gcc
- g++
- make
- ncurses-dev
- libcv-dev
- libraw1394-dev (used by camera server)
- not libdc1394-dev (used by camera server)
- isOK libpng-dev (used by camera server)
- isOK libexpat-dev
- pciutils-dev
- libreadline-dev
- isOK bison (used by MRC)
- libudev-dev
- libv4l-dev (used by camera server video 4 linux 2)
- isOK pkg-config
- autofs (to mount users home-dir)
- nis (for shared files - askes for a domain while installing)
- isOK gdb (to be able to analyse e.g. core dumps)
- valgrind (to analyse for memory leaks etc.)
- apache2 (to get default web access to robot - using MARG)
- isOK lsof (to track open files - also device files)
- ssh (ssh server)
- sox (to play a waw file)
- flite (to play a text string)
- libusb-dev (mainly for kinect)
- libusb-1.0-0-dev (mainly for kinect)
- libboost-dev (for some AURS plugins)
- installed on smr10 (xubuntu-12.04) / jca
LIBUSB
Download libusb (need to be a vesion newer than 1.0.0) from http://sourceforge.net/projects/libusb/files/libusb-1.0/
unpack and in the unpacked directory:
./configure make sudo make install
PCL
Add PCL repository to source list by adding this line to /etc/apt/sources.list
deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu maverick main
then get new package list and install PCL like:
sudo apt-get update sudo apt-get install libpcl-all
Configure for kalman log-in
Copied
/etc/hosts.allow /etc/hosts.deny /etc/auto.master (NB! these auto* files must NOT be executable) /etc/auto.misc
from Bode
Make links for home directories (NB! do NOT: sudo mkdir /misc)
sudo ln -s /misc/vhome /vhome sudo ln -s /misc/shome /shome
Environment variables
The bin path for mobotware is added to /etc/environment, so that it now reads
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/smr/bin"
The library path can not be added to /etc/environment, but is added as /etc/ld.so.conf.d/mobotware.conf as
/usr/local/smr/lib
NIS start and switch
NIS start by default, when any network is up and running, this does not work if wireless is used.
So edit /etc/init/ypbind.conf
change
start on (started portmap ON_BOOT= or (started portmap ON_BOOT=y and ((filesystem and static-network-up) or failsafe-boot)))
to
start on (started portmap ON_BOOT= or (started portmap ON_BOOT=y and ((filesystem and net-device-up IFACE=wlan0) or failsafe-boot)))
and change 3 lines in /etc/nsswitch, add nis as first option
... passwd: nis compat group: nis compat shadow: nis compat ...
Reboot when both changes are in place (if nsswitch is changed only, it is likely that login will be impossible due to long timeouts. then use failsafe boot and root shell to recover, (remember: mount -n -o remount,rw /).
Compile mobotware on new platform
!!!This section is not relevant anymore!!!
The parts of mobotware that depend on openCV-highgui will not compile, so remove them from the respective Makefiles:
From aurobotservers/trunk/src/Makefile edit 'apps=' list from
apps = auclient auservertest ucamserver uclient ulmsserver userver
to
apps = auservertest ucamserver ulmsserver userver
And in aurobotservers/trunk/plugin/Makefile edit 'plugins=' list to remove 'audisp'
And in aurobotservers/trunk/utils/Makefile cange
APPSUBDIRS = mapoffset smrcllogtrim cameracalibrate aulogrotate \ barcode2d stereocalibrate utmpose2kml bayer2rgb
to
APPSUBDIRS = mapoffset smrcllogtrim aulogrotate \ barcode2d utmpose2kml
The package should now compile? - or at least the aurobotservers
ROS
- ikke testet endnu
WEB server - MARG
With the apache server installed MARG can be active (java is not needed on this platform)
The apache server has its root in '/var/www', but to be compatible with other platforms, links are made from the /srv directory:
sudo ln -s /var/www /srv/httpd sudo ln -s /var/www /srv/www
And a directory for the aukeeper is needed, like
sudo mkdir /var/log/keeper
Switchtool
Switchtool consist of /etc/rc.smr, and this directory holds 2 files rc.smr and rc.smr_shutdown.
These are copied from old installation:
/etc/rc.smr/rc.smr:
#!/bin/bash /usr/local/smr/bin/rhd /usr/local/smr/bin/rhdconfig/rhdconfig.smrS1.xml& export LD_LIBRARY_PATH="/usr/local/smr/lib:/usr/local/smr/aurs/lib" /usr/local/smr/bin/aukeeper -a -s /usr/local/smr/bin/aursconf/aukeeper.ini > /dev/null & cp /usr/local/smr/marg/robot.xml /srv/httpd/htdocs/robot.xml SMRHN=`hostname` sed -i "s/smrhost/$SMRHN/g" /srv/httpd/htdocs/robot.xml exit 0
/etc/rc.smr/rc.smr_shutdown:
#!/bin/bash killall -q rhd pkill keeper pkill ulmsserver pkill ucamserver pkill keeper echo "Mobotware shutdown" exit 0
Then /etc/rc.local should be modified to load default configuration. This is also taken from old configuration (in /etc/rc.d/rc.local), add the following lines:
/etc/rc.local:
# Set standard sound level amixer set Master 80% unmute amixer set PCM 80% unmute # start default configuration /etc/rc.smr/rc.smr sleep 1
Then the switchtool (a bash script) is copied from old configuration to /usr/sbin/ - looks pt like this:
/usr/sbin/switchtool:
#!/bin/bash dir_name="/misc/opt/smr.${1}" if [ -z ${1} ]; then if [ ! -d /usr/local/smr.net/bin ]; then echo "Switching impossible. Kalman /opt not found." exit 1 fi elif [ "${1}" != "local" ]; then if [ ! -d $dir_name/bin ]; then echo "Switching impossible. Path: ${dir_name} not found." exit 2 fi fi if [ ! -x /etc/rc.smr/rc.smr_shutdown ]; then echo "Warning: Smr startup scripts not found. Is this a robot ?" else /etc/rc.smr/rc.smr_shutdown fi if [ -z ${1} ]; then echo "Switching to production mode" rm -f /usr/local/smr ln -sf /usr/local/smr.net /usr/local/smr elif [ "${1}" == "local" ]; then echo "Switching to local mode" rm -f /usr/local/smr ln -sf /usr/local/smr.local /usr/local/smr else echo "Switching to ${1} mode" rm -f /usr/local/smr ln -sf $dir_name /usr/local/smr fi if [ -x /etc/rc.smr/rc.smr ]; then /etc/rc.smr/rc.smr fi sleep 2 echo "done" exit 0
mangler også
- lyd - test med smr og kran