-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
move GPS aggregation and blending to sensors #13584
Conversation
9191932
to
d3328d1
Compare
@@ -1,19 +1,36 @@ | |||
# EKF blended position in WGS84 coordinates. | |||
# GPS position in WGS84 coordinates. |
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.
Let's fix the things brought up in #6275 now.
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.
Yes this would probably be the time.
This should also make it easier to add unit tests for GPS blending. |
d3328d1
to
3eb0a8d
Compare
3eb0a8d
to
a050979
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.
763 less lines in ekf2_main.cpp
, I say "YES!".
// clear flag to avoid re-use of the same data | ||
_gps_new_output_data = false; | ||
if (_vehicle_gps_position_sub.copy(&gps)) { | ||
gps_message gps_msg{}; |
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 would still like to use a function such as fillGpsMsgWithVehicleGpsPosData
(that you forgot to remove) to reduce the amount of code in this massive function.
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.
Thanks, I need to take another look. I believe this PR predates that ekf2 refactor.
Continued in |
This moves the multi-GPS handling (and optional blending) from the EKF2 frontend (ekf2_main) to the sensors hub module.
The new module within sensors consumes all
sensor_gps
messages (formerly vehicle_gps_position) from the GPS driver or UAVCAN, etc. Then based on configuration either passes on the first or blends multiple to create a singlevehicle_gps_position
that the rest of the system consumes.Although technically in the sensors module, this is a separate work queue item that's scheduled by any sensor_gps publication.
Changes
sensor_gps
vehicle_gps_position
EKF2_GPS_MASK
->SENS_GPS_MASK
EKF2_GPS_TAU
->SENS_GPS_TAU