Uh oh!
There was an error while loading. Please reload this page.
Require explicit timing for atomic action trajectories - #525
Merged
Conversation
Remove fallback control periods from motion policies and the atomic action engine. Require planners and custom actions to provide validated timing, propagate explicit interpolation cadence through planning contexts, and update built-ins, tasks, benchmarks, tutorials, docs, and tests. BREAKING CHANGE: planner results with positions must include dt and duration, custom atomic actions must return TimedTrajectory, and fallback_control_dt is removed.
Greptile SummaryThis PR makes trajectory timing an explicit producer-owned contract throughout motion planning and atomic actions.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/planners/utils.py | Enforces shape, device, finiteness, non-negativity, and duration consistency for explicitly timed planner results. |
| embodichain/lab/sim/planners/motion_generator.py | Requires interpolation cadence, normalizes explicit planner timing, and preserves per-environment duration during trajectory resampling. |
| embodichain/lab/sim/atomic_actions/plans.py | Defines and validates the strict TimedTrajectory contract used by atomic-action plans. |
| embodichain/lab/sim/atomic_actions/core.py | Rejects untimed action outputs at the framework boundary and requires actions to provide complete timed trajectories. |
| embodichain/lab/sim/atomic_actions/state.py | Adds optional explicit control cadence to planning contexts with a strict accessor for interpolation paths. |
| embodichain/lab/sim/atomic_actions/sim_adapter.py | Populates planning-context cadence from the simulation integration. |
| embodichain/lab/sim/skills/profiles.py | Moves optional planner compatibility into versioned skill policy presets and validates it when profiles are bound. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Environment step_dt] --> B[PlanningContext control_dt]
B --> C[Action-owned interpolation]
C --> D[TimedTrajectory]
E[Planner backend] --> F[PlanResult with dt and duration]
F --> G[MotionGenerator normalization]
G --> D
D --> H[ActionPlan]
H --> I[Timed execution]
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
…jectory-timing # Conflicts: # embodichain/lab/sim/atomic_actions/policies.py # embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py # embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py # embodichain/lab/sim/atomic_actions/primitives/hand_over.py # embodichain/lab/sim/atomic_actions/primitives/move_held_object.py # embodichain/lab/sim/atomic_actions/primitives/pick_up.py # embodichain/lab/sim/atomic_actions/primitives/place.py # embodichain/lab/sim/atomic_actions/primitives/press.py # scripts/benchmark/atomic_action/press_benchmark.py # scripts/tutorials/atomic_action/press.py
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
This PR makes trajectory timing an explicit producer contract across motion planning and atomic actions.
PlanResultcontaining positions to provide validated per-waypointdtand matching per-environmentdurationTimedTrajectoryinstead of untimed position tensorsfallback_control_dtand redundant planner/cadence/limit fields fromMotionPolicyPlanningContext.control_dtandMotionGenOptions.interpolation_dtcontrol_dt.pytutorial comparing identical paths at two command periodsThe previous fallback behavior could silently assign execution timing to an incomplete planner or action result. The strict contract fails at the producer boundary and keeps planner-owned trajectory timing separate from integration-owned interpolation cadence.
Dependencies: None. The branch is based directly on the current
main.Issue reference: None.
Breaking API changes
dtanddurationAtomicAction.build_plan()accepts onlyTimedTrajectoryfallback_control_dtis removed from the atomic-action engine and planning servicesType of change
Screenshots
Not applicable. The new control-period tutorial can record fast and slow trajectory videos when run with
--auto_play.Validation
black .— 667 files unchangedfrom __future__ import annotations, and public-module__all__checks — passed for 54 changed Python filespython -m compileall -q embodichain embodichain_tasks scripts examples tests— passedyaml.safe_load— passedgit diff --check— passedmake -C docs html SPHINXOPTS=-q— passedChecklist
black .command to format the code base.