uzh-rpg / rpg_quadrotor_control

Quadrotor control framework developed by the Robotics and Perception Group
Other
582 stars 183 forks source link

Solved a numerical instability in the InverseThrustMappingFunction #95

Closed boewing closed 4 years ago

boewing commented 4 years ago

The usual formula for solving quadratic equations divides by zero when a=0 and is unprecise for a~0: image

Therefore we should use the numerically stable version [1]. For our case of b >= 0 implies the formula as implemented in the code.

A successful hover test on a flying quad has been done.

[1]: https://people.csail.mit.edu/bkph/articles/Quadratics.pdf

foehnx commented 4 years ago

@boewing please go ahead and merge