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.

Path Planning Subsystem

The Path Planning subsystem determines collision-free, kinematically viable trajectories from the rover’s current global position to target waypoints across complex terrain.


1. Algorithmic Architecture

Path planning is orchestrated through two primary components: the GeoPlanner (for global terrain traversal) and SearchPattern (for localized target search).

[Target Destination] (from WaypointHandler)
        |
        v
[GeoPlanner::PlanPath()]
        |
        +---> [LiDARHandler Query] (DuckDB spatial lookup within corridor padding)
        |
        +---> [2.5D Costmap Generation] (Elevation, Slope, Roughness, Curvature)
        |
        +---> [Obstacle Dilation Pass] (nDilationPasses, dSafeTravScoreThreshold)
        |
        +---> [Kinematically Constrained Weighted A* Search]
        |
        v
[Path Post-Processing] (SplicePath, Waypoint Tolerance Pruning)
        |
        v
[Ordered Waypoint Path] (std::vector<geoops::Waypoint>)

2. Global Terrain Planning: GeoPlanner

The GeoPlanner (src/algorithms/planners/GeoPlanner.cpp) is a specialized geospatial path planner designed for rough natural environments:

A. 2.5D Costmap Generation

Rather than assuming a flat 2D plane with binary open/closed cells, GeoPlanner constructs a continuous 2.5D costmap using preprocessed USGS LiDAR data from LiDARHandler (sourced from the team’s USGS_Data repository):

B. Weighted A* with Kinematic Constraints

C. Tile Management and Caching

To maintain high runtime performance:

[!TIP] Route Pre-Planning & Inspection Mission routes, waypoint sequences, and A* navigation splines can be validated and previewed using the hosted Autonomy Task Visualizer. Underlying point cloud terrain tiles and slope hazards can be inspected in 3D using the LiDAR Tool, both part of the hosted MRDT Visualizer Suite.


3. Localized Search Patterns (SearchPattern.hpp)

When the rover reaches the vicinity coordinate of an ArUco post or ground object but does not detect it, the state machine enters eSearchPattern. SearchPattern mathematically constructs structured search paths:

  1. Two-Phase Archimedean Spiral (CalculateSpiralPatternWaypoints):
    • Heading Initialization: The starting angle is aligned with the rover’s current compass heading: \(\theta_0 = -\text{Heading}_{\text{degrees}} \times \frac{\pi}{180}\)
    • Phase 1: Outward Spiral (Expansion): Generates an expanding Archimedean spiral around origin $(E_0, N_0)$: \(r(\theta) = \frac{d_{\text{spacing}}}{2\pi} \cdot (\theta - \theta_0)\) \(E(\theta) = E_0 + d_{\text{windup}} \cos \theta, \quad N(\theta) = N_0 + d_{\text{windup}} \sin \theta\) Angular step size is governed by constants::SEARCH_ANGULAR_STEP_DEGREES (typically $15.0^\circ$), with radial arm separation controlled by constants::SEARCH_SPIRAL_SPACING (typically $2.0$ m). Outward generation continues until reaching the designated search radius $R$.
    • Phase 2: Inward Spiral (Return Sweep): Upon reaching the outer boundary $R$, the algorithm immediately generates an inward spiral winding back toward the origin until $r \ge 0.5$ m and radial spacing wind-up reaches $0.0$: \(d_{\text{windup}} \leftarrow d_{\text{windup}} - d_{\text{spacing}}\) This inward sweep provides a continuous second-chance search pass and guides the rover back to the vicinity center without leaving it stranded at the outer perimeter.
    • Dual-Path Splitting in SearchPatternState: After filtering red-zone terrain and passing through GeoPlanSearchPattern(), the planned trajectory is split into two halves:
      • Forward Spiral (vFirstHalf): Stored in WaypointHandler as "GeoPlannerPath", assigned to PurePursuitController.
      • Reverse Return Spiral (vSecondHalf): Cached in WaypointHandler as "GeoPlannerPathReverse". If the outward leg completes without acquiring the target, the state machine transitions m_eCurrentSearchPatternType to SearchPatternType::END, retrieves "GeoPlannerPathReverse", promotes it to "GeoPlannerPath", and navigates back to center.
    • Completion Safeguard: To prevent false search pattern completion (which can occur if the rover’s start position passes within the completion radius of the origin early in the maneuver), bReachedFinalTarget is guarded by target index verification: \(\text{TargetIndex} > \text{size}(v_{\text{SearchPath}}) - 4\) Only when the lookahead tracker has actively traversed through to the final segments of the path is eSearchFailed permitted to trigger.
  2. ZigZag / Lawnmower Pattern:
    • Generates alternating parallel transects spaced by constants::SEARCH_ZIGZAG_SPACING.
    • Used in directional terrain features (e.g., canyon floors or ridgelines).
  3. Snake Pattern:
    • Curved sinusoidal sweep pattern controlled by constants::SEARCH_SNAKE_SLITHERS.

4. Path Splicing and Dynamic Recovery (StuckState.cpp)

If the rover encounters an unmapped obstruction or becomes stuck during transit:


5. Inputs, Outputs, and Known Constraints

Inputs

Outputs

Operational Constraints