Conversation
|
Add row-aware combined Task Program planning, visual profile application, LeRobot episode persistence, and m4 n16 showcase configuration.
| if slot_id is not None and self._slot_id not in (None, slot_id): | ||
| raise RuntimeError("runner is bound to a different physical slot") | ||
| if slot_id is not None and self._slot_id is None: | ||
| self._slot_id = slot_id |
There was a problem hiding this comment.
Runner remains bound to first slot
When successive candidates need different compatible slots, the first reservation permanently binds the shared SingleSlotRunner to its slot. MultiSlotRunner reserves a slot for each candidate, but the runner raises if a later reservation uses another slot. The valid queue cannot be drained.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/motion/execution.py
Line: 317-320
Comment:
**Runner remains bound to first slot**
When successive candidates need different compatible slots, the first reservation permanently binds the shared `SingleSlotRunner` to its slot. `MultiSlotRunner` reserves a slot for each candidate, but the runner raises if a later reservation uses another slot. The valid queue cannot be drained.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| for offset in range(max(len(group) for group in groups.values())): | ||
| for family in groups: | ||
| if offset < len(groups[family]): | ||
| ordered.append(groups[family][offset]) |
There was a problem hiding this comment.
Assignments mismatch executed recipes
For an uneven batch crossing a reference-family boundary, this round-robin ordering changes which recipe is assigned to each slot. The showcase still sets each row's pose and visual profile and selects its planning recipe in the original slice order. A slot can therefore be assigned one family's recipe while executing another's, so its assignment identity and terminal accounting describe the wrong episode.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/motion/expansion/combined_runtime.py
Line: 348-351
Comment:
**Assignments mismatch executed recipes**
For an uneven batch crossing a reference-family boundary, this round-robin ordering changes which recipe is assigned to each slot. The showcase still sets each row's pose and visual profile and selects its planning recipe in the original slice order. A slot can therefore be assigned one family's recipe while executing another's, so its assignment identity and terminal accounting describe the wrong episode.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| cube.set_local_pose( | ||
| pose, | ||
| env_ids=torch.arange(batch_size, device=env.unwrapped.device), | ||
| ) |
There was a problem hiding this comment.
Initial recording uses old pose
env.reset() has already captured the initial observation and trajectory state when this code moves the cube to its authored family pose. The recorded first frame therefore shows the old pose, while planning and later frames use the new one, corrupting the initial state of an accepted episode.
Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/sim/motion/repeated_pick_place_generation_showcase.py
Line: 354-357
Comment:
**Initial recording uses old pose**
`env.reset()` has already captured the initial observation and trajectory state when this code moves the cube to its authored family pose. The recorded first frame therefore shows the old pose, while planning and later frames use the new one, corrupting the initial state of an accepted episode.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Add the source-neutral foundation for high-throughput expert trajectory generation.
This PR defines the shared contracts needed to combine Affordance and trajectory expansion across handwritten experts, MotionGenerator, Atomic Actions, and Task Program adapters. Runtime randomization and observation fan-out profiles are deliberately deferred until their physical and persistence owners exist. It intentionally keeps physical execution, fixed-scene restoration, candidate scheduling, and dataset persistence out of this layer.
Included
SourceAdapterboundary with handwritten-template and MotionGeneratorPlanResultadapters.ActionPlanTemplateAdapterfor explicit phase permissions.CandidateSpec:TrajectoryGenerationJobCfginto a reusable Generation Profile:ActionPlanTemplateAdapterand Atomic materialization helper.plan_transformhook:ActionPlanis validated first;ActionPlanis validated again before execution.Deliberately excluded
run-envcollector routing;Those belong in the next integration layer and should reuse these contracts instead of adding a second identity or configuration protocol.
Dependencies and relationship to existing PRs
Refs #670, #591, #594, #653
Validation
python docs/scripts/check_api_docs.py: 2259/2259 exports documented.git diff --checkpassed.Type of change
Checklist
Follow-up decision for #591 / #594
The fixed-scene host, LeRobot sink, PickUp contact validator, and Atomic Runtime execution remain deferred. They belong in the Coordinator/PhysicalExecutor layer and should consume this source adapter and CandidateSpec contract rather than be copied into the foundation.