CBSystem

From CajunBot Wiki

(Redirected from Cbsystem)
Jump to: navigation, search

New? Take the Tour

CBSystem is the software module that Team CajunBot uses that contains all of the program files for running the vehicle autonomous, simulating, and visualizing data. This page describes the steps that you need to go through to install support libraries and get cbsystem installed and running on your system.

Contents

[edit] Test System

CBSystem has traditionally been run on Linux distributions such as Fedora, Ubuntu and CentOS.

For this document, a reference system running a default install of Ubuntu 9.04 has been assumed.

[edit] Additions to your .bashrc file

The following lines need to be added to your $HOME/.bashrc file. Open up your favorite text editor and paste them in, then run source ~/.bashrc to incorporate the changes in your current shell.

############################## CBSYSTEM ##############################
export CBHOME=$HOME/cbsystem
export CBCONF=$CBHOME/conf
 
export CBBOTNAME=cajunSim #other choices (cajunSim/raginbot)
export CBSUPPORT=/local/cbserver #(location you copied cbsupport to)
 
export DEBUG=n
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CBHOME/lib:$CBSUPPORT/lib:/usr/local/lib
export CB_SIMULATION=y
 
export PATH=$PATH:$CBHOME/bin:/sbin:$CBSUPPORT/bin:/usr/local/bin
 
if [ -f $CBHOME/.bashrc ] ; then
    source $CBHOME/.bashrc
else
    echo "$CBHOME/.bashrc not found."
fi
 
############################## OPTIONAL ##############################
#ODE_HOME=/usr/local
#CPPUNIT_HOME=/local/cbserver
 
#export VJ_BASE_DIR=/usr/local
#export PATH=$PATH:$VJ_BASE_DIR/bin
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VJ_BASE_DIR/lib
#export VJ_CFG_DIR=$VJ_BASE_DIR/share/vrjuggler/data/configFiles

[edit] Installation of Support Files

You will need to make a location for $CBSUPPORT (usually /local/cbserver) and copy the following shared files to it: File:Local cbserver share.tar.bz2

You will need to following software packages installed on your system (please note the software repositories on different systems may name them differently).

On Ubuntu, the following apt line should install all most of the required packages:

sudo apt-get install bison flex gawk g++ emacs freeglut3 freeglut3-dev libxmu-dev libglade2-dev libxi-dev libgnome-dev libgnomeui-dev proj libode0-dev libglui-dev libgeotiff-dev libtiff4-dev

Additionally, the deb package from http://sourceforge.net/projects/ggt/ should install the GMTL headers and you'll need to get the LibLAS libraries from liblas.org.

[edit] Platforms

Releases have been developed and tested under the 2.4 and the 2.6 kernel (Red Hat 9, Fedora Core 1 - 11, Ubuntu 6.04 - 9.04). The current release should work fine on the latest version of Fedora, Ubuntu, and CentOS.

[edit] Required Packages on Vehicle

  • cbsystem
  • libproj (http://proj.maptools.org/) Cartographic Projections library. Current release is libproj-4.5.0. Current installation on the cbserver is libproj-4.4.8.
  • comedilib (http://www.comedi.org/) Used by the steering drivers. Current release is 0.7.22.
  • bison
  • flex
  • gawk
  • awk
  • g++

[edit] Required Packages for Playback

In addition to required packages on vehicle:

  • freeglut3 & freeglut3-dev is recommended, see below for alternative.
  • libXmu development headers
  • Glut Development library, 3.7
    • Install this if you did not install freeglut and freeglut-dev
    • glut && glut_devel || free_glut && free_glut_devel
  • GMTL (from the Generical Graphics Toolkit, http://ggt.sourceforge.net/).
  • GLUI (OpenGL Utility Interface) 2.35. Required for control panel of visualizer. Can be found at: http://glui.sourceforge.net/
    • Untar or unzip the package. Compile the code.
    • Copy the file lib/libglui.a to $CBSUPPORT/lib/
    • Copy the file include/GL/glui.h to $CBSUPPORT/include/
  • LibGeoTiff-dev
  • LibTiff4-dev
  • LibLAS (liblas.org)

[edit] Required Packages for Simulator

In addition to required packages for playback:

  • ODE >~0.6 (Open Dynamics Engine, www.ode.org). Required to the run the simulator.

[edit] Required Packages for Remote Startup Laptop

In addition to the required packages for Simulator:

CBStat needs:

  • Glade 2.0.0: libglade-dev
  • LibGnome & LibGnomeUI
    • Usually listed under libgnome-dev and libgnomeui-dev
  • libxi-dev

[edit] Required Packages for Unit Testing

Not normally needed, but this uses CPPUnit.

[edit] Required Packages for Vision

Not necessary for default install as it isn't compiled by default.

[edit] Optional Packages

[edit] Installation

[edit] Configuring Environment for Third Party Packages

libproj (required)

  • Locate the directory where the libproj binaries are installed. Their default directory is /usr/local/bin.
  • In the '.bashrc' file, add the directory found above to the PATH, as follows:
    • PATH=$PATH:/usr/local/bin
  • Locate the directory where the libproj.so library is installed. Its default directory is at /usr/local/lib.
  • In the '.bashrc' file, add the directory found above to the LD_LIBRARY_PATH, as follows:
    • LD_LIBRARY_PATH=/usr/local/lib

Notes:

  • Replace /usr/local/bin and /usr/local/lib with the actual directories where libproj binaries and libraries are installed.
  • The CajunBot software uses only the libraries libproj. So the second step is needed only if you plan on using the libproj binaries from a command line.

ODE (optional)

  • Locate the directory containing the ODE libraries, say that directory is /usr/local/lib
  • Set the ODE_HOME environment variable in the .bashrc file as follows:
    • export ODE_HOME=/usr/local

Note: The Makefile of cbsystem will skip building the simulator binaries if the ODE_HOME environment variable is not set.

The following options can be passed to the configure script when compiling ODE for increased performance:

  • --enable-double-precision
  • --enable-release
  • --with-arch=<architecture>

[edit] Installing CBSystem

  • Copy cbsystem to some directory on your system
    • e.g. $HOME/cbsystem.
  • Set CBHOME environmental variable to set to this folder
    • e.g. export CBHOME=$HOME/cbsystem
  • Set your bot name (cajunSim/raginbot)
    • e.g. export CBBOTNAME=cajunSim
  • Set path to where all libraries are installed
    • e.g. export CBSUPPORT=/local/cbserver
  • Set IP of the machine logging the data, for single machine config, set it to loop back
    • e.g. export CB_LOG_HOST=127.0.0.1:9000
  • Source cbsystem's .bashrc from your home bashrc file by adding following line in your $HOME/.bashrc
    • source $CBHOME/.bashrc
  • Set the CBCONF environment variable in the .bashrc as follows:
    • export CBCONF=$HOME/conf
  • cd $CBHOME/src
  • make

[edit] Notes & Tips

  • The output from running 'make' at the top level src directory could be quite overwhelming in size. Consider running it with the '-s' option so that is does not print the commands as it executes them.
  • Do not forget to 'export' the PATH and LD_LIBRARY_PATH variables at the end of your .bashrc file.
  • The scripts have been written in Fedora Core with the assumption that /bin/sh points to a local bash shell. If your system has another default sh then either change the /bin/sh link to point to your bash shell or modify the scripts to utilize your bash shell.


[edit] Run a test

After you've installed cbsystem, you can run a test script to see that everything went ok.

Run the script test_simulation to see a demo run in the visualizer.

[edit] See also

Personal tools