Skip to content

CAMP locks up in sim: running-task overlay does blocking TF lookups on the GUI thread #136

Description

@rolker

Summary

CAMP locks up in the simulator after the P2 running-task overlay merged (#129 / PR #135).

Cause

RunningTasksOverlay::rebuildItems calls ROSWidget::getGeoCoordinate once per
task pose, on the GUI thread, every TaskFeedback (~1 Hz, faster if the
navigator feedback rate is higher). getGeoCoordinate does a blocking TF
lookup: transform_buffer_->transform(ps, "earth", durationFromSec(1.5)), and its
catch path retries with another 1.5 s. When map→earth is not immediately
available (startup, or a pose frame not yet in the tree), each pose blocks the UI
thread for up to 3 s × N poses × every cycle → the UI freezes.

Fix

Make the overlay's coordinate conversion non-blocking: add an optional timeout
parameter to getGeoCoordinate (default 1.5 s, preserving existing callers) and
have RunningTasksOverlay pass 0.0. A pose that isn't transformable this cycle
is skipped and simply appears on the next rebuild once the transform is available —
the UI never blocks. A blocking TF lookup on the GUI thread is never acceptable.

Regression from #129 (PR #135).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions