These scripts implements linear model predictive control for quadrotor tracking trajectories or being stabilized to the origin. The controller is based on the linear state space model linearized from the equibilium point.
- Install the dependencies: numpy, scipy, matplotlib, osqp.(To install osqp: pip install osqp)
- python main.py
- Track the Trajectory(True) or Stabilize to Origion(Fase): TRACKING = True
- Choose Controller from 'MPC', 'LQR', 'PID': CONTROLLER = 'MPC'. Note that LQR and PID are under debugging.