Computer Science

This year, we rewrote or refactored every part of our software to improve Oogway’s autonomous capabilities, making them more reliable, resilient, and robust. We’ve developed all-new controls, GUI, and task planning systems, and significantly expanded the capabilities of our CV and sonar systems.


Controls

Our control system ensures precise and stable robot movement through a blend of feedforward and feedback control mechanisms. Feedforward control maximizes stability by counteracting persistent forces like buoyancy, while feedback control, implemented via Proportional-Integral-Derivative (PID) loops, ensures smooth navigation towards the target. 

Further enhancing performance, the thrust allocator solves a quadratic programming problem using advanced numerical optimization techniques to determine the necessary force for each thruster, enabling the robot to follow the desired trajectory while minimizing energy usage. These forces are then transformed into pulse widths via a nonlinear mapping and pulse width modulation is employed to spin the thrusters. This sophisticated approach guarantees precise maneuverability across diverse environments and conditions.


GUI

Built on top of Foxglove Studio using the React Material UI library, the Duke Robotics GUI features a modular and modern design and allows us to easily monitor and control our AUV during pool tests. We can receive real-time updates on the status of our onboard computer, sensors, thrusters, and battery. We can observe the performance of the controls system and tune PID constants on-the-fly. We can use a joystick to control the robot directly. Individual panels are organized into layouts and easily deployed using a custom CLI. The GUI also supports replaying recorded ROS bag files for offline debugging and analysis.


CV

Detection

The computer vision (CV) system uses stereo and monovision inputs from both our DepthAI and USB cameras to locate items underwater to complete our underwater tasks. For simpler prediction tasks, we employ HSV filtering and contour matching to identify the buoy, path markers, and bin. For more intricate images encountered in the gate, torpedo, and octagon tasks, we utilize YOLO object detection models. Our enhanced CV pipeline seamlessly integrates these methodologies, dynamically adjusting to optimize detection speed and accuracy for various tasks.


Simulation

Our CV Simulation, built using Unity Perception, allows rapid generation of large-scale, labeled synthetic datasets for model training. Environment randomizations such as rotations and lighting variations contribute to a robust model that generalizes to a variety of diverse pool conditions. We also incorporated a realistic 3D model of the Woollett Aquatics Center to closely match this year’s competition environment.


Sonar

Our sonar system has been upgraded to enhance its reliability and provide alternate task completion methods. The upgraded sonar now effectively avoids false positives caused by acoustic reflections and can detect when the target object is missing. Low-intensity values are filtered out, and the DBSCAN algorithm is used to identify clusters in the image. Clusters are categorized as gate, buoy, and unknown. The clusters are used to identify the distance to the objects as well as their surface normal angles. The sonar can also perform long-range scans to get an overview of the AUV’s environment, filtering objects based on area and circularity and removing similar-sized neighboring clusters.


Task Planning

The task planning system serves as the robot’s top decision-maker, orchestrating its actions and responses to varying scenarios encountered during competition. It interfaces with all other systems, leveraging data from the robot’s perception capabilities and its current state to strategize and execute tasks efficiently by moving the robot or manipulating objects. Built upon a framework of coroutines, the system exhibits agility and responsiveness, swiftly adjusting to environmental changes and dynamically selecting the most optimal course of action at any given moment. The framework also facilitates streamlined development, allowing developers to assemble small building blocks into intricate tasks with ease. An automated system continuously publishes updates at every step, offering real-time insights into the system’s behavior and performance.