Lanturn’s software consists of a stabilization controller, several intermediate data acquisition/ processing programs, a computer vision system, and a main “mission planning” module for decision making. The software architecture is shown below.
A Python API sends information from the sensor hardware to the submarine motherboard, where the mission planning software is running. The mission planning software contains several state machines for each competition task. Data is transferred among these state machines through ROS publishers and subscribers, and the mission planning module’s output is sent to the submarine’s controls module. The controls module computes the necessary stabilization motor commands, and then sends both the computed stabilization commands and the movement commands from mission planning to the motors to both stabilize and move the submarine. The decision-making process is based on previous states and current sensor information. Each state has several subscribers. To increase the efficiency of message passing, the team created custom message types to send larger packets of information in one message. Computer vision collects data from an image stream using OpenCV, where the data is then processed by YOLO. The detected objects are then published to mission planning by the computer vision module.