Quadrotor Control: C++ NMPC (acados) vs. Cascaded PID in ROS 2
C++ - ROS 2 Jazzy - acados - Webots
A nonlinear MPC in C++ (acados, real-time iteration) flying a DJI Mavic 2 Pro in Webots through ROS 2 at 100 Hz, against a cascaded geometric controller I tuned as well as I could. Without disturbance they are close. In gusty wind the NMPC, with a disturbance observer, halves the tracking error. The repo also lists three bugs that changed my numbers.
- 0.5 ms median solve at 100 Hz on a 2016 laptop CPU
- 3.1 vs 7.3 cm RMSE at 5 m/s in gusty wind
- 1.5 vs 2.3 cm at 5 m/s without disturbance



