control_allocator: add 6DOF configuration

This commit is contained in:
Beat Küng 2021-12-03 11:55:29 +01:00 committed by Daniel Agar
parent 4c80adfaf1
commit e04b4a8dbf
3 changed files with 25 additions and 0 deletions

View File

@ -227,6 +227,10 @@ ControlAllocator::update_effectiveness_source()
tmp = new ActuatorEffectivenessFixedWing(this); tmp = new ActuatorEffectivenessFixedWing(this);
break; break;
case EffectivenessSource::MOTORS_6DOF: // just a different UI from MULTIROTOR
tmp = new ActuatorEffectivenessRotors(this);
break;
default: default:
PX4_ERR("Unknown airframe"); PX4_ERR("Unknown airframe");
break; break;

View File

@ -141,6 +141,7 @@ private:
ROVER_ACKERMANN = 3, ROVER_ACKERMANN = 3,
ROVER_DIFFERENTIAL = 4, ROVER_DIFFERENTIAL = 4,
FIXED_WING = 5, FIXED_WING = 5,
MOTORS_6DOF = 6,
}; };
EffectivenessSource _effectiveness_source_id{EffectivenessSource::NONE}; EffectivenessSource _effectiveness_source_id{EffectivenessSource::NONE};

View File

@ -21,6 +21,7 @@ parameters:
3: Rover (Ackermann) 3: Rover (Ackermann)
4: Rover (Differential) 4: Rover (Differential)
5: Fixed Wing 5: Fixed Wing
5: Motors (6DOF)
default: 0 default: 0
CA_METHOD: CA_METHOD:
@ -582,4 +583,23 @@ mixer:
- name: 'CA_SV_CS${i}_TRIM' - name: 'CA_SV_CS${i}_TRIM'
label: '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"