MC mixer: replace multirotor_motor_limits by control_allocator_status

CA: fix saturation computation
Since the CA matrix is normalized, the same scale applied to be used when using the effectiveness matrix

MCRateControl: use control_allocator_status to get saturation info
This commit is contained in:
bresch
2021-11-09 10:35:10 -05:00
committed by Daniel Agar
parent dd83ef1813
commit d47f9f155a
17 changed files with 115 additions and 71 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ public:
/**
* Get the saturation status.
*
* @return Integer bitmask containing saturation_status from multirotor_motor_limits.msg.
* @return Integer bitmask containing saturation_status from control_allocator_status.msg.
*/
virtual uint16_t get_saturation_status() { return 0; }
@@ -451,8 +451,8 @@ MultirotorMixer::update_saturation_status(unsigned index, bool clipping_high, bo
_saturation_status.flags.yaw_neg = true;
}
// A positive change in thrust will increase saturation
_saturation_status.flags.thrust_pos = true;
// A positive change in thrust will increase saturation (Z neg is up)
_saturation_status.flags.thrust_neg = true;
}
// The motor is saturated at the lower limit
@@ -478,8 +478,8 @@ MultirotorMixer::update_saturation_status(unsigned index, bool clipping_high, bo
_saturation_status.flags.pitch_pos = true;
}
// A negative change in thrust will increase saturation
_saturation_status.flags.thrust_neg = true;
// A negative change in thrust will increase saturation (Z pos is down)
_saturation_status.flags.thrust_pos = true;
}
if (clipping_low_yaw) {