Autonomy Software Binder

Central engineering reference and operations manual for the MRDT Autonomy Software.

View the Project on GitHub MissouriMRDT/Autonomy_Software

Return to RoveSoDocs Guides for Today, Tomorrow, and Forever.

Architecture Overview

This section describes the high-level software architecture of the Autonomy Software, detailing data pathways, inter-thread synchronization, external hardware communication, and coordinate transformations across navigation frames.


1. System Data Flow

The software operates as a modular, multithreaded architecture organized around a centralized state machine. The primary data pipeline proceeds through five stages:

[Sensors & Hardware]
      |
      v (RoveComm UDP / USB / CUDA)
[Drivers & Handlers] (NavBoard, DriveBoard, CameraHandler, LiDARHandler)
      |
      v (Thread-safe Queues / Shared Memory)
[Perception & Geolocation] (TagDetector, ObjectDetector, GeolocateBox)
      |
      v (UTM Waypoints & Sensor Fusion)
[State Machine] (StateMachineHandler -> Active State)
      |
      v (Goal Coordinates & Costmap Lookups)
[Path Planning] (GeoPlanner / A* / Search Patterns)
      |
      v (Target Waypoints & Speed Profile)
[Controllers & Kinematics] (Predictive Stanley / Pure Pursuit / PID / DifferentialDrive)
      |
      v (RoveComm UDP)
[Core & Motor Controllers]

Data Pipeline Breakdown

  1. Sensors to Drivers and Handlers:
    • Navigation telemetry (GPS latitude, longitude, altitude, and IMU compass heading) arrives over UDP via RoveComm from the physical Navigation Board.
    • Stereoscopic camera frames (RGB color matrices and 32-bit floating point depth/point-cloud matrices) are captured asynchronously on GPU streams via the Stereolabs ZED SDK (ZEDCam.cpp) or virtual WebRTC pipes (SIMZEDCam.cpp).
    • Spatial elevation and obstacle data are retrieved through DuckDB spatial queries against pre-indexed USGS LAS 1.4 point cloud databases (LiDARHandler.cpp).
  2. Handlers to Perception Pipelines:
    • Image frames are passed to TagDetectionHandler and ObjectDetectionHandler.
    • TagDetector runs OpenCV ArUco dictionary matching (DICT_4X4_50) and an optional LibTorch YOLO model in parallel.
    • ObjectDetector runs custom LibTorch YOLO models (.pt TorchScript) with CUDA acceleration, followed by non-maximum suppression (NMS) and OpenCV CSRT/KCF bounding-box tracking.
    • When an object or marker is detected in pixel coordinates, GeolocateBox() queries the corresponding 3D camera point cloud (CV_32FC4), applies statistical depth filtering (20th percentile surface extraction), and projects the vector into global UTM space using the fused rover pose.
  3. Perception and Pose to State Machine:
    • StateMachineHandler executes at a controlled frequency (STATEMACHINE_MAX_IPS, typically 60 Hz).
    • The handler runs SmartRetrieveRoverPose(), fusing low-frequency GPS heading and position with high-frequency ZED IMU angular rates and dynamic drift correction.
    • The active state evaluates target proximity, visual locks, stuck criteria, and mission timeouts to determine whether to transition states.
  4. State Machine to Path Planning:
    • During eNavigating, the state machine passes the fused rover UTM position and the target destination to GeoPlanner.
    • GeoPlanner calculates a 2.5D costmap using USGS terrain data from LiDARHandler, applies obstacle inflation, and computes a collision-free path using Kinematically Constrained Weighted A*.
    • During eSearchPattern, the system mathematically constructs expanding spiral, zigzag, or snake patterns around the search radius.
  5. Path Planning to Kinematics and Motor Actuation:
    • The planned path is passed to either the PredictiveStanleyController, PurePursuitController, or the heading PID controller.
    • The controller outputs a steering angle and linear velocity setpoint.
    • Kinematics routines in DifferentialDrive.hpp (Arcade Drive or Curvature Drive) translate linear and angular requests into normalized left and right track power commands (-1.0 to 1.0).
    • Inclinometer slope damping is applied based on rover pitch and roll.
    • The resulting powers are packaged into a RoveComm UDP DRIVELEFTRIGHT packet and transmitted to the Core motor controller board.

2. Concurrency and Threading Model

To avoid latency in control loops, compute-intensive processes are separated into dedicated asynchronous worker threads:

Thread Architecture


3. Communication Architecture (RoveComm)

Communication between the Jetson computing platform and distributed rover subsystems uses the MRDT RoveComm protocol.

Transport Protocols

Manifest Binding

All communication relies on RoveCommManifest.h. Packet headers define:


4. Coordinate Reference Frames

Navigational calculations span three distinct reference frames. Maintaining mathematical consistency across these frames is essential for accurate geolocation and tracking.

1. Global / World Reference Frame (UTM / NWU)

2. Rover / Kinematics Body Frame

3. Camera / Perception Optical Frame