diff --git a/msg/vehicle_rates_setpoint.msg b/msg/vehicle_rates_setpoint.msg index a83bafba26..f30ae2fc8f 100644 --- a/msg/vehicle_rates_setpoint.msg +++ b/msg/vehicle_rates_setpoint.msg @@ -5,9 +5,6 @@ float32 roll # [rad/s] roll rate setpoint float32 pitch # [rad/s] pitch rate setpoint float32 yaw # [rad/s] yaw rate setpoint -# [rad/s] yaw rate setpoint the wheel attempts to track (the wheel controller has different gains than the yaw controller) -float32 yaw_via_wheel - # For clarification: For multicopters thrust_body[0] and thrust[1] are usually 0 and thrust[2] is the negative throttle demand. # For fixed wings thrust_x is the throttle demand and thrust_y, thrust_z will usually be zero. float32[3] thrust_body # Normalized thrust command in body NED frame [-1,1] diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index e27025f433..47a6acf8f9 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -601,8 +601,7 @@ void FixedwingAttitudeControl::Run() */ _rates_sp.roll = _roll_ctrl.get_desired_bodyrate(); _rates_sp.pitch = _pitch_ctrl.get_desired_bodyrate(); - _rates_sp.yaw = _yaw_ctrl.get_desired_bodyrate(); - _rates_sp.yaw_via_wheel = _wheel_ctrl.get_desired_rate(); + _rates_sp.yaw = (wheel_control) ? _wheel_ctrl.get_desired_rate() : _yaw_ctrl.get_desired_bodyrate(); _rates_sp.timestamp = hrt_absolute_time();