feat(motion): add fixed-scene expert trajectory generation - #591
Open
yuecideng wants to merge 3 commits into
Open
feat(motion): add fixed-scene expert trajectory generation#591yuecideng wants to merge 3 commits into
yuecideng wants to merge 3 commits into
Conversation
Group solvers, planners, workspace and augmentation under sim.motion. Add fixed-scene preparation, bounded generation and confirmed LeRobot persistence, plus physically validated parallel cube PickUp collection and video examples. BREAKING CHANGE: import robot motion APIs from embodichain.lab.sim.motion; previous sim.solvers, sim.planners and sim.workspace paths are removed.
7 tasks
yuecideng
marked this pull request as ready for review
September 6, 2026 17:00
Greptile SummaryThe PR adds a fixed-scene trajectory-generation pipeline with deterministic state restoration, bounded candidate execution, physical validation, and confirmed episode persistence.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| embodichain/lab/trajectory_generation/runner.py | Coordinates bounded candidate generation, restoration, measured rollout validation, and receipt-driven commit accounting. |
| embodichain/lab/trajectory_generation/initial_state.py | Introduces fixed-scene ownership, state capture and restoration, epoch checks, and prepared-batch publication. |
| embodichain/lab/trajectory_generation/execution.py | Adds qpos rollout execution through Gym or direct simulation while collecting measured observations and validation evidence. |
| embodichain/lab/trajectory_generation/integrations/contact.py | Implements PickUp collision, native-contact, bilateral-grasp, lift, hold-duration, and drift qualification. |
| embodichain/lab/trajectory_generation/sinks.py | Adds synchronous LeRobot shard persistence with sealing, readback verification, manifests, and confirmed commit receipts. |
| embodichain/lab/gym/envs/embodied_env.py | Adds controlled full-batch generation preparation that clears prior episode state and enables stepping only after successful verification. |
| embodichain/lab/sim/atomic_actions/primitives/pick_up.py | Extends ragged grasp handling with explicit candidate masks and safe treatment of empty or failed IK rows. |
| embodichain/lab/sim/motion/planners/curobo/curobo_planner.py | Updates cuRobo planning integration and cache behavior for the relocated motion package and fixed-scene workflow. |
Sequence Diagram
sequenceDiagram
participant R as GenerationRunner
participant H as FixedSceneHost
participant P as Candidate Planner
participant E as Rollout Executor
participant V as Motion Validator
participant S as LeRobot Sink
R->>H: Acquire case and capture initial state
loop Candidate batches
R->>H: Restore and verify initial state
R->>P: Plan bounded candidates
P-->>R: Valid candidate trajectories
R->>E: Execute selected trajectory
E->>V: Report measured states and substep contacts
V-->>R: Acceptance evidence
alt Accepted
R->>S: Submit episode
S->>S: Seal and read back shard
S-->>R: Confirmed commit receipt
else Rejected
R->>R: Record failed attempt
end
end
R->>H: Release ownership and close
Reviews (2): Last reviewed commit: "fix(examples): configure trajectory visu..." | Re-trigger Greptile
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.
Description
Add a fixed-scene expert trajectory generation pipeline that restores the same physical initial state between attempts, augments explicitly permitted motion phases, validates the executed motion, and counts an episode only after its LeRobot shard has been sealed and read back.
The parallel cube example keeps the cube's initial pose fixed while varying 0°/90° grasp orientations and transit paths. Collection checks full-joint collision geometry, native contacts at every physics substep, bilateral finger contact, lift height, and held-object drift before persisting an episode.
embodichain.lab.sim.motionpackage. Update imports, configuration references, API docs, examples, benchmarks, tests, and agent context.MoveEndEffector → PickUptemplate export, a bounded CPU-physics PickUp validator, repeated parallel collection, and synchronized H.264 video examples.Breaking API migration: replace
embodichain.lab.sim.{solvers,planners,workspace}imports withembodichain.lab.sim.motion.{solvers,planners,workspace}. Legacy import packages are removed; low-level Warp kernels remain underutils/warp/kinematics.Dependencies: the optional
trajectory-generationextra addspython-fcl,trimesh, andyourdfpyfor PickUp collision validation. Collection uses the existing DexSim, LeRobot, and video dependencies; the free-motion example additionally uses cuRobo.This draft contains the implemented portions of the design and implementation plan under
docs/design/fixed_scene_expert_trajectory_augmentation_*. Full Atomic Runtime candidate consumption/tracking/recovery, Gym PickUp collection, the unified configuration launcher, and asynchronous persistence remain follow-up work. The current PickUp integration supports one unscaled fixed-base URDF robot and cuboid rigid objects with CPU physics; sampled geometry checks do not guarantee continuous collision avoidance.Type of change
Validation
f4ad72de): 1542 passed, 1 skipped, 168 deselected across motion, atomic actions, trajectory generation, Gym preparation/demo and simulation integrations, SimulationManager, articulation/gizmo, scene semantics, and motion benchmarks (excluding GPU/slow/requires_sim tests).black .andgit diff --checkpassed. Public API coverage: 1761/1761; checker tests: 8 passed. Sphinx dummy build completed with documentation warnings.quick_validate.py.Screenshots
Generate the synchronized four-view video and verified dataset locally:
pip install -e '.[trajectory-generation]' python examples/sim/motion/trajectory_generation/cube_pickup_collection.py \ --output /tmp/cube-pickup-collection --episodes 8 --record-videoOutputs include
preview.mp4,generation_report.json,pickup_report.json,manifest.json, and individual LeRobot episode shards. The video includes all attempted rollouts; the manifest includes only confirmed accepted episodes.Checklist
black .command to format the code base.python docs/scripts/check_api_docs.py).