From 4b64bfdd9516f575c702b89ef9fe8bb0dfe3e8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 18 Jan 2018 10:44:38 +0100 Subject: [PATCH] mc_pos_control: disable roll/pitch modification in manual for multicopters This causes severe oscillations in aggressive maneuvers with high tilt angles. It's an issue on VTOL's too, but the modification is specifically for VTOL's and VTOL's typically do not fly with such high tilt angles (>50 deg). See also: https://github.com/PX4/Firmware/issues/7949 --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index 840915d71e..1738e0d8cb 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -2950,8 +2950,8 @@ MulticopterPositionControl::generate_attitude_setpoint() _att_sp.pitch_body = euler_sp(1); _att_sp.yaw_body += euler_sp(2); - /* only if optimal recovery is not used, modify roll/pitch */ - if (!(_vehicle_status.is_vtol && _params.opt_recover)) { + /* only if we're a VTOL and optimal recovery is not used, modify roll/pitch */ + if (_vehicle_status.is_vtol && !_params.opt_recover) { // construct attitude setpoint rotation matrix. modify the setpoints for roll // and pitch such that they reflect the user's intention even if a yaw error // (yaw_sp - yaw) is present. In the presence of a yaw error constructing a rotation matrix