MEC 569 Aerial Robotics - Resource-constrained path planning and obstacle avoidance on Crazyflie 2.1
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.
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.
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.
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.
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.
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.
The system operates through a layered architecture bridging sensor inputs through SLAM, planning, and control to motor commands:
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.
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.
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.
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.
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.
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.
Simulation screenshots, ROS computational graph visualization, and SLAM map demonstrations available in project repository.
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.