Commit Graph

204 Commits

Author SHA1 Message Date
Philipp Oettershagen 7a82c777b2 LandDetector FW: Fix param min/max values and descriptions as well as some variable names which were wrong/outdated (#9708) 2018-06-20 16:13:33 -04:00
Daniel Agar d73d20bcce systemlib delete unused systemlib.h 2018-06-12 09:06:30 +02:00
Mohammed Kabir 1a2f9dd37a land_detector : use INFINITY when altitude limiting is not needed 2018-06-09 13:38:04 +02:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Beat Küng 123f11fcdd land_detector: use user-defined literals for time constants 2018-04-14 13:45:57 +02:00
Daniel Agar 25300a6b11 VtolLandDetector add airspeed finite check 2018-03-26 09:42:50 -04:00
Daniel Agar 493c41c76e VtolLandDetector require vehicle_status timestamp 2018-03-05 15:46:24 -05:00
Daniel Agar 354584acfc MulticopterLandDetector initialize all class members 2018-03-05 15:46:24 -05:00
Daniel Agar 69470f6991 land_detector use THROTTLE index 2018-03-05 15:46:24 -05:00
Daniel Agar 2ae5e575a5 land detector initialize landed and publish periodically 2018-01-24 17:36:53 +01:00
Lorenz Meier b07deed6c6 Land detector: Update param metadata
This helps with param transfers and will hide these params by default from the user.
2018-01-08 09:27:22 +01:00
Daniel Agar ec57832a8f FW land detector increase trigger time and cleanup (#8486) 2017-12-21 12:17:32 -05:00
Dennis Mannhart 26e85736a5 land_detector: Reduce and detection false negatives due to estimator bias
Using the vertical derivative estimate prevents vertical velocity offsets caused by estimation vertical velocity errors preventing the vehicle disarming.
2017-12-12 12:14:24 +00:00
Beat Küng a0afc370d0 land detector: move arming state into base class & set param when disarming
Before that, different modules (ekf2, commander & land detector) changed
params upon different events:
- ekf2 & commander set params after disarm
- land detector set params on land detected
If the 2 events were several 100ms appart, it led to 2 param saves, and
the latter param set could have been blocked by an ongoing save. And if
the land detector was blocked, it could lead to mag timeouts.

This patch makes all modules use the same event, thus only a single param
save will happen.

If we want to have guarantees to never block, we should introduce a
param_try_set() API method.
2017-12-07 11:55:51 +00:00
Beat Küng 0dcf9775f1 LandDetector: make type passed to param_get() explicit 2017-10-27 10:43:15 +02:00
Dennis Mannhart 8a0a8e20e1 mc_pos_control: use correct altitude as limit
fadfdasf
2017-10-10 10:28:07 +02:00
Dennis Mannhart f9b8afc006 Navigator: Use maximum flight altitude to limit missions
This change limits all mission items to the maximum flight altitude. The mission will still be executed and flown,
but the vehicle will never exceed the mission altitude. This ensures the vehicle can always reach the mission
items. Wether or not the entire mission should be rejected if it falls outside of the fenced area is enforced
in the mission feasibility checker function.
2017-10-10 10:28:07 +02:00
Dennis Mannhart 29cdb655c3 landdetector: remove outdated comment 2017-10-10 10:21:09 +02:00
Julian Oes 7229ec2a37 Move throttle check from land detector to posctrl
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.
2017-10-09 19:05:15 +02:00
Daniel Agar b4755297ec delete control_state and cleanup vehicle_attitude (#7882) 2017-09-21 16:24:53 -04:00
Daniel Agar f67ac8ba00 land detector clang-tidy trivial changes 2017-08-31 22:49:44 -04:00
Daniel Agar 6e402bd6f4 land detector uniform initialization cleanup 2017-08-31 22:49:44 -04:00
Daniel Agar cb8cc9a795 land detector add cycle perf 2017-08-31 22:49:44 -04:00
Daniel Agar c250fb0a9e land detector FW round get_max_altitude()
- this prevents constant land detector publications
2017-08-31 22:49:44 -04:00
Daniel Agar 18d29d5a73 land detector FW uniform initialization 2017-08-31 22:49:44 -04:00
Daniel Agar 90819b2852 land detector move hysteresis constants into FW and MC 2017-08-31 22:49:44 -04:00
Dennis Mannhart e39b38ba96 landdetector groundcontact: adjust climbrate if landing speed is low 2017-08-21 20:38:07 +02:00
Daniel Agar b70b8288b9 px4_includes cleanup incomplete list 2017-08-20 20:42:42 +02:00
Dennis Mannhart f50052f290 landdetector mc: widen acceptance threshold after landing instead of arming 2017-08-15 10:30:29 +02:00
Daniel Agar bd7284634d land_detector add missing header and init all vtol fields (#7754) 2017-08-09 11:43:36 -04:00
sanderux 6ee24a0c80 Move land detector changes to vtol 2017-08-09 08:12:54 +02:00
sanderux 49d2e8a3ff Land detector fix for VTOL in FW mode 2017-08-09 08:12:54 +02:00
Sander Smeets c81dd46b02 land detector VTOL inherit MC maybe_landed (#7738)
* maybe_landed state for VTOL inherited from MC
* set correct land detector for SITL
2017-08-06 10:02:56 -04:00
Dennis Mannhart a95f02b4a1 land-detector description fix 2017-08-01 19:31:34 +02:00
Dennis Mannhart f26972704e style fix 2017-08-01 19:31:34 +02:00
Dennis Mannhart e6f7af2dcf landdetector + mc_pos_control cherry-pick fix 2017-08-01 19:31:34 +02:00
Dennis Mannhart 69ecfef8a4 landdetector: consider 8 second maybe_landed case only if no rotation present 2017-08-01 19:31:34 +02:00
Dennis Mannhart 03d86054a4 landdetector: decrease land detection to 0.3 2017-08-01 19:31:34 +02:00
Dennis Mannhart 10c41e2624 land xy max: set it back to 1.5 2017-08-01 19:31:34 +02:00
Dennis Mannhart 50ef2d0e52 landdetector: adjust time to 3 stage detection 2017-08-01 19:31:34 +02:00
Dennis Mannhart 9baf41bef1 landdetector: check horizontal movement as criteria to enter ground contact 2017-08-01 19:31:34 +02:00
Dennis Mannhart bc46f13d90 landdetector: use control mode, add minimum speed to detect hit-ground 2017-08-01 19:31:34 +02:00
Dennis Mannhart 549d8da6ee landdetector: hit ground logic 2017-08-01 19:31:34 +02:00
Dennis Mannhart 2405abd859 mc landdetector description 2017-08-01 19:31:34 +02:00
Dennis Mannhart 4e204e00cb landdetector: maybe_landed for rover 2017-08-01 19:31:34 +02:00
Dennis Mannhart 8f7ebc1f3a mc landdetector: simplify return 2017-08-01 19:31:34 +02:00
Dennis Mannhart f75dd37326 landdetector: delete or for ground_contact detection 2017-08-01 19:31:34 +02:00
Dennis Mannhart 411ceaa6b3 multicopter landdetector: delete PX4_INFO 2017-08-01 19:31:34 +02:00
Dennis Mannhart 97b5cc77b8 landdetector: reduce maybe_landed trigger time to 1s 2017-08-01 19:31:34 +02:00
Dennis Mannhart f8e9f380d0 landdetector: add additional landdetection state 2017-08-01 19:31:34 +02:00