Dennis Mannhart
ab1ae1fb4e
mc_pos_control_main: trigger failsafe if no setpoint along D-direction is valid
2018-07-20 09:26:18 +02:00
ChristophTobler
9362f844f4
position control: fix failsafe thrust
...
invert direction to point upwards and increase to 70% of throttle range between min and hover
2018-07-20 09:26:18 +02:00
ChristophTobler
7cc85885a4
position control: set _skip_controller before calling _interfaceMapping()
...
Without this failsafe will be overwritten
2018-07-20 09:26:18 +02:00
ChristophTobler
80867343ab
mc_pos_control: trigger failsafe if no pos, vel or thrust pair is valid
2018-07-20 09:26:18 +02:00
Dennis Mannhart
260284571d
mc_pos_control: move failsafe logic into method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ac2c49218d
mc_pos_control: remove mavlink_log_info
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f11a65a74f
mc_pos_control: fix overwrite for state velocity
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f2d559a4c2
mc_pos_control: minor refactor
2018-07-20 09:26:18 +02:00
Matthias Grob
cc0bc05156
mc_att_control: remove useless parameter MC_YAW_FF
...
It scales the yawspeed setpoint arbitrarily by default with 0.5.
This makes no sense because when you give a setpoint of 1rad/s then
you expect the setpoint to get executed. If you want manual yawspeed
response to be less agressive on the stick use the scaling parameter
for the stick MPC_MAN_Y_MAX.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
b5731e0ccd
FlightTaskOffboard: only start task if control mode flags are met
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bf4ac7a9d6
mc_pos_control: for terrain following use range sensor climbrate for velocity estimate
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e51e1bbe74
mc_pos_control: replace legacy refactor
...
Until now we replaced legacy position controller functionality inside
the flight task architecture to split up the huge position control
module into the different tasks and have a modular setup with a clear
setpoint interface. This commit removes all the legacy code and hard
switches to using the flight task architecture for multicopter.
This is done because maintaining and testing everything in parallel is
not sustainable. The architecture is by now tested to cover all basic
legacy functionality and missing corner cases can be fixed a lot easier
with the new architecture.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
a5e8eb23ad
PositionControl: saturate thrust integral
2018-07-20 09:26:18 +02:00
Dennis Mannhart
5ffcb6af01
PositionControl: set vel_dot to 0 if NAN
2018-07-20 09:26:18 +02:00
Dennis Mannhart
7b13803e2c
PositionControl: for thrust setpoints only use MPC_MANTHR_MIN for minimum thrust
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f30bf215db
MulticopterLanddetector: adjust minimum throttle if climb-reate is not enabled
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e8620708b3
PositionControl: set states to zero if not valid
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e6f6e2085c
ControlMath: remove false comment
2018-07-20 09:26:18 +02:00
Dennis Mannhart
9c7c60ddc8
remove mc_pos_control_tests
2018-07-20 09:26:18 +02:00
Dennis Mannhart
89c266e699
by value to reference
2018-07-20 09:26:18 +02:00
Dennis Mannhart
9c2ec3c229
PositionControl: add control states structure
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bf15e852ff
style-check
2018-07-20 09:26:18 +02:00
Dennis Mannhart
90a7d836fc
ControlMath:: add legacy cross_sphere_line method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c2343589d8
move cross_sphere_line_test method into test_controlmath.cpp
...
remove mc_pos_control_tests since empty
move test_controlmath.cpp into systemcmds/tests directory
2018-07-20 09:26:18 +02:00
Dennis Mannhart
09b7d0f659
the static keywork is a workaround for an internal bug of GCC
...
"internal compiler error: in trunc_int_for_mode, at explow.c:55"
2018-07-20 09:26:18 +02:00
MaEtUgR
70802ba15a
FlightTaskManual: Yaw lock with deadzone and expo
...
More than a year ago I started the easy to use math::Functions to handle
the always used mathematical SISO functions to be tested and available.
I switched x, y and z stick input to the freesh programmed deadzone and
exponential functions from the library to unify and clarify their use.
I just realized yaw was left over because it lead to a drift problem in
certain new use cases.
Now I'm just adding the yaw stick to the already well working method.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
8a3c7f9e41
PositionControl: style check
2018-07-20 09:26:18 +02:00
Dennis Mannhart
2519d97aa2
PositionControl: add failsafe
2018-07-20 09:26:18 +02:00
Dennis Mannhart
45810ec2b4
PositionControl: replace constraint structure with new constraint message structure
2018-07-20 09:26:18 +02:00
Dennis Mannhart
24e6e4041f
PositionControl: format clean up
2018-07-20 09:26:18 +02:00
Dennis Mannhart
89c0259b2a
PositionControl: replace overwrite with ModuleParams updateParams method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
4c1fcca294
PositionControl.cpp: replace all params with ModuleParams type. Add method that overwrites
...
parameter values
2018-07-20 09:26:18 +02:00
Dennis Mannhart
7dbc368779
PositionControl.hpp: inherit from ModuleParams and replace params with ModuleParams type
2018-07-20 09:26:18 +02:00
Dennis Mannhart
6cfb89a8e8
test_controlmath rebase fix: EPS to FLT_EPSILON
2018-07-20 09:26:18 +02:00
Dennis Mannhart
caa773008a
PositionControl: degrees to radians
2018-07-20 09:26:18 +02:00
Dennis Mannhart
4761f0a344
PositionControl: bug fix Pv replacement with Pp
2018-07-20 09:26:18 +02:00
Dennis Mannhart
83f6398e93
ControlMath: comments refactor
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c01fab089a
PositionControl parameter renaming. Use the the name as stored in the metadata
2018-07-20 09:26:18 +02:00
Dennis Mannhart
cf59c2a2ac
PositionControl/mc_pos_control: update comments
2018-07-20 09:26:18 +02:00
Dennis Mannhart
673945f28b
PositionControl: check if constraints are below global maximum
2018-07-20 09:26:18 +02:00
Dennis Mannhart
60a9b45c88
Positioncontrol: limit velocity upwards during smooth takeoff
2018-07-20 09:26:18 +02:00
Dennis Mannhart
0f4eb8e766
PositionControl: add integral reset methods
2018-07-20 09:26:18 +02:00
Dennis Mannhart
65a9cd171f
PositionControl: variable replacement
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e2ac12ef2c
FlightTask: comment fixes
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c6b5731086
test_controlmath: add first few tests for constrain function in xy
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c60481614e
ControlMath constrainxy: fix one of the condition
2018-07-20 09:26:18 +02:00
Dennis Mannhart
386b70dc58
ControlMath: add derivation and simplify computation
2018-07-20 09:26:18 +02:00
Dennis Mannhart
10bd3a50ba
PositionControl: parameter subscription declaration
2018-07-20 09:26:18 +02:00
Dennis Mannhart
7f68417d19
PositionControl: make distinction for throttle minimum depending on mode
2018-07-20 09:26:18 +02:00
Dennis Mannhart
26ca17e329
comment fix
2018-07-20 09:26:18 +02:00