Add optional teleop tracking debug visualization#6393
Conversation
Greptile SummaryThis PR adds optional tracking debug visualization to IsaacTeleop sessions — red sphere markers at OpenXR hand joints and RGB axis markers at controller aim poses — and also hardens step-failure handling with proper failure diagnosis and a restart rate-limit.
Confidence Score: 4/5Safe to merge; all findings are display-only or documentation-level concerns in new debug visualization code, with no risk to the primary teleop pipeline. The core pipeline change — chaining debug outputs into the OutputCombiner only when enabled — is well-isolated and properly guarded. The step-failure hardening is straightforward and tested. The main concern worth addressing before merge is that
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Client as Script / advance()
participant Device as IsaacTeleopDevice
participant Lifecycle as TeleopSessionLifecycle
participant MsgProc as TeleopMessageProcessor
participant HViz as HandJointVisualizer
participant AViz as ControllerAimVisualizer
Client->>Device: advance()
Device->>Lifecycle: step()
Lifecycle-->>Device: action tensor
Device->>Device: _update_hand_debug()
Device->>Lifecycle: consume_visualization_toggle()
alt toggle_debug_visualization received
Lifecycle->>MsgProc: consume_visualization_toggle()
MsgProc-->>Lifecycle: True
Lifecycle-->>Device: True
alt debug_viz already chained
Device->>HViz: set_visible(toggle)
Device->>AViz: set_visible(toggle)
else first-time enable
Device->>Lifecycle: enable_debug_viz()
Lifecycle->>Lifecycle: "_build_combined_pipeline(chain_debug_viz=True)"
Lifecycle->>Lifecycle: session.__exit__() + _try_start_session()
Lifecycle-->>Device: True
end
end
alt "_viz_visible == True"
Device->>Lifecycle: last_step_result / last_left_controller
Device->>HViz: update(result, world_T_anchor)
Device->>AViz: update(left, right, world_T_anchor)
end
Device-->>Client: action tensor
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Client as Script / advance()
participant Device as IsaacTeleopDevice
participant Lifecycle as TeleopSessionLifecycle
participant MsgProc as TeleopMessageProcessor
participant HViz as HandJointVisualizer
participant AViz as ControllerAimVisualizer
Client->>Device: advance()
Device->>Lifecycle: step()
Lifecycle-->>Device: action tensor
Device->>Device: _update_hand_debug()
Device->>Lifecycle: consume_visualization_toggle()
alt toggle_debug_visualization received
Lifecycle->>MsgProc: consume_visualization_toggle()
MsgProc-->>Lifecycle: True
Lifecycle-->>Device: True
alt debug_viz already chained
Device->>HViz: set_visible(toggle)
Device->>AViz: set_visible(toggle)
else first-time enable
Device->>Lifecycle: enable_debug_viz()
Lifecycle->>Lifecycle: "_build_combined_pipeline(chain_debug_viz=True)"
Lifecycle->>Lifecycle: session.__exit__() + _try_start_session()
Lifecycle-->>Device: True
end
end
alt "_viz_visible == True"
Device->>Lifecycle: last_step_result / last_left_controller
Device->>HViz: update(result, world_T_anchor)
Device->>AViz: update(left, right, world_T_anchor)
end
Device-->>Client: action tensor
Reviews (1): Last reviewed commit: "Add optional teleop tracking debug visua..." | Re-trigger Greptile |
71bc68f to
72850fe
Compare
Add hand joint and controller aim pose debug markers for IsaacTeleop sessions, enabled at start via IsaacTeleopCfg.enable_visualization (--enable_visualization on the teleop scripts) or lazily at runtime with the toggle_debug_visualization control message. The debug outputs are only chained into the pipeline when enabled, so regular sessions carry zero overhead; once enabled, toggling off just hides the markers. Raw anchor-frame tracking data is transformed to world frame on the Isaac Lab side, so markers stay correct under a target_T_world rebase. Also harden session step-failure handling: diagnose pipeline errors against the actual Kit XR session state instead of always assuming an external XR teardown, and rate-limit session re-creation to once per second to avoid restart churn on persistent tracking-data errors.
Remove the control-message toggle and in-place session restart path. Configure visualization outputs once from the CLI option and keep the tracker source discovery limited to session startup.
72850fe to
0da3916
Compare
Description
Adds optional tracking debug visualization for IsaacTeleop sessions (reviving the concept from #4840 on the current stack):
HandsSource.Key points:
enable_debug_visualizationargument ofcreate_isaac_teleop_device()(exposed as--enable_debug_visualizationonteleop_se3_agent.py,record_demos.py, andteleop_replay_agent.py). Disabled sessions build an identical pipeline; env cfgs are untouched.world_T_anchor, so markers stay correct under atarget_T_worldrebase (fixing the original Adds back optional Teleop hand joint visualization #4840 approach).Also hardens teleop step-failure handling: a retargeting pipeline error is now distinguished from an external XR teardown (via Kit's XR session state), and session re-creation is rate-limited to once per second, preventing per-frame restart churn on degenerate tracking data. Stop-AR/Start-AR recovery latency is unchanged.
Validated live over CloudXR (Quest 3).
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatchangelog.dfragment)CONTRIBUTORS.mdor my name already exists there