From fcee31464648bbabea4643188266127f8d283186 Mon Sep 17 00:00:00 2001 From: Thomas Stastny Date: Fri, 6 May 2022 08:47:58 +0200 Subject: [PATCH] fw att ctrl: log the yaw rate command controlled by the wheel --- msg/vehicle_rates_setpoint.msg | 10 +++++++--- .../fw_att_control/FixedwingAttitudeControl.cpp | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/msg/vehicle_rates_setpoint.msg b/msg/vehicle_rates_setpoint.msg index ae7a3c7822..a83bafba26 100644 --- a/msg/vehicle_rates_setpoint.msg +++ b/msg/vehicle_rates_setpoint.msg @@ -1,8 +1,12 @@ uint64 timestamp # time since system start (microseconds) -float32 roll # body angular rates in NED frame -float32 pitch # body angular rates in NED frame -float32 yaw # body angular rates in NED frame +# body angular rates in NED frame +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. diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index 94b01f2706..4f825ee589 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -599,6 +599,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.timestamp = hrt_absolute_time();