Skip to content

Fix busy wait for TFs and NaN - #83

Open
fmrico wants to merge 2 commits into
rollingfrom
fix_nan_gps
Open

Fix busy wait for TFs and NaN#83
fmrico wants to merge 2 commits into
rollingfrom
fix_nan_gps

Conversation

@fmrico

@fmrico fmrico commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Hi,

I have detected two problems:

  1. LookUpTransform stops twice the RT cycle for 100ms. Now it is fixed and it doesn't wait for TFs.
  2. Some tries to limit when NaN appears.

@midemig , I would like to have your OK before merging, as you are the father of this creature ;)

Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
Copilot AI lite review requested due to automatic review settings August 19, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::GeographicErr exceptions during GPS->UTM conversion and estimate->NavSatFix re-projection to avoid crashing system_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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants