mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 15:10:36 +08:00
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:
@@ -75,7 +75,7 @@
|
||||
class ControlAllocation
|
||||
{
|
||||
public:
|
||||
ControlAllocation() = default;
|
||||
ControlAllocation() { _control_allocation_scale.setAll(1.f); }
|
||||
virtual ~ControlAllocation() = default;
|
||||
|
||||
static constexpr uint8_t NUM_ACTUATORS = 16;
|
||||
@@ -190,6 +190,11 @@ public:
|
||||
*/
|
||||
void clipActuatorSetpoint(matrix::Vector<float, NUM_ACTUATORS> &actuator) const;
|
||||
|
||||
/**
|
||||
* Compute the amount of allocated control thrust and torque
|
||||
*/
|
||||
void updateControlAllocated();
|
||||
|
||||
/**
|
||||
* Normalize the actuator setpoint between minimum and maximum values.
|
||||
*
|
||||
@@ -208,6 +213,7 @@ public:
|
||||
|
||||
protected:
|
||||
matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> _effectiveness; //< Effectiveness matrix
|
||||
matrix::Vector<float, NUM_AXES> _control_allocation_scale; //< Scaling applied during allocation
|
||||
matrix::Vector<float, NUM_ACTUATORS> _actuator_trim; //< Neutral actuator values
|
||||
matrix::Vector<float, NUM_ACTUATORS> _actuator_min; //< Minimum actuator values
|
||||
matrix::Vector<float, NUM_ACTUATORS> _actuator_max; //< Maximum actuator values
|
||||
|
||||
Reference in New Issue
Block a user