B-Spline Trajectory Tracking with Simulated UAV Dynamics and Modular Controller Framework
This repository simulates trajectory tracking for quadrotor-like aerial vehicles using B-spline path interpolation and a simplified dynamic model inspired by PX4 flight stack architecture. It provides a mock drone simulator, a modular control framework (supporting PID and placeholder MPC), and real-time visualization.
It is ideal for prototyping controller logic, debugging trajectory-following algorithms, or serving as an educational/research scaffold for aerial motion planning.
- ๐ฉ๏ธ
drone.py: 6-DOF kinematic simulator for a UAV model - ๐ฏ
trajectory.py: B-spline interpolation and trajectory generator - ๐ฎ
controller.py: Modular control interface with mock PID and MPC stubs - ๐
visualization/plot_trajectory.py: 2D/3D trajectory rendering using matplotlib - ๐ Designed for future integration with planning and mapping stacks
- Plug-and-play controller interface (PID / initial MPC attempts)
- Configurable drone dynamics and state update loop
- Realistic simulation of tracking deviation and control response
- Visualization of ground truth vs predicted trajectory
- Research on trajectory tracking and model-based control for UAVs
- Educational demos of control loop structure for drones
- Benchmarking control response under trajectory perturbations
px4_ctrl_sim/
โโโ sim/
โ โโโ drone.py
โ โโโ trajectory.py
โ โโโ controller.py
โโโ scripts/
โ โโโ run_sim.py
โโโ visualization/
โ โโโ plot_trajectory.py
โโโ tests/
โ โโโ test_sim.py
โโโ requirements.txt
โโโ README.mdpip install -r requirements.txt