Back to: URI_RoboBoat
As you write awesome code for the boat, you should tell everybody how it works, and why you did stuff, and whatnot. Seriously, if you don't write down why you did something, you'll come back in a few months and ask what bloody moron decided to do things that way. We've all been there.
This section is for members that are interested in coding. The software used on the ASV is written in C++ and Python and runs under Linux. The software also depends on third party libraries such as LCM and OpenCV. A full list of dependencies can be found in the sections below.
LCM Types, Mysterious Jarfiles, etc
How do all these assorted java programs know about the LCM types we invented, you ask? It seems to involve a certain amount of black magic, and loading Java class files provided via an external CLASSPATH. We'll discuss how to make this work for lcm-spy, but the process should be similar for some of the other java-based utilities (e.g., the botlcm log extractor).
In order to decode messages, lcm-spy needs access to a compiled copy of that message type's java implementation. This mostly follows from the LCM documentation, e.g., .
lcm-gen -xpj *.lcm javac -cp lcm.jar asvlcm/*.java jar cf asvlcm.jar asvlcm/*.class javac -cp asvlcm.jar:lcm.jar plugin/*.java jar cf plugin.jar plugin/*.class
This is all done for us in buildJar.sh. Unfortunately, there's a fair bit of redundancy with some of the libbot stuff. plugin.jar, for example, is a repackaging of a cheap ASV-team knockoff of the libbot image/planar Lidar class visualizers (don't ask-- it seemed like a good idea at the time). Somebody could probably go back and make libbot do all this for us.
Anyway, the types all get compiled into asvlcm.jar. This may then be provided to the java utilities by including it in the CLASSPATH environment variable, as seen in runLCMprog.sh.
Unfortunately, every so often we decide to break backwards compatibility for LCM types. So we need a way to maintain access to all the old types; enter the <src>/legacy. Every time you break backwards compatibility, which should be almost-never, add a directory here with the java and python LCM bindings. This way, we can still get at them without having to check out an old copy of the tree (as an aside, you should probably also create an svn tag and/or branch).
Competition Computer Setup
The following are the basic steps that were taken on the Intense-PC to set up the computer.
Ubuntu Server was installed using a flash drive. First the
dd was used to copy the Ubuntu Server ISO file to the flash drive.
dd if=path/to/ubuntu.iso of=/dev/sdx
This will write the iso to the device specified. NOTE: This will erase your entire flash drive so make sure that your output device is correct! It could be possible that you could erase a different drive by accident. Make sure that the boot options for the Intense-PC includes the USB device before the internal hard drive. After Linux is installed, then make sure ssh and subversion are installed first.
sudo apt-get install ssh subversion
Set Up Networking
To set up the networking edit /etc/networking/interfaces to set the static IP address on p4p1.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto p4p1 iface p4p1 inet static address 10.0.1.69 netmask 255.255.255.0 broadcast 10.0.1.255 gateway 10.0.1.1 # This if the interface to connect to URI_secure in Fish 6. auto eth1 iface eth1 inet static address 220.127.116.11 netmask 255.255.255.0 gateway 18.104.22.168 dns-nameservers 22.214.171.124 dns-search asv-comp.gso.uri.edu
Configure multicast at boot. To start the deputy at boot add the following lines to /etc/rc.local.
export PATH=$PATH:/usr/local/bin cd path/to/trunk/bin nohup ./runVisionDeputy.sh & cd -