forked from Archive/PX4-Autopilot
7229ec2a37
This commit is an attempt to fix a race condition happening on takeoff between the land detector and the multicopter position controller. Previously, an auto-takeoff leads to the following events: 1. A takeoff setpoint is given. 2. The thrust setpoint spikes because we don't enter smooth takeoff yet. 3. The land detector detects a takeoff because of the high thrust. 4. The position controller sees the landed state transition and initiates the smooth takeoff. Thrust goes back down. 5. Depending on control gains the takeoff is successful or fails if the smoothing takes too long which causes thrust to be too low, so the land detector detects land again. The two obvious problems with this are: - The intermittent spike. - The failed takeoff because of the smoothing leads to a delay.. With this change, the logic for a takeoff detection is moved from the land detector to the position controller. The events are now: 1. A takeoff setpoint is given. 2. The position controller detects the takeoff setpoint and initiates the smooth takeoff. 3. As thrust ramps up, the land detector detects the take off. In the same way, we now detect the intent to takeoff in manual, altitude, control, position control in the position controller instead of in the land detector. |
||
---|---|---|
.. | ||
px4fmu_common | ||
px4fmu_test | ||
sitl/mixers | ||
tap_common | ||
CMakeLists.txt |