-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
EKF2 global position validity #23474
base: main
Are you sure you want to change the base?
Conversation
Even if local pos gets valid again, the local frame needs to be re-aligned to a global origin to have a valid global position
d248e03
to
ac014aa
Compare
Yay! This is exactly why I removed global position from the guidance law 😁 Happy to see this finally getting used! |
Really cool @bresch 👏 |
|
||
_position_reliant_on_optical_flow = !gps && optical_flow && !vision_position; | ||
} | ||
_position_reliant_on_velocity_aided_dead_reckoning = !estimator_status_flags.cs_inertial_dead_reckoning |
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.
Does this even matter? Couldn't "relaxed local position validity" simply be vehicle_local_position.xy_valid?
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.
Good point, I'll check if there is any reason why it should be different
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 think it makes sense. Now "relaxed" is just without eph check.
ac014aa
to
18433a1
Compare
Relaxed position is valid as long as a velocity aiding source is active (e.g.: optical flow or airspeed+sideslip)
Fake pos/height fusion only starts when inertial dead reckoning time is exceeded and is not considered as an aiding sensor anyway. The dead reckoning flag is then enough to know if the position/velocity is valid.
18433a1
to
3e3f259
Compare
Right now, |
This variable contains the location of the NED's origin in global coordinates. It is then not the global origin but the global reference of the local frame. Also, to have a valid global position, this reference doesn't only needs to be initialized but also valid. It is valid when the local frame is locked in place by using velocity and/or position aiding sensors.
Solved Problem
Solution
Note that we could publish NANs in the global position fields that are invalid but I wanted to follow the same scheme than in
vehicle_local_position
.Test coverage
SITL tests:
In FW, start and stop several times GNSS and sideslip fusion. Modes switch correctly.