This project is currently under development
Ahoy! This project contains software intended to run on the custom-built Douglas AUV to compete at RoboSub2026 on behalf of McGill Robotics.
This project is maintained by the McGill Robotics Club and was developed by its members - students of McGill University.
This repository contains several ROS 2 packages that make up the AUV software stack. Click on any package below to read its specific documentation:
- auv_msgs: Custom ROS 2 message, service, and action definitions.
- bringup: Top-level launch files for starting the entire AUV system or major subsystems.
- controls: Provides the AUV control loops for depth, attitude, and planar motion (X/Y), computing control efforts as
geometry_msgs/Wrenchmessages. - planner: Provides high-level mission planning and competition task execution using
py_treesbehavior trees. - propulsion: Handles low-level actuation by transforming high-level control efforts into PWM signals for each thruster.
- sensors: Handles low-level processing, coordinate transformations, and conversion of raw sensor outputs (IMU, Depth, DVL).
- telemetry: Foxglove Studio layouts and telemetry configurations for AUV monitoring during pool tests and competition.
- teleop: Manual teleoperation for the AUV via an Xbox controller.
- vision: Contains the front-camera detection pipeline, the persistent 3D object map, image enhancement nodes, and model-training helpers.
Before setting up the dev environment, you should have the following software installed:
Docker(either through Docker Desktop or CLI)gitinstalled.Visual Studio CodeVisual Studio Code Remote Containers Plugin
If you have the software installed, follow these instructions:
-
git clonethis repository on your local environment. -
Open the repo in VS Code.
-
In the bottom left, you should see a little blue/green box. This will bring up the VSCode dialogue. (Keyboard Shortcut:
CTRL + SHIFT + PorCMD + SHIFT + P)
-
Select "Dev Containers: Reopen in container"
-
Select the option that matches your hardware
AUV Dev (CPU): CPU or Integrated GraphicsAUV Dev (NVIDIA): NVIDIA Graphics Card
-
VS Code will automatically load necessary files and configure the dev environment. This can take minutes to load.
Once loading is complete, you're ready to develop!
Use this when not using VS Code as your primary text editor
-
Navigate to the dev folder:
cd Docker/dev -
Allow GUI windows (Linux only):
xhost +si:localuser:root
-
Start the environment: Choose the command matching your hardware:
- NVIDIA GPU Users (Requires NVIDIA Container Toolkit):
docker compose up -d --build nvidia
- Standard CPU / Integrated Graphics:
docker compose up -d --build cpu
- NVIDIA GPU Users (Requires NVIDIA Container Toolkit):
-
Enter the container:
# For NVIDIA docker exec -it auv-dev-nvidia bash # For CPU docker exec -it auv-dev-cpu bash
For more details, see Docker/dev/README.md.
Once inside the container, use the build script. It automatically detects if you have the ZED SDK and builds accordingly.
cd /home/douglas/AUV-2026
./build.sh
source ros2_ws/install/setup.bashNote the script can be run from anywhere in the container and will always build inside the AUV-2026/ros2_ws folder.
Multiple build flags are available:
./build.sh: Default Release Build, works for most cases./build.sh -c: Clean Build, removes previous build artifacts (build/,install/,log/folders)./build.sh -d: Debug Build, compiles with debug symbols and no optimizations and serial compilation./build.sh -o: Offline Build, prevents CMake from attempting to download missing dependencies./build.sh -p <package_name>: Build a specific package and its required dependencies (as determined by colcon)
Since the debug -d build is single-threaded for easier debugging, it may take very long to compile. As such, it should only be used in tandem with the -p flag to build a specific package. A typical debug build command would be ./build.sh -cd -p <package_name>. Note that the -c will only clean the build artifacts for the specified package and its dependencies.
To launch the entire AUV software stack, use the bringup.launch.py file:
ros2 launch bringup bringup.launch.pyCurrently, this bringup script launches the following subsystems:
- Sensors (
sensors.launch.py): Aggregates and processes raw data from the IMU, Depth Sensor, and DVL. - Propulsion (
propulsion.launch.py): Handles thruster allocation and hardware communication. - Controls (
controls.launch.py): Manages the vehicle's PID controllers and superimposer. - Vision (
vision_pipeline.launch.py): Runs the object detection, point cloud mapping, and TF pipeline. - Telemetry (
dashboard.launch.py): Launches the Foxglove bridge for remote monitoring and debugging. - ROS TCP Endpoint (
endpoint.py): Facilitates communication with the Unity Simulator (only whensim:=true).
- The
sensorspackage launches drivers for the DVL. The DVL must always be underwater when configured by the driver during operation, otherwise it may overheat - The
propulsionpackage re-arms all thrusters on launch, which can be dangerous if the AUV is not properly secured. - The
controlspackage attempts to maintain the AUV's underwater position on launch, which may lead to unexpected thruster activation and movement.
See the Launch Options section below for instructions on how to launch the bringup script with specific subsystems disabled, such as when running in simulation or when testing specific packages.
sim:=true|false(default:false): Launch the AUV in simulation mode. (Note: To set up and run the Unity simulator itself, please refer to the auv-sim-unity repository.)vision:=true|false(default:true): Launch the vision pipeline. Set this tofalsewhen running the simulation on a machine without an NVIDIA GPU, as the simulator will directly provide the object map.enable_object_detection:=true|false(default:true): Enable object detection inference globally. If set tofalse, the vision pipeline will still launch and publish raw camera feeds, but no AI inference models will be loaded or run.sensors:=true|false(default:true): Launch the sensors package with real hardware drivers.propulsion:=true|false(default:true): Launch the propulsion package.controls:=true|false(default:true): Launch the controls package.telemetry:=true|false(default:true): Launch the telemetry dashboard.planner:=true|false(default:false): Launch the mission planner. This is set tofalseby default as the mission planner is not yet fully integrated with the rest of the system.auto_start_rosbag:=true|false(default:false): Automatically start recording a rosbag when launching.rosbag_prefix:=<string>(default:mission_bag): The prefix used for the auto-started rosbag name.
Note that the sim flag is also passed to the launched packages, so for instance if sim:=true, no hardware drivers will be launched by the sensors package.
Example: Running simulation without vision
ros2 launch bringup bringup.launch.py sim:=true vision:=falseExample: Full real pooltest bringup with rosbag
ros2 launch bringup bringup.launch.py auto_start_rosbag:=true rosbag_prefix:=my_bag_name