26752 Commits

Author SHA1 Message Date
Dennis Mannhart
c907e7a9dc FlighttaskManualAlititude: replace SENS_FLOW_MINRNG with hagl_min 2018-07-20 09:26:18 +02:00
Dennis Mannhart
4af9d79986 FlighttaskManualPosition: check if estimator velocity maximum is finite
before applying limits
2018-07-20 09:26:18 +02:00
MaEtUgR
efed766919 FlightTasks: small rebase naming and typo fixes 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
29fb5089bd FlightTasks: construct all tasks in constructor 2018-07-20 09:26:18 +02:00
Dennis Mannhart
b1530d1a81 FlightTasks: create struct that contains FlightTask and FlightTaskIndex 2018-07-20 09:26:18 +02:00
Dennis Mannhart
83cc2b0e72 FlightTaskAuto: reset lock position to NAN 2018-07-20 09:26:18 +02:00
Dennis Mannhart
c12dcb4eed FlightTaskAuto: take care of case when triplet.lat/lon are invalid, which corresponds
to position lock.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
65ad6edaf0 ManualSmoothingXY: remove empty lines 2018-07-20 09:26:18 +02:00
Dennis Mannhart
b9d5189fe5 ManualSmoothing: direction change with maximum acceleration 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
33d0a4e8ed FlightTaskAuto: replace target with destination for checks 2018-07-20 09:26:18 +02:00
Dennis Mannhart
92e93639d3 FlightTaskAuto: require valid position in 3D 2018-07-20 09:26:18 +02:00
Dennis Mannhart
c4c01358b9 FlightTaskManualAltitude: do terrain following when distance sensor active and
below minimum distance to ground.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bd85f5f993 FlightTask: set min_distance_to_ground to NAN as default and when
distance sensor is used to SENS_FLOW_MINRNG
2018-07-20 09:26:18 +02:00
Dennis Mannhart
80775d588b vehicle constraints: minimum distance to ground. currently used when distance sensor
is available
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ee7d5c3f38 FlightTaskAuto: remove unused member variable 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
e408870857 FlightTaskManual: remove unused override 2018-07-20 09:26:18 +02:00
Dennis Mannhart
be6f3a5b48 FlightTaskOffboard: valid position and velocity is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart
bd2de0e585 FlightTaskAuto: valid target is required and valid reference 2018-07-20 09:26:18 +02:00
Dennis Mannhart
4713f47668 FlightTaskManualPosition: valid position/velocity in xy required 2018-07-20 09:26:18 +02:00
Dennis Mannhart
72a213aff7 FlightTaskManualAltitude: valid altitude/climb-rate is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart
fc4fa169df FlightTaskManualStabilized: valid yaw is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart
2af253fa9f FlightTaskManual: sticks not to be finite
activation method not needed
2018-07-20 09:26:18 +02:00
Dennis Mannhart
6a7a7d7ff7 FlightTask: check if states are valid. if not valid, set them to NAN 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
b2af9c3f58 FlightTasks: error to char string message 2018-07-20 09:26:18 +02:00
Dennis Mannhart
afd02aca92 FlightTask: fail activation if required states are not available 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
3ea7f8783f FlightTaskManualAltitude: fix comment 2018-07-20 09:26:18 +02:00
Dennis Mannhart
414f38b677 test_controlmath: work around for internal compiler error: in trunc_int_for_mode, at explow.c:55 2018-07-20 09:26:18 +02:00
Dennis Mannhart
c56ae130a7 test_controlmath remove static 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
a0c3c80b37 FlightTaskManualStabilized make reset counter for heading static 2018-07-20 09:26:18 +02:00
Dennis Mannhart
68dd2d739a ManualSmoothingXY indent 2018-07-20 09:26:18 +02:00
Dennis Mannhart
1317844a94 ManualSmoothingXY fix comments and style 2018-07-20 09:26:18 +02:00
Dennis Mannhart
250afd49a9 ManualSmoothingZ: update comments 2018-07-20 09:26:18 +02:00
Dennis Mannhart
216279b576 FlightTask: activate tasks with setpoints in use 2018-07-20 09:26:18 +02:00
Dennis Mannhart
389f897b04 mc_pos_control: member initialization during deceleration 2018-07-20 09:26:18 +02:00
Dennis Mannhart
46f91154a4 Smoothing: initialize ModuleParam in body of constructor because of compiler error 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
cfe7d64a42 cmake/configs: remove module test for mc_pos_control 2018-07-20 09:26:18 +02:00
Dennis Mannhart
c6055c979a systemcmds/tests: add test_controlmath 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