Fix CAMP sim lockup: non-blocking TF lookup in running-task overlay#137
Merged
Conversation
RunningTasksOverlay::rebuildItems called getGeoCoordinate per task pose on the GUI thread every TaskFeedback (~1 Hz+). getGeoCoordinate did a blocking 1.5 s TF wait (plus a 1.5 s retry) — when map->earth wasn't immediately available the UI froze for up to ~3 s per pose, every cycle, locking up CAMP. getGeoCoordinate gains an optional timeout_sec (default 1.5 s, preserving existing callers); the overlay now passes 0.0 for a non-blocking lookup. A pose that isn't transformable this cycle is skipped and reappears on the next rebuild once the quasi-static transform is available — the UI never blocks. Regression from #129 (PR #135).
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.
Closes #136
Summary
Fixes the CAMP sim lockup introduced by the P2 running-task overlay (#129 / PR #135).
RunningTasksOverlay::rebuildItemscalledROSWidget::getGeoCoordinateper taskpose on the GUI thread, every
TaskFeedback(~1 Hz+).getGeoCoordinatedoesa blocking
transform(..., "earth", durationFromSec(1.5))with a second 1.5 sretry in its catch. When
map→earthisn't immediately available, each pose blocksthe UI thread up to ~3 s × N poses × every cycle → CAMP freezes.
Fix
getGeoCoordinategains an optionaltimeout_sec(default1.5, so existingcallers are unchanged); the overlay passes
0.0for a non-blocking lookup. A posethat isn't transformable this cycle is skipped and reappears next rebuild once the
quasi-static
map→earthtransform is available. A blocking TF lookup on the GUIthread is never acceptable.
Testing
colcon buildclean; 130 tests, 0 failures. The map overlay still renders oncethe transform is available; the UI no longer blocks when it isn't.
Authored-By:
Claude Code AgentModel:
Claude Opus 4.8 (1M context)