SPAWAR is a Navy Research Lab in San Diego that I worked in over the summer of 2015. As an intern I was tasked to develop the software and electronics to allow a jet ski navigate autonomously. A jet ski is an ideal choice because it offers a low cost platform for an autonomous marine vehicle in the open ocean. I chose this project specifically to challenge my abilities in software, control theory, and electronics as there was little meaningful mechanical work to be done at that time on the main project that the group was working on.
There were two main systems running on the jet ski. The first was an Arduino mega which was connected to a Futaba radio receiver, as well as all the actuators in the system. Based on the signals it received from the four channels it would make decisions on which mode it was in (autonomous/user remote control) and echo the joystick commands if necessary. This allowed for quick and easy operation in close quarters like around the harbor, or when trailering since the main human controls were disabled. This system was fitted with a variety of fail safes to ensure that the jet ski would remain in control at all times.
The main navigation was done on the BeagleBoneBlack (BBB) Linux micro-computer. This ran an installation of ROS (robotic operating system) which is an open source platform used widely across the field of robotics. I wrote pieces of C++ code or "Nodes" as they are called to receive serial data from the GPS and compass as well as calculate bearings and distances to way points and determine required control inputs to the servos. By segmenting these two systems it allowed me to rapidly iterate on the BBB code without worrying about bugs that would cause me to lose control of the jet ski.
ROS also allowed for built in data logging, which I used to evaluate the the data after my sea tests with the jet ski. I built a Matlab data visualizer which was very helpful in trouble-shooting the navigation and control code.