PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.52k stars 13.51k forks source link

PosHold handles GPS regain poorly #1777

Closed Zefz closed 9 years ago

Zefz commented 9 years ago

This bug occurred using MultiCopter and the ekf_att_pos_estimator algorithm.

This is easily reproducible by the following steps:

  1. Set vehicle in PosHold mode and verify that the mode works as it should
  2. Disable the GPS while hovering in PosHold
  3. After a period of time, the Commander will trigger AltHold because the position fix times out
  4. As expected the position begins to drift and now we enable the GPS again.
  5. The drone makes some wild acrobatics and you'll have to switch back to Manual/AltHold to make it recover.
Zefz commented 9 years ago

Example where the problem occurs. Notice how position jumps once GPS is re-enabled (notice the EKF position diverges): flightlog

Logfile: https://drive.google.com/file/d/0B7HSl0pSS6x3TDVLdzFXZFI1SHc/view?usp=sharing

Zefz commented 9 years ago

I'm attempting to fix this in #1770.

Zefz commented 9 years ago

This has probably nothing to do with either PosCtrl or the mc_position_controller but is rather an issue with the `ekf_attitude_pos_estimator_ekf``where the states are not properly reset on fix regain: complete-log

Zefz commented 9 years ago

Fixed by #1770