From e5cfbbb1ee91dcef9b9d45e5ec46f22ab4a2aa47 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Tue, 16 Jan 2024 17:01:06 +0100 Subject: [PATCH] mc_att_control: remove direct setting of att sp in Stabilized Instead of directly setting the attitude setpoint for usage inside the same module only publish it to the uorb topic, which is subscribed to in the same module. Signed-off-by: Silvan Fuhrer --- src/modules/mc_att_control/mc_att_control_main.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/modules/mc_att_control/mc_att_control_main.cpp b/src/modules/mc_att_control/mc_att_control_main.cpp index 6565d4248c..756311b4ae 100644 --- a/src/modules/mc_att_control/mc_att_control_main.cpp +++ b/src/modules/mc_att_control/mc_att_control_main.cpp @@ -192,14 +192,6 @@ MulticopterAttitudeControl::generate_attitude_setpoint(const Quatf &q, float dt, attitude_setpoint.timestamp = hrt_absolute_time(); _vehicle_attitude_setpoint_pub.publish(attitude_setpoint); - - // update attitude controller setpoint immediately (don't do it in vtol transition, then the VTOL module generates the attitude setpoint) - if (!_vtol_in_transition_mode) { - _attitude_control.setAttitudeSetpoint(q_sp, attitude_setpoint.yaw_sp_move_rate); - _thrust_setpoint_body = Vector3f(attitude_setpoint.thrust_body); - } - - _last_attitude_setpoint = attitude_setpoint.timestamp; } void