Autonomous UAV Navigation & SLAM

Completed Fall 2025

MEC 569 Aerial Robotics - Resource-constrained path planning and obstacle avoidance on Crazyflie 2.1

UAV Navigation Simulation

Project Overview

This project, completed for MEC 569 Aerial Robotics in Fall 2025, implements autonomous navigation on the resource-constrained Crazyflie 2.1 UAV platform equipped with a 4-point LiDAR deck. The system integrates a lightweight SLAM pipeline, optimized D* Lite path planning, and Minimum Snap trajectory generation with cascaded control to achieve stable autonomous flight through obstacle-dense environments. The platform's limited onboard computation necessitated an offboard architecture where sensor data is streamed to a ground station for processing, with computed commands transmitted back to the vehicle.

Technical Challenges

Resource Constraints

The Crazyflie 2.1 platform has severely limited onboard computation capability, making traditional embedded SLAM and path planning infeasible. This necessitated designing an offboard architecture where raw sensor data is transmitted to a ground station computer for SLAM processing, path planning, and trajectory generation, with computed control commands sent back to the UAV. This approach requires careful management of communication latency and bandwidth constraints.

Sensor Fusion Complexity

Building a reliable obstacle map from the limited 4-point LiDAR deck presents significant challenges. The sparse range measurements must be fused with noisy IMU odometry to construct a coherent occupancy grid. The SLAM pipeline must handle sensor drift, measurement outliers, and maintain map consistency while operating at control loop frequency to support real-time navigation decisions.

Development and Validation Workflow

Limited physical flight time and battery constraints required an efficient debugging methodology. Implemented comprehensive telemetry acquisition pipeline using ROS2 bag recording to capture full-fidelity flight data including sensor measurements, state estimates, control commands, and planned trajectories. Developed offline validation framework enabling deterministic replay-based algorithm refinement without repeated physical flights, significantly accelerating the development cycle.

Real-Time Performance Requirements

The SLAM pipeline must process sensor data and update the occupancy map at control loop frequency to maintain situational awareness. Path planning algorithms must execute replanning operations fast enough to respond to dynamic obstacles while trajectory generation continuously produces smooth setpoints for the cascaded controller. Any computational delays directly impact flight stability and obstacle avoidance capability.

Dynamic Replanning and Flight Stability

Environment changes require path updates mid-flight while maintaining stable vehicle dynamics. Standard A* algorithm does not consider the drone's current trajectory during replanning, potentially commanding abrupt reversals that destabilize flight. Selected D* Lite for its incremental replanning capability that considers the current path, achieving 20% faster replanning than A* while maintaining flight stability by avoiding backwards commands that would require aggressive maneuvers.

System Architecture

UAV System Architecture Diagram

The system operates through a layered architecture bridging sensor inputs through SLAM, planning, and control to motor commands:

Sensor Layer

IMU provides inertial measurements for odometry while the 4-point LiDAR deck generates sparse range measurements. Raw sensor data is transmitted to the ground station where initial transform frames are broadcasted in the ROS ecosystem, forming the foundation for SLAM processing.

SLAM Pipeline

Lightweight SLAM implementation fuses IMU odometry with LiDAR measurements to build a real-time 2D occupancy grid map. The pipeline incrementally updates the map as the drone explores the environment, publishing corrected transform frames that account for sensor drift and maintain global consistency.

Path Planner

D* Lite algorithm processes the SLAM-built occupancy grid to compute optimal collision-free paths from current position to goal. The incremental replanning capability enables efficient path updates when obstacles are detected, maintaining computational efficiency critical for real-time operation.

Trajectory Generator

Minimum Snap trajectory generation converts discrete waypoints from the path planner into continuous smooth trajectories using 7th-degree polynomials. This produces position, velocity, acceleration, and jerk profiles that ensure dynamically feasible flight while minimizing aggressive maneuvers that could destabilize the platform.

Cascaded Controller

Two-layer control architecture with inner loop handling attitude stabilization (roll, pitch, yaw) and outer loop tracking velocity setpoints from the trajectory generator. Control gains were tuned specifically for Crazyflie 2.1 dynamics using the offline validation framework, enabling stable autonomous flight.

Telemetry Layer

Comprehensive ROS2 bag-based recording system captures all sensor measurements, state estimates, planned paths, control commands, and timing information. This telemetry acquisition pipeline enables post-flight deterministic replay for offline validation, algorithm debugging, and controller tuning without consuming flight battery time.

Demonstration

Technology Stack

Python ROS2 ROS2 Bags Gazebo SLAM Path Planning Control Theory LiDAR IMU UAV NumPy SciPy

Software Framework

  • Python for all algorithm implementations
  • ROS2 ecosystem for distributed computation
  • Gazebo simulation environment for testing
  • ROS2 bag recording for telemetry capture
  • NumPy/SciPy for numerical computation

Algorithms & Control

  • Lightweight SLAM with sensor fusion
  • D* Lite incremental path planning
  • Minimum Snap trajectory optimization
  • Cascaded PID control architecture
  • Occupancy grid mapping

Hardware Platform

  • Crazyflie 2.1 nano quadcopter
  • 4-Point LiDAR deck for ranging
  • Onboard IMU for odometry
  • Radio communication to ground station
  • Offboard computation architecture

Results & Demonstration

Key Achievements

  • Successfully achieved autonomous navigation through complex obstacle courses
  • Real-time map construction using lightweight SLAM pipeline with sparse sensor fusion
  • Dynamic obstacle avoidance with D* Lite replanner maintaining flight stability
  • Smooth trajectory following achieved through Minimum Snap generation and cascaded control
  • Offline validation pipeline reduced development iteration time through deterministic replay testing

Performance Metrics

  • D* Lite achieved 20% faster replanning compared to A* algorithm during dynamic scenarios
  • SLAM pipeline maintained real-time map updates at control loop frequency
  • Stable autonomous flight with cascaded controller tuned through offline validation
  • Full-fidelity telemetry recording enabled deterministic algorithm verification
  • Replay-based testing framework eliminated need for repeated physical flight validation

Simulation screenshots, ROS computational graph visualization, and SLAM map demonstrations available in project repository.

Future Enhancements

  • Extend SLAM pipeline to 3D obstacle mapping (current implementation is 2D occupancy grid)
  • Multi-drone coordination with distributed SLAM and cooperative path planning
  • Vision-based SLAM to complement sparse LiDAR measurements with visual odometry
  • Time-optimal trajectory generation to minimize flight duration while maintaining dynamic feasibility

Project Impact

Successfully demonstrated practical integration of SLAM, path planning, and control theory on a resource-constrained embedded platform. Optimized algorithms achieved measurable performance improvements (20% replanning speedup) while developing sophisticated telemetry acquisition and offline validation infrastructure that accelerated the development workflow.