Control methods

Hello, is there anyone who knows how to implement my control method, for example (NMPC, MPC, etc.)? instead of the PID controller on the quadrotor? Where should I go to change the control methods, and where should I start?

You can add your control method in src/lib/mpc…,then use it and replace rate/attitude/vel/position control,For example ,if you want to replace rate control,you can use your method here:

const Vector3f att_control = _rate_control.update(rates, _rates_setpoint, angular_accel, dt, _maybe_landed || _landed);

change

const Vector3f att_control = _mpc_control.update(rates, _rates_setpoint,);

1 Like

ok, thank you :slight_smile: I got it.