Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Control Allocation #13351

Closed
wants to merge 129 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
b244c2c
LPF: add sample frequency getter
jlecoeur Oct 17, 2019
7928b8f
uORB: Add angular accel, torque & thrust setpoints
jlecoeur Oct 17, 2019
d927c33
logger: log angular acceleration, torque and thrust setpoints for sys…
jlecoeur Oct 17, 2019
31d9ed7
sitl iris: set inertia and update gains
jlecoeur Oct 25, 2019
7028051
Add topic vehicle_actuator_setpoint
jlecoeur Nov 23, 2019
88b1298
Add actuator control groups 4 and 5
jlecoeur Nov 1, 2019
4a68c10
PX4IO: adapt to added control groups 4 and 5
jlecoeur Nov 1, 2019
b6bf0f1
mixer_module: adapt to added control groups 4 and 5
jlecoeur Nov 1, 2019
15f0a03
Add mixer type AllocatedActuatorMixer (A:)
jlecoeur Nov 1, 2019
27e34b6
Add generic quad, hexa and octo mixers
jlecoeur Nov 1, 2019
d0291f0
Add ControlAllocation base class
jlecoeur Nov 1, 2019
38cadb7
control_allocation: introduced ControlAllocationPseudoInverse class
jlecoeur Nov 1, 2019
9648ef6
Add control_allocator module
jlecoeur Nov 1, 2019
b952370
control_allocation: implemented sequential desaturation class
RomanBapst Nov 19, 2019
170a7ed
px4_sitl_default: build control_allocator
jlecoeur Nov 1, 2019
c316a19
px4_fmu-v5_default: build control_allocator
jlecoeur Nov 1, 2019
e87a98a
px4_fmu-v2_default: build control_allocator
jlecoeur Nov 1, 2019
71fc9fb
mc/fw/vtol startup scripts: start control_allocator
jlecoeur Nov 1, 2019
9a2afb3
sitl iris: use control allocation module
jlecoeur Nov 1, 2019
b39e5b6
sitl_typhoon: use control allocator module
jlecoeur Nov 18, 2019
ba91f12
[WIP] test on PX4IO
jlecoeur Nov 16, 2019
c1df715
control_allocator: fixed negative saturation status reporting
RomanBapst Nov 28, 2019
568492d
standard.cpp: set pusher thrust setpoint
RomanBapst Nov 25, 2019
908d09b
sitl standard vtol: set parameters required for CA module
RomanBapst Nov 25, 2019
fdcf144
added direct mixer to fly stanard vtol with control allocation module
RomanBapst Nov 25, 2019
961311c
SITL: use direct mixer for standard vtol
RomanBapst Nov 25, 2019
63ee029
control_allocator: added control effectiveness matrix for fixed wing …
RomanBapst Nov 28, 2019
1155f2e
control allocation: fomatting fix
RomanBapst Nov 28, 2019
73fd294
control_allocator: maintain quad_w effectiveness
jlecoeur Nov 28, 2019
bc30f49
sitl standard_vtol: set param CA_AIRFRAME
jlecoeur Nov 28, 2019
236a289
Fix standard_vtol param names
jlecoeur Nov 28, 2019
ed822ac
fmu-v2: do not build control_allocator
jlecoeur Nov 28, 2019
266b819
Add angular_velocity_controller module
jlecoeur Nov 28, 2019
836f0c7
sitl iris: revert default gains
jlecoeur Nov 28, 2019
09b0f9a
sitl standard_vtol: use default inertia
jlecoeur Nov 28, 2019
2556c71
mc/fw/vtol: revert control_allocator autostart
jlecoeur Nov 28, 2019
b86535e
fmu-v5: build angular_velocity_controller
jlecoeur Nov 28, 2019
d2668f7
sitl: build angular_velocity_controller
jlecoeur Nov 28, 2019
766d615
Add rc.new_apps script to test new controllers and control allocator
jlecoeur Nov 28, 2019
e3b5b6d
sitl: autostart new apps
jlecoeur Nov 28, 2019
9889164
sitl typhoon_h480: set inertia and gains
jlecoeur Nov 28, 2019
fb4c9d5
format
jlecoeur Nov 28, 2019
97130d7
sitl standard_vtol: disable control allocation (CI fails)
jlecoeur Nov 28, 2019
e87dd7b
AngularVelocityController: fixup
jlecoeur Nov 28, 2019
e7e7872
ControlAllocation: fix appveyor build
jlecoeur Nov 28, 2019
3a53b7d
angular_velocity_controller: run in FW mode
jlecoeur Nov 28, 2019
af72fc8
control_allocator: do not publish multirotor_motor_limits
jlecoeur Nov 28, 2019
cddf12b
control_allocator: fix param metadata
jlecoeur Nov 28, 2019
544b9a3
standard_vtol: activate both motors and flaps during transitions
jlecoeur Nov 28, 2019
736dfa1
standard_vtol: reactivate control allocation
jlecoeur Nov 28, 2019
57bab34
control_allocator: enumerate airframes
jlecoeur Nov 28, 2019
29fe598
format
jlecoeur Nov 28, 2019
212dd59
ControlAllocation: fix global defined macro interfering with local me…
MaEtUgR Nov 29, 2019
e136a42
control_allocation: rename _B -> _effectiveness
jlecoeur Nov 29, 2019
bac71d6
control_allocation: rename _A -> _mix
jlecoeur Nov 29, 2019
17946d2
control_allocation: fix method names
jlecoeur Nov 29, 2019
11a87a5
control_allocation: fix state in setActuatorSetpoint
jlecoeur Nov 29, 2019
81827ae
control_allocation: fixup
jlecoeur Nov 29, 2019
32c524a
control_allocator: update effectiveness when changed
jlecoeur Nov 29, 2019
28bedf9
Add tiltrotor effectiveness (WIP)
jlecoeur Nov 29, 2019
1cc5bab
sitl tiltrotor: add direct mixer
jlecoeur Nov 29, 2019
16976b1
control_allocation: make allocation incremental
jlecoeur Nov 29, 2019
e07d49f
control_allocation: update method signature
jlecoeur Dec 1, 2019
8afc742
ControlAllocationPseudoInverse: rename _A_update_needed -> _mix_updat…
jlecoeur Dec 1, 2019
fd8a8ab
ControlAllocation: set trim with effectiveness
jlecoeur Dec 1, 2019
9ccddf5
ControlAllocationPseudoInverse: set trim with effectiveness
jlecoeur Dec 1, 2019
8b3dba7
ControlAllocationSequentialDesaturation: set trim with effectiveness
jlecoeur Dec 1, 2019
6a50223
ControlAllocator: set trim with effectiveness
jlecoeur Dec 1, 2019
4d6199b
sitl tiltrotor: type
jlecoeur Dec 1, 2019
7b19e81
sitl tiltrotor: use control allocation
jlecoeur Dec 1, 2019
5bab9d9
Fix rebase conflicts
jlecoeur Jun 9, 2020
e3c61c0
angvelctrl: align param order with mc_rate_control
jlecoeur Jun 9, 2020
10e4887
allocator: fill allocation success flags
jlecoeur Jun 9, 2020
334d34b
Format
jlecoeur Jun 9, 2020
1ca1172
Add AllocationMethod enum
jlecoeur Jun 9, 2020
7cefa56
Print more info
jlecoeur Jun 9, 2020
0e776d2
Move effectiveness matrices to provider classes
jlecoeur Jun 11, 2020
b2ffda0
Generate MC effectiveness from params
jlecoeur Jun 14, 2020
fb0ad54
Run control allocator in its own work queue
jlecoeur Jun 15, 2020
e5c5ee5
Revert CA support from px4io
jlecoeur Jun 15, 2020
2eca2f2
Add common direct.main.mix mixer
jlecoeur Jun 15, 2020
67d45ef
Define moment coefficient as moment/thrust ratio
jlecoeur Jun 15, 2020
4f4c2f7
Remove unused airframe
jlecoeur Jun 15, 2020
82517e8
Set iris geometry
jlecoeur Jun 15, 2020
a102f39
Set iris inertia (same as gazebo model)
jlecoeur Jun 15, 2020
c37f16c
AVC: convert thrust_sp into Newtons
jlecoeur Jun 15, 2020
2f21ecd
Clarify comment
jlecoeur Jun 15, 2020
c76a0bb
iris: set correct rotor rotation directions
jlecoeur Jun 15, 2020
7d4f438
Disable hover thrust estimator (does not play nice with control alloc…
jlecoeur Jun 15, 2020
b134f9d
Display transpose of effectiveness
jlecoeur Jun 15, 2020
84536f8
typhoon sitl: configure geometry, mass and inertia
jlecoeur Jun 15, 2020
451b2a5
Update src/lib/mixer/AllocatedActuatorMixer/AllocatedActuatorMixer.cpp
jlecoeur Jun 16, 2020
e5827c6
Rename rc.new_apps -> rc.ctrlalloc
jlecoeur Jun 16, 2020
5df96d0
Stop mc_rate_control when using avc
jlecoeur Jun 16, 2020
c6edf3f
do not build control alloca modules by default
jlecoeur Jun 16, 2020
a87d81b
fmu-v3, fmu-v5, sitl: add *_ctrlalloc target
jlecoeur Jun 16, 2020
acafdb9
sitl: do not start control alloc by default
jlecoeur Jun 16, 2020
f4b0188
Add iris_ctrlalloc and typhoon_ctralloc sitl airframes
jlecoeur Jun 16, 2020
851c4d7
Add ActuatorEffectivenessMultirotor unit test
jlecoeur Jun 16, 2020
3a135bf
revert typhoon sitl airframe changes
jlecoeur Jun 16, 2020
804b30d
Update sitl_gazebo with control_allocation sitl models
jlecoeur Jun 16, 2020
1b49fbc
Add target px4_fmu-v4_ctrlalloc
jlecoeur Jun 16, 2020
31615ec
Run AVC in wq:ctrl_alloc
jlecoeur Jun 16, 2020
f117dbe
Typhoon: increase inertia
jlecoeur Jun 24, 2020
b247368
Add params to simulate actuator failure
jlecoeur Jun 24, 2020
84c7fc1
control_allocator: build with MAX_CUSTOM_OPT_LEVEL
jlecoeur Jul 11, 2020
b5a8d86
angular_velocity_controller: build with MAX_CUSTOM_OPT_LEVEL
jlecoeur Jul 11, 2020
69b4a41
Small fixes
jlecoeur Jul 11, 2020
6a73f6f
Fix tests
jlecoeur Jul 11, 2020
a8f3582
add quad and hexa CA airframe configs
sfuhrer Jul 9, 2020
a0af613
CA: add control allocation topics
sfuhrer Jul 8, 2020
74eb95f
Disable hover thrust estimator and prearming
jlecoeur Jul 11, 2020
75226d8
Update sitl_gazebo submodule
jlecoeur Jul 11, 2020
c18b205
Disable ActuatorEffectiveness tests
jlecoeur Jul 11, 2020
8a1a20d
Format
jlecoeur Jul 11, 2020
b948595
mixer module: handle all actuator_controls of 4 and 5 as rotors, e.g.…
sfuhrer Jul 16, 2020
b8b168a
Revert "Add params to simulate actuator failure"
sfuhrer Jul 17, 2020
66b066d
CA_AIRFRAME: clean up param description
sfuhrer Jul 17, 2020
ba29c28
fix control_allocator_status: torque_setpoint_achieved and thrust_set…
bkueng Aug 13, 2020
354126f
control_allocator: remove unused _task_start
bkueng Aug 13, 2020
703fb00
fix control_allocator: use 'delete' instead of 'free', guard against …
bkueng Aug 13, 2020
54dfdb0
fix control_allocator: set _last_run at the correct place
bkueng Aug 13, 2020
de10a3c
refactor control_allocator: directly get the effectiveness matrix whe…
bkueng Aug 13, 2020
8c4cfe6
control_allocator: change SequentialDesaturation to existing MC mixer
bkueng Aug 13, 2020
fde6fb8
control_allocator: avoid vector copies and sqrt()
bkueng Aug 13, 2020
f8d245d
control_allocator: inline one-line setters & getters
bkueng Aug 13, 2020
bdacca3
control_allocator: ensure unused outputs are initialized to min
bkueng Aug 13, 2020
2d3d6e8
control_allocator: set unused actuators to trim instead of min
bkueng Aug 14, 2020
014d6ac
ActuatorEffectivenessMultirotor: set effectiveness to zero when compu…
bkueng Aug 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/10017_iris_ctrlalloc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL
#
# @type Quadrotor Wide
#
# @maintainer Julian Oes <julian@oes.ch>
Comment on lines +3 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so 😄

#

sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/rc.ctrlalloc

if [ $AUTOCNF = yes ]
then
param set MPC_USE_HTE 0

param set VM_MASS 1.5
param set VM_INERTIA_XX 0.03
param set VM_INERTIA_YY 0.03
param set VM_INERTIA_ZZ 0.05

param set CA_AIRFRAME 0
param set CA_METHOD 1
param set CA_ACT0_MIN 0.0
param set CA_ACT1_MIN 0.0
param set CA_ACT2_MIN 0.0
param set CA_ACT3_MIN 0.0
param set CA_ACT0_MAX 1.0
param set CA_ACT1_MAX 1.0
param set CA_ACT2_MAX 1.0
param set CA_ACT3_MAX 1.0

param set CA_MC_R0_PX 0.1515
param set CA_MC_R0_PY 0.245
param set CA_MC_R0_CT 6.5
param set CA_MC_R0_KM 0.05
param set CA_MC_R1_PX -0.1515
param set CA_MC_R1_PY -0.1875
param set CA_MC_R1_CT 6.5
param set CA_MC_R1_KM 0.05
param set CA_MC_R2_PX 0.1515
param set CA_MC_R2_PY -0.245
param set CA_MC_R2_CT 6.5
param set CA_MC_R2_KM -0.05
param set CA_MC_R3_PX -0.1515
param set CA_MC_R3_PY 0.1875
param set CA_MC_R3_CT 6.5
param set CA_MC_R3_KM -0.05

fi

set MIXER direct

26 changes: 24 additions & 2 deletions ROMFS/px4fmu_common/init.d-posix/1040_standard_vtol
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,31 @@ then
param set VT_TYPE 2
param set VT_B_TRANS_DUR 8

param set CA_AIRFRAME 1

param set CA_ACT0_MIN 0.0
param set CA_ACT1_MIN 0.0
param set CA_ACT2_MIN 0.0
param set CA_ACT3_MIN 0.0
param set CA_ACT0_MAX 1.0
param set CA_ACT1_MAX 1.0
param set CA_ACT2_MAX 1.0
param set CA_ACT3_MAX 1.0

param set CA_ACT4_MIN 0.0
param set CA_ACT4_MAX 1.0

param set CA_ACT5_MIN -1.0
param set CA_ACT5_MAX 1.0
param set CA_ACT6_MIN -1.0
param set CA_ACT6_MAX 1.0
param set CA_ACT7_MIN -1.0
param set CA_ACT7_MAX 1.0

fi

set MAV_TYPE 22

set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
set MIXER custom
# set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
# set MIXER custom
set MIXER direct
27 changes: 25 additions & 2 deletions ROMFS/px4fmu_common/init.d-posix/1042_tiltrotor
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,35 @@ then
param set VT_TILT_FW 1
param set VT_TILT_TRANS 0.6
param set VT_ELEV_MC_LOCK 0
param set VT_TYPE 1
param set VT_B_TRANS_DUR 8

# param set VT_TYPE 1
param set VT_TYPE 2

param set CA_AIRFRAME 2

param set CA_ACT0_MIN 0
param set CA_ACT0_MAX 1
param set CA_ACT1_MIN 0
param set CA_ACT1_MAX 1
param set CA_ACT2_MIN 0
param set CA_ACT2_MAX 1
param set CA_ACT3_MIN 0
param set CA_ACT3_MAX 1

param set CA_ACT4_MIN -0.1
param set CA_ACT4_MAX 1.5
param set CA_ACT5_MIN -0.1
param set CA_ACT5_MAX 1.5
param set CA_ACT6_MIN -0.1
param set CA_ACT6_MAX 1.5
param set CA_ACT7_MIN -0.1
param set CA_ACT7_MAX 1.5

fi

set MAV_TYPE 21

set MIXER_FILE etc/mixers-sitl/tiltrotor_sitl.main.mix
# set MIXER_FILE etc/mixers-sitl/tiltrotor_sitl.main.mix
set MIXER_FILE etc/mixers-sitl/tiltrotor_sitl_direct.main.mix
set MIXER custom
75 changes: 75 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/6012_typhoon_ctrlalloc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/sh
#
# @name Typhoon H480 SITL
#
# @type Hexarotor x
#

sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/rc.ctrlalloc

if [ $AUTOCNF = yes ]
then
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_P_ACC 3

param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0

param set TRIG_INTERFACE 3
param set TRIG_MODE 4
param set MNT_MODE_IN 0
param set MAV_PROTO_VER 2

param set MPC_USE_HTE 0

param set VM_MASS 2.66
param set VM_INERTIA_XX 0.06
param set VM_INERTIA_YY 0.06
param set VM_INERTIA_ZZ 0.10

param set CA_AIRFRAME 0
param set CA_METHOD 1
param set CA_ACT0_MIN 0.0
param set CA_ACT1_MIN 0.0
param set CA_ACT2_MIN 0.0
param set CA_ACT3_MIN 0.0
param set CA_ACT4_MIN 0.0
param set CA_ACT5_MIN 0.0
param set CA_ACT0_MAX 1.0
param set CA_ACT1_MAX 1.0
param set CA_ACT2_MAX 1.0
param set CA_ACT3_MAX 1.0
param set CA_ACT4_MAX 1.0
param set CA_ACT5_MAX 1.0

param set CA_MC_R0_PX 0.0
param set CA_MC_R0_PY 1.0
param set CA_MC_R0_CT 9.5
param set CA_MC_R0_KM -0.05
param set CA_MC_R1_PX 0.0
param set CA_MC_R1_PY -1.0
param set CA_MC_R1_CT 9.5
param set CA_MC_R1_KM 0.05
param set CA_MC_R2_PX 0.866025
param set CA_MC_R2_PY -0.5
param set CA_MC_R2_CT 9.5
param set CA_MC_R2_KM -0.05
param set CA_MC_R3_PX -0.866025
param set CA_MC_R3_PY 0.5
param set CA_MC_R3_CT 9.5
param set CA_MC_R3_KM 0.05
param set CA_MC_R4_PX 0.866025
param set CA_MC_R4_PY 0.5
param set CA_MC_R4_CT 9.5
param set CA_MC_R4_KM 0.05
param set CA_MC_R5_PX -0.866025
param set CA_MC_R5_PY -0.5
param set CA_MC_R5_CT 9.5
param set CA_MC_R5_KM -0.05
fi

set MAV_TYPE 13

# set MIXER hexa_x
set MIXER direct
10 changes: 10 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/6012_typhoon_ctrlalloc.post
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix

mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530

# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ px4_add_romfs_files(
rc.vehicle_setup
rc.vtol_apps
rc.vtol_defaults
rc.ctrlalloc
)
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/airframes/4001_quad_x
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
sh /etc/init.d/rc.mc_defaults

set MIXER quad_x
# set MIXER quad

set PWM_OUT 1234
57 changes: 57 additions & 0 deletions ROMFS/px4fmu_common/init.d/airframes/4017_s500_ctrlalloc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/sh
#
# @name S500 with control allocation
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Silvan Fuhrer
#

sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/rc.ctrlalloc

if [ $AUTOCNF = yes ]
then
param set MPC_USE_HTE 0

param set VM_MASS 1.5
param set VM_INERTIA_XX 0.03
param set VM_INERTIA_YY 0.03
param set VM_INERTIA_ZZ 0.05

param set CA_AIRFRAME 0
param set CA_METHOD 1
param set CA_ACT0_MIN 0.0
param set CA_ACT1_MIN 0.0
param set CA_ACT2_MIN 0.0
param set CA_ACT3_MIN 0.0
param set CA_ACT0_MAX 1.0
param set CA_ACT1_MAX 1.0
param set CA_ACT2_MAX 1.0
param set CA_ACT3_MAX 1.0

param set CA_MC_R0_PX 0.177
param set CA_MC_R0_PY 0.177
param set CA_MC_R0_CT 6.5
param set CA_MC_R0_KM 0.05
param set CA_MC_R1_PX -0.177
param set CA_MC_R1_PY -0.177
param set CA_MC_R1_CT 6.5
param set CA_MC_R1_KM 0.05
param set CA_MC_R2_PX 0.177
param set CA_MC_R2_PY -0.177
param set CA_MC_R2_CT 6.5
param set CA_MC_R2_KM -0.05
param set CA_MC_R3_PX -0.177
param set CA_MC_R3_PY 0.177
param set CA_MC_R3_CT 6.5
param set CA_MC_R3_KM -0.05

fi

set MIXER direct
set PWM_OUT 1234

set MIXER_AUX direct_aux
set PWM_AUX_OUT 1234
75 changes: 75 additions & 0 deletions ROMFS/px4fmu_common/init.d/airframes/6002_hexa_x_ctrlalloc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/sh
#
# @name Hex X with control allocation
#
# @type Hexarotor x
# @class Copter
#
# @maintainer Silvan Fuhrer
#

sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/rc.ctrlalloc

if [ $AUTOCNF = yes ]
then
param set MPC_USE_HTE 0

param set VM_MASS 1.5
param set VM_INERTIA_XX 0.03
param set VM_INERTIA_YY 0.03
param set VM_INERTIA_ZZ 0.05

param set CA_AIRFRAME 0
param set CA_METHOD 1
param set CA_ACT0_MIN 0.0
param set CA_ACT1_MIN 0.0
param set CA_ACT2_MIN 0.0
param set CA_ACT3_MIN 0.0
param set CA_ACT4_MIN 0.0
param set CA_ACT5_MIN 0.0

param set CA_ACT0_MAX 1.0
param set CA_ACT1_MAX 1.0
param set CA_ACT2_MAX 1.0
param set CA_ACT3_MAX 1.0
param set CA_ACT4_MAX 1.0
param set CA_ACT5_MAX 1.0

param set CA_MC_R0_PX 0.0
param set CA_MC_R0_PY 0.275
param set CA_MC_R0_CT 6.5
param set CA_MC_R0_KM -0.05

param set CA_MC_R1_PX 0.0
param set CA_MC_R1_PY -0.275
param set CA_MC_R1_CT 6.5
param set CA_MC_R1_KM 0.05

param set CA_MC_R2_PX 0.238
param set CA_MC_R2_PY -0.1375
param set CA_MC_R2_CT 6.5
param set CA_MC_R2_KM -0.05

param set CA_MC_R3_PX -0.238
param set CA_MC_R3_PY 0.1375
param set CA_MC_R3_CT 6.5
param set CA_MC_R3_KM 0.05

param set CA_MC_R4_PX 0.238
param set CA_MC_R4_PY 0.1375
param set CA_MC_R4_CT 6.5
param set CA_MC_R4_KM 0.05

param set CA_MC_R5_PX -0.238
param set CA_MC_R5_PY -0.1375
param set CA_MC_R5_CT 6.5
param set CA_MC_R5_KM -0.05

fi

set MIXER direct
set PWM_OUT 123456

set MIXER_AUX direct_aux
set PWM_AUX_OUT 123456
26 changes: 26 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.ctrlalloc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
#
# Standard apps for new control allocation and controllers
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#

#
# Start angular velocity controller
#
angular_velocity_controller start
mc_rate_control stop

#
# Start Control Allocator
#
control_allocator start

#
# Disable hover thrust estimator and prearming
# These features are currently incompatible with control allocation
#
# TODO: fix
#
param set MPC_USE_HTE 0
param set COM_PREARM_MODE 0
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/rc.fw_apps
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ekf2 start
fw_att_control start
fw_pos_control_l1 start
airspeed_selector start

#
# Start Land Detector.
#
Expand Down
Loading