Fix busy wait for TFs and NaN - #83
Open
fmrico wants to merge 2 commits into
Open
Conversation
Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses real-time latency and stability issues in the fusion localizer by eliminating TF lookup blocking in the RT execution path and adding recovery/guardrails when the filter output becomes invalid (NaN) or when GeographicLib UTM conversions throw.
Changes:
- Hard-code TF lookup timeout to zero in
UkfWrapper(and remove the corresponding example YAML params) to prevent RT-thread blocking on TF availability. - Validate UKF output before broadcasting/publishing; if NaNs are detected, reset the filter to recover instead of continuously emitting invalid TF.
- Catch and throttle-log
GeographicLib::GeographicErrexceptions during GPS->UTM conversion and estimate->NavSatFix re-projection to avoid crashingsystem_main.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
localizers/easynav_fusion_localizer/src/easynav_fusion_localizer/ukf_wrapper.cpp |
Removes TF prefix re-prefixing, hard-codes TF timeout to 0 to avoid RT blocking, and resets filter on NaN output before side effects. |
localizers/easynav_fusion_localizer/src/easynav_fusion_localizer/FusionLocalizer.cpp |
Adds exception handling for GeographicLib UTM projection steps to prevent process crashes. |
localizers/easynav_fusion_localizer/config/example_params_summit_dual.yaml |
Removes transform_timeout from example params to match hard-coded behavior. |
localizers/easynav_fusion_localizer/config/example_params_summit_dual_gazebo.yaml |
Removes transform_timeout from example params to match hard-coded behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I have detected two problems:
LookUpTransformstops twice the RT cycle for 100ms. Now it is fixed and it doesn't wait for TFs.@midemig , I would like to have your OK before merging, as you are the father of this creature ;)