Fix: lab_sim Tutorial 1 walk-through bugs#634
Open
rlpratt12 wants to merge 2 commits into
Open
Conversation
- ml_find_objects_on_table.xml: Add SwitchUIPrimaryView at the end of the tree so a view pane auto-switches to /masks_visualization once masks are published. Matches the behavior of the other ML Objectives in lab_sim (ml_segment_image, ml_find_bottles_on_table_from_image_exemplar) and restores the auto-show readers expect from Tutorial 1. - pick_all_bottles_with_apriltags.xml: Flatten the "Release and Retract" subtree, which had three nested single-child Sequence wrappers around the actual actions. The wrappers were structurally inert but very confusing when a tutorial reader opens the tree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop the "Warm up velocity_force_controller" preamble (2x SwitchController + zero_fts). The cold-start cost it was guarding against is essentially zero in the current build, and the block adds ~3-4s of unnecessary controller-swap latency at the top of every run. - Flatten the unnamed Sequence that wrapped Clear Snapshot / Look at Table / Take Wrist Camera Snapshot. The outer top-level Sequence already provides ordering, so the wrapper was inert and just made the tree harder to read. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
lab_simObjective cleanups surfaced by a Tutorial 1 walk-through on 9.2.1.Problem
/masks_visualizationdoesn't auto-show. TheML Find Objects on TableObjective publishes masks but never callsSwitchUIPrimaryView, so a first-time user runs the Objective and sees nothing happen unless they know to manually switch a pane to/masks_visualization. The other ML Objectives inlab_sim(ml_segment_image,ml_find_bottles_on_table_from_image_exemplar) already auto-switch — this one is an outlier.Sequencewrappers inpick_all_bottles_with_apriltags.xml. TheRelease and Retractsubtree had a Sequence containing a Sequence containing a Sequence containing a Sequence with the actual actions. Each intermediate wrapper had exactly one child, so the nesting carries no behavior — but it is genuinely confusing when a tutorial reader opens the tree.velocity_force_controllerblock at the top ofPick All Bottles with AprilTags. The objective starts withSwitchController → velocity_force_controller,zero_fts,SwitchController → joint_trajectory_admittance_controllerbefore doing any picking, ostensibly to dodge a "cold start" on the first placement. The two controller swaps add a few seconds of dead time at the start of every run and the cost being guarded against is essentially zero — the same swap happens inside the place loop anyway.Sequencewrapper aroundClear Snapshot/Look at Table/Take Wrist Camera Snapshot. Same shape as theRelease and Retractproblem above, just in a different part of the same tree.Approach
Two commits:
fix(lab_sim): Tutorial 1 walk-through fixesml_find_objects_on_table.xml: appendSwitchUIPrimaryView primary_view_name="/masks_visualization"to the top-level Sequence, mirroring the pattern used by the other ML Objectives inlab_sim.pick_all_bottles_with_apriltags.xml: remove the three redundantSequencewrappers insideRelease and Retract. No reordering, no Behavior changes, just unwrap.fix(lab_sim): Remove warm-up block and redundant Sequence wrapperpick_all_bottles_with_apriltags.xml: delete the entire warm-up Sequence (SwitchController→velocity_force_controller,CallTriggerService /velocity_force_controller/zero_fts,SwitchController → joint_trajectory_admittance_controller).pick_all_bottles_with_apriltags.xml: flatten the unnamedSequencewrappingClear Snapshot/Look at Table/Take Wrist Camera Snapshotinto its parent.Alternatives considered
Validation
pre-commit run --files src/lab_sim/objectives/ml_find_objects_on_table.xml src/lab_sim/objectives/pick_all_bottles_with_apriltags.xml— passes (prettier, Validate Objective favorites, codespell, mixed line endings, EOF).prettierandpython3 -c "import xml.etree.ElementTree as ET; ET.parse(...)"on both files.Manual verification
ML Find Objects on Tableinlab_simand confirm the view pane swaps to/masks_visualizationautomatically oncePublishMask2Dreturns.Pick All Bottles with AprilTagsand confirm: the picking loop still places bottles in the tray; no regression versus the previous behavior on the first place (the warm-up was supposedly there to make the first place not be a cold start — verify the first place still succeeds without it).🤖 Generated with Claude Code