Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When hovering for some time, the drone start to rock then crash. #8968

Closed
ToppingXu opened this issue Feb 27, 2018 · 5 comments
Closed

When hovering for some time, the drone start to rock then crash. #8968

ToppingXu opened this issue Feb 27, 2018 · 5 comments

Comments

@ToppingXu
Copy link
Contributor

when testing, we hover the drone for a short time and the drone start to rock and the pilot changed to stabilized flight mode and haven't given a enough throttle which made the drone crashed. And the log shows there is error between gps velocity and local velocity. here is the log link.
https://logs.px4.io/plot_app?log=a4aa9f6c-66ee-4d3c-a896-558b521a7ed2

@priseborough can you help analyze this log. Thanks

@huangwen0907
Copy link
Contributor

you have a bad acc bias

@priseborough
Copy link
Contributor

priseborough commented Feb 27, 2018

There are two possible explanations:

  1. There was a yaw estimation error that caused the position controller to start a slow circular oscillation which is also known as 'toilet bowling'. This type of yaw error is normally caused by a misaligned or poorly calibrated magnetometer or by excessive levels of magnetic interference.

Looking at the log the measured magnetic field vector length variation is correlated with vehicle orientation but not with throttle, indicating that calibration, not electromagnetic interference is a possible cause.

mag field strength and roll,pitch,yaw
screen shot 2018-02-27 at 8 56 27 pm

  1. Errors in accel biases or accel bias estimation caused a coupling between roll/pitch motion and horizontal velocity error that destabilised the position controller. Prior to the crash the accel bias values for X and Y components were sitting on limits.

The persistent error in vertical innovations present from the start of logging (see below) combined with the estimation Z accel bias and actual Z accel raedings which are very close to 1g suggests that bias estimation error is more likely than actual accel bias error.

vertical innovations
screen shot 2018-02-27 at 8 54 05 pm

There was a bug present in earlier version of the ecl/EKF that could cause accel bias estimates to slowly diverge and hit limits during preflight so this could be the cause if you are using an earlier version of the estimator.

To help resolve this I require the following:

  1. Can you please let me know which version of code was being flown and what version of the ecl library was being used. I was unable to find the commit for the branch flown in the repository.

  2. If you remember, can you please tell me which direction the drone was pointing at takeoff. The EKF and magnetomer thought it was 6 deg to the left of true North. Alternatively if the airframe is sufficiently intact and can be powered, are you able to check the mag calibration by starting the autopilot and checking yaw accuracy outdoors.

@ToppingXu
Copy link
Contributor Author

@priseborough thanks a lot for your quick response. The initial heading is pointed close to north. And I have check the yaw accuracy is good. And I think it is caused by the big acc bias. Later I will check the commit number and let you know.

@MaEtUgR
Copy link
Member

MaEtUgR commented Feb 28, 2018

@ToppingXu About the crash because of too low manual thrust:
Please make sure the parameter MPC_THR_HOVER is set to a collective thrust value in which your vehicle with average payload is in about in the balance between accelerating up and accelerating down in level hover flight. You can get the first guess for example from a log.

  • It scales the upper and lower half of the throttle stick input such that half of the stick input is hover thrust
  • It improves altitude controlled (and hence position controlled) flight because the integrator doesn't have to compensate for this offset
  • It is necessary for useful land detection because the detector can infer with how low of a thrust the vehicle should loose altitude but it doesn't when it's landed.

After that when you switch to manual just make sure the stick is about in the middle to avoid a sudden drop of the vehicle.

@ToppingXu
Copy link
Contributor Author

thanks for your help, I have updated the newest ecl library, and doing more test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants