Build Instructions
The following instructions were verified to work on the laptop behemoth(this assumes a fresh installation of Ubuntu 8.04)-
Basic Setup & Libraries
- Update Ubuntu(if there is a problem connecting to network because of wireless card issues try connecting using LAN chord).
- Checkout code from SVN: svn co svn+ssh://user@computer/lci/project/raid1/srvc/SVN/trunk
- You can also install kdesvn and checkout using the GUI interface.
- Install emacs
- Modify paths in trunk/srvcDirectories.bash and add it to your ~/.bashrc file.
- add this line at the end- source yourSrvcPath/trunk/srvcDirectories.bash
- Install g++, automake, libtool, gawk, libcurl, pyhon-scipy, pylab (nothing named that), python-numpy, libboost-filesystem-dev, imagemagick, build-essential, python-yaml, cmake, subversion
- Install wxPython
- Add the following sources of third-party software using System> Administration> Software Sources
- Install wxpython
- $sudo apt-get update
- $sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n
- Install OpenCV using following packages-
- libcv-dev(and all it's dependencies)
- Install GLUT
- freeglut3-dev(and all it's dependencies)
- Install GSL
- Install Player
- libplayerc++2-dev(and all it's dependencies)
- Install libgtk related libraries:
- libgtkglext-dev
- libgtkmm-dev
- Install libreadline5-dev
- Install libraries related to grabbing from the Cannon camera:
- libusb-dev (using apt-get)
- libptp (by building the source located in trunk/ROBOT/resources) (read INSTALL for instructions, may need to use sudo when running "make install")
- libcapture (by building the source located in trunk/ROBOT/resources)
Other Dependencies
- Install MATLAB
- Copy from Lapinkulta to your /usr/local- $sudo scp -r user@lapinkultaDELETEthisTEXT.cs.ubc.ca:/var/tmp/dpmeger/matlab .
- Run install_matlab script inside the folder. (use defaults and always say yes when prompted)
- Install Boost 1.39(or the latest version from the Boost website)- The default version installed by Ubuntu package manager is not up to date. We need to install another version in usr/local which does not require to uninstall the default one.
- Install libbz2-dev
- Download source from http://www.boost.org/users/download/
- Unzip the tar ball, open a terminal and cd to downloaded boost directory
- run- $./bootstrap
- run- $./bjam
- If everything goes well Boost has compiled properly and you are ready to run- $sudo ./bjam install (this by default installs in /usr/local)
- Create a symbolic link to the boost directory-
- $ cd /usr/local/include
- $ sudo ln -s boost-1_39/boost boost
- Install GIL extensions
ROS Installation
- If you haven't already done so:
- $sudo apt-get install build-essential python-yaml cmake subversion
- Use the rosconfig tool to install ROS:
- For convenience, automatically add ROS environment variables to your bash session every time a new shell is launched:
- $ ~/rosconfig setup ~/ros > ~/.bashrc.ros
- $ echo "source ~/.bashrc.ros" >> ~/.bashrc
- Follow the basic tutorial here
to test your installation.
Test Running bumblebee
- Modify /etc/modules file add raw1394 and video1394 to the end of the list.
- Modify /etc/udev/rules.d/40-permissions.rules files as described here
.
- Add yourself to groups disk and video using newgrp command
- $newgrp disk
- $newgrp video
- Restart
- Connect bumblebee to the computer.
- Install coriander and run it. If you can see the camera output by clicking on Receive and Display buttons in Services tab then Bumblebee is working fine with your computer(if you see a black screen you may have to switch method to Video1394 on the same tab).
The following instructions apply after a fresh svn checkout (see page one level up) or an update through svn
Note that currently the directory MAPPING (same level as ROBOT and CLASSIFY) is not used
Building CLASSIFY Code
- Open a terminal cd to CLASSIFY/sjm
- run $ make
- There might be an error in header file pngconf.h(a quick fix is to comment out the 2 problem lines where error occurs)
Building Robot Code
- Open a terminal and cd to ROBOT/main
- run $ make
Background Training(for Category Recognition)
- Save all background training images in a single directory
- In directory ~/srvc/trunk/CLASSIFY/sjm/app/Pipeline, run- $./ExtractDescriptors -R training_image_folder_path --output-directory dir_to_store_sift_descriptors
Running Robot
Running Training/Recognition Code
- Run the web extraction code by typing python getImages.py in the WEB/getImages directory
- ...
Running Navigation and Mapping Code
Starting Up
- Power on (disconnect charger, press robot power, press computer power)
- Switch on PTU power, connect Ethernet and USB
- Run sudo ifconfig eth0 192.168.10.11
- ssh to bart (192.168.10.10) with some username and password (ask Dave or Ankur for a valid one if you don't have it)
- Run player powerbot.cfg
- In another session, again ssh to bart with dpmeger@bart pwd superm@n
- Run /home/lciuser/trunk/ROBOT/main/matlab_powerbot/server_mini
- cd to /home/lciuser/trunk/ROBOT/main/realtime and run the command "bumblebeeGrab 0"
- Start Matlab in /home/lciuser/trunk/ROBOT/main/
- Power up the cannon camera
- Play with lots of configuration parameters stored in ConfigDefaults and some other files
- Execute the script RunRobot.m
Note: in case of freeze, run the command "bash util/killmatlab.bash"
Shutting Down
- ptu power switch off
- As root run "shutdown -h now" on bart
- Robot power off
- Connect charger
--
DavidMeger - 18 Jun 2008