The Refactoring

·

·

This year has primarily been a software year for Team SubjuGator, as our excellent mechanical and electrical systems which were completely redesigned last year have proved to be very reliable and extensible. We began the year with a large scale refactoring that eventually reached every worker process that runs on the sub. Our communications framework, DDS, allowed us to keep the sub operational at all points during the refactoring, because though workers were changing sometimes dramatically on the inside, their external DDS interfaces were preserved. Here’s some of the additional features gained during this refactoring:

  • Across the board better error handling and logging. All workers have a status message, and can write logs to a shared log which can be viewed over DDS and saved to the sub.
  • WorkerManager, which automatically launches and monitors necessary workers on our vehicle PC and gumstix. Crashed workers are logged and restarted. Additionally, the sub can now be killed from multiple places besides the physical kill switch on the vehicle. The most interesting is the DVL Height-Over-Bottom kill, which automatically kills the sub should we come within half a meter of the bottom. The whole system can be viewed and controlled over DDS through a GUI:


  • The PrimitiveDriver, in charge of all things hardware, can now detect some thruster failure conditions and dynamically reconfigure the thruster mapper. Because we have 8 thrusters on the sub, we are able to retain control of all 6 DOFs even in the loss of any one thruster, and in fact can theoretically lose certain pairs of two. We hope to continue work in this fault tolerance area by propagating this information upward to the vehicle trajectories and missions in response to hardware failure, but this will have to wait until after the competition.
  • Configuration files everywhere. Before, only critical values had special purpose configuration files. Now, literally every process on the sub uses a common mechanism to ensure that almost every value we might conceivably want to change is out of the code and into a json file. Furthermore, the system supports configuration overlays. Some settings need to change between the transdec and the hotel pool, between Jacksonville and San Diego, so we can make an overlay for each of these and turn them on and off individually.

This year has also brought a new trajectory generator, which allows the vehicle to autonomously perform a certain stunt popularized in Star Fox 64, among other far more practical things. We’ve also brought Python scripting to the sub in a big way, which allows us to do more things with the sub in much less time. This’ll all have to wait for another post, as I’ve got to get back to coding!