From 2809dd89448a2487d8f843f80276908df0fff070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 11 Nov 2021 11:39:40 +0100 Subject: [PATCH] control_allocator: remove min/max/scale params --- .../airframes/10017_iris_ctrlalloc | 19 +- .../airframes/6012_typhoon_h480_ctrlalloc | 26 +- .../init.d/airframes/4018_s500_ctrlalloc | 20 +- .../init.d/airframes/6003_hexa_x_ctrlalloc | 26 +- .../ControlAllocation/ControlAllocation.cpp | 7 + .../ControlAllocation/ControlAllocation.hpp | 2 +- .../control_allocator/ControlAllocator.cpp | 40 --- .../control_allocator/ControlAllocator.hpp | 36 +-- .../control_allocator_params.c | 300 ------------------ src/modules/control_allocator/module.yaml | 11 + 10 files changed, 24 insertions(+), 463 deletions(-) delete mode 100644 src/modules/control_allocator/control_allocator_params.c diff --git a/ROMFS/px4fmu_common/init.d-posix/airframes/10017_iris_ctrlalloc b/ROMFS/px4fmu_common/init.d-posix/airframes/10017_iris_ctrlalloc index eaccbb0502..64f7e9939a 100644 --- a/ROMFS/px4fmu_common/init.d-posix/airframes/10017_iris_ctrlalloc +++ b/ROMFS/px4fmu_common/init.d-posix/airframes/10017_iris_ctrlalloc @@ -11,38 +11,21 @@ param set-default SYS_CTRL_ALLOC 1 -param set-default MPC_USE_HTE 0 - -param set-default VM_MASS 1.5 -param set-default VM_INERTIA_XX 0.03 -param set-default VM_INERTIA_YY 0.03 -param set-default VM_INERTIA_ZZ 0.05 param set-default CA_AIRFRAME 0 -param set-default CA_ACT0_MIN 0.0 -param set-default CA_ACT1_MIN 0.0 -param set-default CA_ACT2_MIN 0.0 -param set-default CA_ACT3_MIN 0.0 -param set-default CA_ACT0_MAX 1.0 -param set-default CA_ACT1_MAX 1.0 -param set-default CA_ACT2_MAX 1.0 -param set-default CA_ACT3_MAX 1.0 +param set-default CA_MC_R_COUNT 4 param set-default CA_MC_R0_PX 0.1515 param set-default CA_MC_R0_PY 0.245 -param set-default CA_MC_R0_CT 6.5 param set-default CA_MC_R0_KM 0.05 param set-default CA_MC_R1_PX -0.1515 param set-default CA_MC_R1_PY -0.1875 -param set-default CA_MC_R1_CT 6.5 param set-default CA_MC_R1_KM 0.05 param set-default CA_MC_R2_PX 0.1515 param set-default CA_MC_R2_PY -0.245 -param set-default CA_MC_R2_CT 6.5 param set-default CA_MC_R2_KM -0.05 param set-default CA_MC_R3_PX -0.1515 param set-default CA_MC_R3_PY 0.1875 -param set-default CA_MC_R3_CT 6.5 param set-default CA_MC_R3_KM -0.05 param set-default PWM_MAIN_FUNC1 101 diff --git a/ROMFS/px4fmu_common/init.d-posix/airframes/6012_typhoon_h480_ctrlalloc b/ROMFS/px4fmu_common/init.d-posix/airframes/6012_typhoon_h480_ctrlalloc index b8e1e3d48f..6a20e0f863 100644 --- a/ROMFS/px4fmu_common/init.d-posix/airframes/6012_typhoon_h480_ctrlalloc +++ b/ROMFS/px4fmu_common/init.d-posix/airframes/6012_typhoon_h480_ctrlalloc @@ -29,50 +29,26 @@ param set-default TRIG_MODE 4 param set-default MNT_MODE_IN 0 param set-default MAV_PROTO_VER 2 -param set-default MPC_USE_HTE 0 - -param set-default VM_MASS 2.66 -param set-default VM_INERTIA_XX 0.06 -param set-default VM_INERTIA_YY 0.06 -param set-default VM_INERTIA_ZZ 0.10 - param set-default CA_AIRFRAME 0 -param set-default CA_ACT0_MIN 0.0 -param set-default CA_ACT1_MIN 0.0 -param set-default CA_ACT2_MIN 0.0 -param set-default CA_ACT3_MIN 0.0 -param set-default CA_ACT4_MIN 0.0 -param set-default CA_ACT5_MIN 0.0 -param set-default CA_ACT0_MAX 1.0 -param set-default CA_ACT1_MAX 1.0 -param set-default CA_ACT2_MAX 1.0 -param set-default CA_ACT3_MAX 1.0 -param set-default CA_ACT4_MAX 1.0 -param set-default CA_ACT5_MAX 1.0 +param set-default CA_MC_R_COUNT 6 param set-default CA_MC_R0_PX 0.0 param set-default CA_MC_R0_PY 1.0 -param set-default CA_MC_R0_CT 9.5 param set-default CA_MC_R0_KM -0.05 param set-default CA_MC_R1_PX 0.0 param set-default CA_MC_R1_PY -1.0 -param set-default CA_MC_R1_CT 9.5 param set-default CA_MC_R1_KM 0.05 param set-default CA_MC_R2_PX 0.866025 param set-default CA_MC_R2_PY -0.5 -param set-default CA_MC_R2_CT 9.5 param set-default CA_MC_R2_KM -0.05 param set-default CA_MC_R3_PX -0.866025 param set-default CA_MC_R3_PY 0.5 -param set-default CA_MC_R3_CT 9.5 param set-default CA_MC_R3_KM 0.05 param set-default CA_MC_R4_PX 0.866025 param set-default CA_MC_R4_PY 0.5 -param set-default CA_MC_R4_CT 9.5 param set-default CA_MC_R4_KM 0.05 param set-default CA_MC_R5_PX -0.866025 param set-default CA_MC_R5_PY -0.5 -param set-default CA_MC_R5_CT 9.5 param set-default CA_MC_R5_KM -0.05 param set-default PWM_MAIN_FUNC1 101 diff --git a/ROMFS/px4fmu_common/init.d/airframes/4018_s500_ctrlalloc b/ROMFS/px4fmu_common/init.d/airframes/4018_s500_ctrlalloc index 46d98b1298..074f91c9aa 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/4018_s500_ctrlalloc +++ b/ROMFS/px4fmu_common/init.d/airframes/4018_s500_ctrlalloc @@ -17,38 +17,20 @@ set MIXER_AUX none param set-default SYS_CTRL_ALLOC 1 -param set-default MPC_USE_HTE 0 - -param set-default VM_MASS 1.5 -param set-default VM_INERTIA_XX 0.03 -param set-default VM_INERTIA_YY 0.03 -param set-default VM_INERTIA_ZZ 0.05 - param set-default CA_AIRFRAME 0 -param set-default CA_ACT0_MIN 0.0 -param set-default CA_ACT1_MIN 0.0 -param set-default CA_ACT2_MIN 0.0 -param set-default CA_ACT3_MIN 0.0 -param set-default CA_ACT0_MAX 1.0 -param set-default CA_ACT1_MAX 1.0 -param set-default CA_ACT2_MAX 1.0 -param set-default CA_ACT3_MAX 1.0 +param set-default CA_MC_R_COUNT 4 param set-default CA_MC_R0_PX 0.177 param set-default CA_MC_R0_PY 0.177 -param set-default CA_MC_R0_CT 6.5 param set-default CA_MC_R0_KM 0.05 param set-default CA_MC_R1_PX -0.177 param set-default CA_MC_R1_PY -0.177 -param set-default CA_MC_R1_CT 6.5 param set-default CA_MC_R1_KM 0.05 param set-default CA_MC_R2_PX 0.177 param set-default CA_MC_R2_PY -0.177 -param set-default CA_MC_R2_CT 6.5 param set-default CA_MC_R2_KM -0.05 param set-default CA_MC_R3_PX -0.177 param set-default CA_MC_R3_PY 0.177 -param set-default CA_MC_R3_CT 6.5 param set-default CA_MC_R3_KM -0.05 param set-default PWM_MAIN_FUNC1 101 diff --git a/ROMFS/px4fmu_common/init.d/airframes/6003_hexa_x_ctrlalloc b/ROMFS/px4fmu_common/init.d/airframes/6003_hexa_x_ctrlalloc index e24b42f629..00ed015524 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/6003_hexa_x_ctrlalloc +++ b/ROMFS/px4fmu_common/init.d/airframes/6003_hexa_x_ctrlalloc @@ -13,56 +13,32 @@ . ${R}etc/init.d/rc.mc_defaults param set-default SYS_CTRL_ALLOC 1 -param set-default MPC_USE_HTE 0 - -param set-default VM_MASS 1.5 -param set-default VM_INERTIA_XX 0.03 -param set-default VM_INERTIA_YY 0.03 -param set-default VM_INERTIA_ZZ 0.05 param set-default CA_AIRFRAME 0 -param set-default CA_ACT0_MIN 0.0 -param set-default CA_ACT1_MIN 0.0 -param set-default CA_ACT2_MIN 0.0 -param set-default CA_ACT3_MIN 0.0 -param set-default CA_ACT4_MIN 0.0 -param set-default CA_ACT5_MIN 0.0 - -param set-default CA_ACT0_MAX 1.0 -param set-default CA_ACT1_MAX 1.0 -param set-default CA_ACT2_MAX 1.0 -param set-default CA_ACT3_MAX 1.0 -param set-default CA_ACT4_MAX 1.0 -param set-default CA_ACT5_MAX 1.0 +param set-default CA_MC_R_COUNT 6 param set-default CA_MC_R0_PX 0.0 param set-default CA_MC_R0_PY 0.275 -param set-default CA_MC_R0_CT 6.5 param set-default CA_MC_R0_KM -0.05 param set-default CA_MC_R1_PX 0.0 param set-default CA_MC_R1_PY -0.275 -param set-default CA_MC_R1_CT 6.5 param set-default CA_MC_R1_KM 0.05 param set-default CA_MC_R2_PX 0.238 param set-default CA_MC_R2_PY -0.1375 -param set-default CA_MC_R2_CT 6.5 param set-default CA_MC_R2_KM -0.05 param set-default CA_MC_R3_PX -0.238 param set-default CA_MC_R3_PY 0.1375 -param set-default CA_MC_R3_CT 6.5 param set-default CA_MC_R3_KM 0.05 param set-default CA_MC_R4_PX 0.238 param set-default CA_MC_R4_PY 0.1375 -param set-default CA_MC_R4_CT 6.5 param set-default CA_MC_R4_KM 0.05 param set-default CA_MC_R5_PX -0.238 param set-default CA_MC_R5_PY -0.1375 -param set-default CA_MC_R5_CT 6.5 param set-default CA_MC_R5_KM -0.05 param set-default PWM_MAIN_FUNC1 101 diff --git a/src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp b/src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp index 751dd5e5bf..134e8891bf 100644 --- a/src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp +++ b/src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp @@ -41,6 +41,13 @@ #include "ControlAllocation.hpp" +ControlAllocation::ControlAllocation() +{ + _control_allocation_scale.setAll(1.f); + _actuator_min.setAll(0.f); + _actuator_max.setAll(1.f); +} + void ControlAllocation::setEffectivenessMatrix( const matrix::Matrix &effectiveness, diff --git a/src/modules/control_allocator/ControlAllocation/ControlAllocation.hpp b/src/modules/control_allocator/ControlAllocation/ControlAllocation.hpp index 67441b9ffb..75f1c31151 100644 --- a/src/modules/control_allocator/ControlAllocation/ControlAllocation.hpp +++ b/src/modules/control_allocator/ControlAllocation/ControlAllocation.hpp @@ -74,7 +74,7 @@ class ControlAllocation { public: - ControlAllocation() { _control_allocation_scale.setAll(1.f); } + ControlAllocation(); virtual ~ControlAllocation() = default; static constexpr uint8_t NUM_ACTUATORS = 16; diff --git a/src/modules/control_allocator/ControlAllocator.cpp b/src/modules/control_allocator/ControlAllocator.cpp index 354302f022..73c908ffa9 100644 --- a/src/modules/control_allocator/ControlAllocator.cpp +++ b/src/modules/control_allocator/ControlAllocator.cpp @@ -93,46 +93,6 @@ ControlAllocator::parameters_updated() return; } - // Minimum actuator values - matrix::Vector actuator_min; - actuator_min(0) = _param_ca_act0_min.get(); - actuator_min(1) = _param_ca_act1_min.get(); - actuator_min(2) = _param_ca_act2_min.get(); - actuator_min(3) = _param_ca_act3_min.get(); - actuator_min(4) = _param_ca_act4_min.get(); - actuator_min(5) = _param_ca_act5_min.get(); - actuator_min(6) = _param_ca_act6_min.get(); - actuator_min(7) = _param_ca_act7_min.get(); - actuator_min(8) = _param_ca_act8_min.get(); - actuator_min(9) = _param_ca_act9_min.get(); - actuator_min(10) = _param_ca_act10_min.get(); - actuator_min(11) = _param_ca_act11_min.get(); - actuator_min(12) = _param_ca_act12_min.get(); - actuator_min(13) = _param_ca_act13_min.get(); - actuator_min(14) = _param_ca_act14_min.get(); - actuator_min(15) = _param_ca_act15_min.get(); - _control_allocation->setActuatorMin(actuator_min); - - // Maximum actuator values - matrix::Vector actuator_max; - actuator_max(0) = _param_ca_act0_max.get(); - actuator_max(1) = _param_ca_act1_max.get(); - actuator_max(2) = _param_ca_act2_max.get(); - actuator_max(3) = _param_ca_act3_max.get(); - actuator_max(4) = _param_ca_act4_max.get(); - actuator_max(5) = _param_ca_act5_max.get(); - actuator_max(6) = _param_ca_act6_max.get(); - actuator_max(7) = _param_ca_act7_max.get(); - actuator_max(8) = _param_ca_act8_max.get(); - actuator_max(9) = _param_ca_act9_max.get(); - actuator_max(10) = _param_ca_act10_max.get(); - actuator_max(11) = _param_ca_act11_max.get(); - actuator_max(12) = _param_ca_act12_max.get(); - actuator_max(13) = _param_ca_act13_max.get(); - actuator_max(14) = _param_ca_act14_max.get(); - actuator_max(15) = _param_ca_act15_max.get(); - _control_allocation->setActuatorMax(actuator_max); - _control_allocation->updateParameters(); update_effectiveness_matrix_if_needed(true); } diff --git a/src/modules/control_allocator/ControlAllocator.hpp b/src/modules/control_allocator/ControlAllocator.hpp index 75f3719fe7..d42e7f7795 100644 --- a/src/modules/control_allocator/ControlAllocator.hpp +++ b/src/modules/control_allocator/ControlAllocator.hpp @@ -159,41 +159,7 @@ private: DEFINE_PARAMETERS( (ParamInt) _param_ca_airframe, - (ParamInt) _param_ca_method, - (ParamBool) _param_ca_bat_scale_en, - (ParamBool) _param_ca_air_scale_en, - (ParamFloat) _param_ca_act0_min, - (ParamFloat) _param_ca_act1_min, - (ParamFloat) _param_ca_act2_min, - (ParamFloat) _param_ca_act3_min, - (ParamFloat) _param_ca_act4_min, - (ParamFloat) _param_ca_act5_min, - (ParamFloat) _param_ca_act6_min, - (ParamFloat) _param_ca_act7_min, - (ParamFloat) _param_ca_act8_min, - (ParamFloat) _param_ca_act9_min, - (ParamFloat) _param_ca_act10_min, - (ParamFloat) _param_ca_act11_min, - (ParamFloat) _param_ca_act12_min, - (ParamFloat) _param_ca_act13_min, - (ParamFloat) _param_ca_act14_min, - (ParamFloat) _param_ca_act15_min, - (ParamFloat) _param_ca_act0_max, - (ParamFloat) _param_ca_act1_max, - (ParamFloat) _param_ca_act2_max, - (ParamFloat) _param_ca_act3_max, - (ParamFloat) _param_ca_act4_max, - (ParamFloat) _param_ca_act5_max, - (ParamFloat) _param_ca_act6_max, - (ParamFloat) _param_ca_act7_max, - (ParamFloat) _param_ca_act8_max, - (ParamFloat) _param_ca_act9_max, - (ParamFloat) _param_ca_act10_max, - (ParamFloat) _param_ca_act11_max, - (ParamFloat) _param_ca_act12_max, - (ParamFloat) _param_ca_act13_max, - (ParamFloat) _param_ca_act14_max, - (ParamFloat) _param_ca_act15_max + (ParamInt) _param_ca_method ) }; diff --git a/src/modules/control_allocator/control_allocator_params.c b/src/modules/control_allocator/control_allocator_params.c deleted file mode 100644 index 9a94778cfa..0000000000 --- a/src/modules/control_allocator/control_allocator_params.c +++ /dev/null @@ -1,300 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2013-2019 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/** - * @file control_allocator_params.c - * - * Parameters for the control allocator. - * - * @author Julien Lecoeur - */ - - -/** - * Control allocation method - * - * @value 0 Pseudo-inverse with output clipping - * @value 1 Pseudo-inverse with sequential desaturation technique - * @min 0 - * @max 1 - * @group Control Allocation - */ -PARAM_DEFINE_INT32(CA_METHOD, 1); - -/** - * Battery power level scaler - * - * This compensates for voltage drop of the battery over time by attempting to - * normalize performance across the operating range of the battery. The copter - * should constantly behave as if it was fully charged with reduced max acceleration - * at lower battery percentages. i.e. if hover is at 0.5 throttle at 100% battery, - * it will still be 0.5 at 60% battery. - * - * @boolean - * @group Control Allocation - */ -PARAM_DEFINE_INT32(CA_BAT_SCALE_EN, 0); - -/** - * Airspeed scaler - * - * This compensates for the variation of flap effectiveness with airspeed. - * - * @boolean - * @group Control Allocation - */ -PARAM_DEFINE_INT32(CA_AIR_SCALE_EN, 0); - -/** - * Minimum value for actuator 0 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT0_MIN, 0.0); - -/** - * Minimum value for actuator 1 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT1_MIN, 0.0); - -/** - * Minimum value for actuator 2 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT2_MIN, 0.0); - -/** - * Minimum value for actuator 3 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT3_MIN, 0.0); - -/** - * Minimum value for actuator 4 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT4_MIN, 0.0); - -/** - * Minimum value for actuator 5 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT5_MIN, 0.0); - -/** - * Minimum value for actuator 6 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT6_MIN, 0.0); - -/** - * Minimum value for actuator 7 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT7_MIN, 0.0); - -/** - * Minimum value for actuator 8 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT8_MIN, 0.0); - -/** - * Minimum value for actuator 9 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT9_MIN, 0.0); - -/** - * Minimum value for actuator 10 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT10_MIN, 0.0); - -/** - * Minimum value for actuator 11 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT11_MIN, 0.0); - -/** - * Minimum value for actuator 12 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT12_MIN, 0.0); - -/** - * Minimum value for actuator 13 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT13_MIN, 0.0); - -/** - * Minimum value for actuator 14 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT14_MIN, 0.0); - -/** - * Minimum value for actuator 15 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT15_MIN, 0.0); - -/** - * Maximum value for actuator 0 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT0_MAX, 0.0); - -/** - * Maximum value for actuator 1 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT1_MAX, 0.0); - -/** - * Maximum value for actuator 2 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT2_MAX, 0.0); - -/** - * Maximum value for actuator 3 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT3_MAX, 0.0); - -/** - * Maximum value for actuator 4 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT4_MAX, 0.0); - -/** - * Maximum value for actuator 5 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT5_MAX, 0.0); - -/** - * Maximum value for actuator 6 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT6_MAX, 0.0); - -/** - * Maximum value for actuator 7 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT7_MAX, 0.0); - -/** - * Maximum value for actuator 8 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT8_MAX, 0.0); - -/** - * Maximum value for actuator 9 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT9_MAX, 0.0); - -/** - * Maximum value for actuator 10 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT10_MAX, 0.0); - -/** - * Maximum value for actuator 11 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT11_MAX, 0.0); - -/** - * Maximum value for actuator 12 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT12_MAX, 0.0); - -/** - * Maximum value for actuator 13 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT13_MAX, 0.0); - -/** - * Maximum value for actuator 14 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT14_MAX, 0.0); - -/** - * Maximum value for actuator 15 - * - * @group Control Allocation - */ -PARAM_DEFINE_FLOAT(CA_ACT15_MAX, 0.0); diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 94d10fc22d..d7de3439ad 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -18,6 +18,17 @@ parameters: 2: Tiltrotor VTOL (WIP) default: 0 + CA_METHOD: + description: + short: Control allocation method + long: | + Selects the algorithm and desaturation method + type: enum + values: + 0: Pseudo-inverse with output clipping + 1: Pseudo-inverse with sequential desaturation technique + default: 1 + # MC rotors CA_MC_R_COUNT: description: