In the rack.rb I pulled the send_message commands from the initializer. That code causes a long delay the first time Rover.instance is called since each of those send_message calls has to wait to time out if the rack is turned off, and the rack will always be turned off when Rover.instance is first called since that's typically how we access the relay board. Also, I think sending all those messages to the serial port when the device is turned off loads the serial device with data that is then sent with the first message sent to the rack once it's turned on, causing that first message to be corrupt (you can see where I send "badR" to clear the buffer). To make sure the rack always gets those initialization methods when it's turned on I put a call to Rover.instance.rack.reinit in the RelayBoard.rackOn method. The idea behind all the mock_whatever classes is to use them for testing code without interacting with any of the rover's physical devices. I found this useful for testing the navigator and control_system classes to make sure I didn't have any variable name errors. In the rover class there is a flag USE_MOCKS that swaps out all the variables in that class with mocks. Not all of the mock classes are completely implemented, the ezservo one in particular still needs work. Some were really simple, like the mock_video for instance, you can see all I had to do is intercept calls to 'system' and the rest of the methods could be inherited from the regular class. In general, the mock classes that inherit from there base classes should be complete, the ones that don't still need work. It turns out ruby has a "-c" flag that will just test for syntax errors. Unfortunately, you can't do "ruby -c *.rb" (it will say "syntax ok" without checking anything), so there's a little helper script, "check_syntax.rb" that just goes through all the ruby files and runs the -c flag on them. predive_test.rb is a program I wrote to run through all our pre dive tests. Each time a test is about to run it'll ask to run it with [y/n/s(kip)]. If you answer 'n' the script will exit. Everything else about that script is pretty obvious when running it. I tried to write some test classes using Ruby's test/unit framework but unfortunately we don't have that framework in our installation of ruby. You can see the classes I used in the "test" subdirectory of the /cf/rover/lib dir, which I kept in case we install a new version of ruby in the future. I just swapped out all the unit test stuff with if/puts statements so that the test classes could work. I'm trying to use () in all my method calls now so that it is more obvious what's a method call and what's a parameter. Since I'm using eclipse now, I also did a search through all the source files for calls to syslog and made sure that we're using the _ and ! before each call. I turned main.rb into a proper class and cleaned it up a bit. I needed to do that to parameterize the missions easier, since we wanted to try to run the long and the short missions with both the current-detecting movement algorithm and the simple goForward algorithm.