Software Subsystem
Software Architecture
The AUV's software architecture comprises several Robot Operating System (ROS) Noetic packages, each containing multiple Python3 and C++ processes. These packages communicate exclusively through ROS middleware topics and services. An on-board Jetson AGX Orin provides the necessary computational power to run all packages concurrently within a Docker container. The ROS packages are categorized into four main groups: sense, plan, act, and sim.
Planning & Controls
Planning is managed by a dedicated package that employs a state machine algorithm. It utilizes data from state estimation and vision to determine the next action. Each possible competition run state is assigned a corresponding function, which can dispatch actions to the controls package and monitor progress. State transitions are determined based on action outcomes.
The controls and propulsion packages ensure precise AUV movement. The controls package receives goal positions and orientations, employing multiple PID loops to generate body-framed forces and torques. The propulsion package then decomposes these forces and torques into thruster PWM speeds, which are communicated to the ESCs via a ROS-serial node.
Vision
The vision package interprets the environment using front-facing and stereo cameras. Both feeds utilize a fine-tuned YOLO-v8 model for object detection. For the downward-facing camera, state estimation and camera intrinsics data help calculate direction vectors to detected objects, enabling rough positional estimates on the pool floor. The front-facing stereo camera generates a depth map, which, combined with state estimation data, produces a 3D point cloud. Object detections are then contextualized within this point cloud to infer 3D positions.
Simulation
Comprehensive testing is facilitated by a custom Unity simulation environment that replicates the competition setting and mimics all sensor and camera data. This allows for bug testing, vision model training, and competition run simulations. Additionally, a continuous integration pipeline performs regular automated tests to maintain code integrity.