diff --git a/src/modules/control_allocator/ControlAllocator.cpp b/src/modules/control_allocator/ControlAllocator.cpp index f73a6ecf26..3a740c2f30 100644 --- a/src/modules/control_allocator/ControlAllocator.cpp +++ b/src/modules/control_allocator/ControlAllocator.cpp @@ -227,6 +227,10 @@ ControlAllocator::update_effectiveness_source() tmp = new ActuatorEffectivenessFixedWing(this); break; + case EffectivenessSource::MOTORS_6DOF: // just a different UI from MULTIROTOR + tmp = new ActuatorEffectivenessRotors(this); + break; + default: PX4_ERR("Unknown airframe"); break; diff --git a/src/modules/control_allocator/ControlAllocator.hpp b/src/modules/control_allocator/ControlAllocator.hpp index bce976616c..12789956c6 100644 --- a/src/modules/control_allocator/ControlAllocator.hpp +++ b/src/modules/control_allocator/ControlAllocator.hpp @@ -141,6 +141,7 @@ private: ROVER_ACKERMANN = 3, ROVER_DIFFERENTIAL = 4, FIXED_WING = 5, + MOTORS_6DOF = 6, }; EffectivenessSource _effectiveness_source_id{EffectivenessSource::NONE}; diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 7a75c25316..b427ddf570 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -21,6 +21,7 @@ parameters: 3: Rover (Ackermann) 4: Rover (Differential) 5: Fixed Wing + 5: Motors (6DOF) default: 0 CA_METHOD: @@ -582,4 +583,23 @@ mixer: - name: 'CA_SV_CS${i}_TRIM' label: 'Trim' + 6: # Motors (6DOF) + actuators: + - actuator_type: 'motor' + count: 'CA_ROTOR_COUNT' + per_item_parameters: + standard: + position: [ 'CA_ROTOR${i}_PX', 'CA_ROTOR${i}_PY', 'CA_ROTOR${i}_PZ' ] + extra: + - name: 'CA_ROTOR${i}_AX' + label: 'Axis X' + function: 'axisx' + - name: 'CA_ROTOR${i}_AY' + label: 'Axis Y' + function: 'axisy' + - name: 'CA_ROTOR${i}_AZ' + label: 'Axis Z' + function: 'axisz' + - name: 'CA_ROTOR${i}_KM' + label: "Moment\nCoefficient"