UUV introduce param to skip controller (#15706)

* added skip_ctrl param to uuv

* fixed formatting
This commit is contained in:
Thies Lennart Alff
2021-01-08 06:50:40 +01:00
committed by GitHub
parent 064511c2df
commit eb60479e4c
3 changed files with 18 additions and 5 deletions
@@ -238,7 +238,15 @@ void UUVAttitudeControl::Run()
}
/* Geometric Control*/
control_attitude_geo(attitude, _attitude_setpoint, angular_velocity, _rates_setpoint);
int skip_controller = _param_skip_ctrl.get();
if (skip_controller) {
constrain_actuator_commands(_rates_setpoint.roll, _rates_setpoint.pitch, _rates_setpoint.yaw,
_rates_setpoint.thrust_body[0]);
} else {
control_attitude_geo(attitude, _attitude_setpoint, angular_velocity, _rates_setpoint);
}
}
}