-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Fixing and simplifying mavlink odometry handling #12793
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned about dropping all of these frames. However it's difficult to know if unlikely they were even working, so I understand the reasoning.
@TSC21 any input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct. As @TSC21 said in Slack VIO channel, one working implementation is better than a bunch of broken ones 😉
dfe444f
to
7d9756e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -2,7 +2,7 @@ | |||
|
|||
uint64 timestamp # time since system start (microseconds) | |||
|
|||
float32[4] q # Quaternion rotation from NED earth frame to XYZ body frame | |||
float32[4] q # Quaternion rotation from XYZ body frame to NED earth frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kamilritz Good catch, we're consistently using hamilton quaternion convention since PX4/PX4-Matrix#34 which has the 4 properties:
- the first element is real [w, x, y, z]
- right-handedness i * j = k
- passive operation, vectors stay we just change frame
- q rotates from local to global q * [0; v_local] * q* = v_global
I always overlooked the comment that was introduced at the same time.
* Fixing and simplify mavlink odometry
Fixes wrong usage of attitude quaternion in transforming odometry information from body to local frame and vice versa . The quaternion of the EKF state rotates from body frame to local frame and not the other way.
The number of supported frames in mavlink_receiver are reduced to one, to make it clearer what is expected from the FCU. A few of the droped cases where also not making sense.
Until now most external velocity information reaching the EKF was not correct. Luckily, velocity estimates from external sensors were not used in the EKF.
The name of some frames is also slightly adapted to follow the changes in mavlink/mavlink#1207 .