Software Setup

From EECS498_F09

Jump to: navigation, search

Contents

[edit] SVN Checkout

The team_user_name is "team" followed by the team number. Run the following:

svn co --username team_user_name svn://april.eecs.umich.edu/arl-teams-f09/team_user_name

[edit] Machine Setup

[edit] Mac OS X

Feel free to contribute to these instructions!

[edit] Overview

This page on installing Vis has a basic introduction, despite not including much OS X information. The essential points are the

  • libraries
    • java (JRE or JDK)
    • jogl
  • classpath
  • java.library.path

We cover a few important topics below:

  • .bashrc settings (classpath, java.library.path)
  • syncing jars to april.eecs.umich.edu
  • LCM

[edit] .bashrc Settings

To configure the CLASSPATH and java library path (as well as alias 'Java' to point to the 1.6.0 executable), my ~/.bashrc includes the following block, where all April lab jar files are stored in $JARDIR

# define some directories
JARDIR= /Users/charbook/files/school/9_F09/498/jars
JAVAPATH="/System/Library/Frameworks/JavaVM.framework/Versions/1.6"
JLIBPATH="/usr/share/java"

# alias 'java' to point to the java executable
alias java="$JAVAPATH/Commands/java"

# setup the static part of the classpath (jogl, lcm jars)
export CLASSPATH=$JLIBPATH/gluegen-rt.jar:$JLIBPATH/jogl.jar:/usr/local/share/java/lcm.jar:.

# add the april jars to the classpath
for f in $JARDIR/*.jar; do
  export CLASSPATH=$CLASSPATH:$f
done;

# and the local directory
export CLASSPATH=$CLASSPATH:.

# set the java.library.path
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$JLIBPATH:$JARDIR:/usr/local/share/java

If you wish to have a script to automatically sync the jars from april.eecs.umich.edu/arl, save the following bash script and set +x permissions (chmod +x filename). Make sure that the destination directory matches $JARDIR in your ~/.bashrc. This code is adapted from arl-setup-user.sh.

#!/bin/bash

##########################
# Download a URL to a temporary file. If the download is successful,
# the file given by the second parameter is overwritten with it.
#
# param 1: URL
# param 2: destination file
function wget_update {
    TMP=$(tempfile)
    wget -nv -O $TMP $1
    RES=$?
    
    if [ $RES -eq 0 ];  then
	cp $TMP $2
    fi

    rm $TMP
}

JARDIR =/Users/charbook/files/school/9_F09/498/jars

wget_update "http://april.eecs.umich.edu/arl/orc.jar" $JARDIR/orc.jar
wget_update "http://april.eecs.umich.edu/arl/vis.jar" $JARDIR/vis.jar
wget_update "http://april.eecs.umich.edu/arl/jmat.jar" $JARDIR/jmat.jar
wget_update "http://april.eecs.umich.edu/arl/jserial.jar" $JARDIR/jserial.jar
wget_update "http://april.eecs.umich.edu/arl/jcam.jar" $JARDIR/jcam.jar
wget_update "http://april.eecs.umich.edu/arl/april.jar" $JARDIR/april.jar
wget_update "http://april.eecs.umich.edu/arl/lcmtypes.jar" $JARDIR/lcmtypes.jar
wget_update "http://april.eecs.umich.edu/arl/libjserial.so" $JARDIR/libjserial.so
wget_update "http://april.eecs.umich.edu/arl/libimagesource.so" $JARDIR/libimagesource.so

chmod 664 $JARDIR/*.jar

If you don't have wget installed, do so with fink. After setting up fink, run fink install wget and you're all set.

[edit] LCM

You will also need to build LCM with the standard ./configure;make;sudo make install. Make sure that the classpath points to lcm.jar, which is most likely /usr/local/share/java/lcm.jar. Update the java.library.path as well.

Personal tools