Skip to content

C91F37/px4_ctrl_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

px4_ctrl_sim

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.

๐Ÿ”ง System Components

  • ๐Ÿ›ฉ๏ธ 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

โœจ Features

  • 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

๐Ÿ”ฌ Applications

  • Research on trajectory tracking and model-based control for UAVs
  • Educational demos of control loop structure for drones
  • Benchmarking control response under trajectory perturbations

๐Ÿ“ฆ Folder Structure

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.md

๐Ÿ› ๏ธ Installation

pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published