Repository navigation
Fix Atomic Skill trajectory timing and contact behavior - #784
Yuan-Xinyi merged 9 commits into
Conversation
[High impact] The PR appears safe to merge; no new blocking issue was found. SummaryThis PR fixes Atomic Skill timing and contact paths. The latest changes address the remaining coordinated-arm jump finding.
The supplied previous threads are addressed by the current code. No new actionable issue was established in the changes since the last review.
|
yuecideng
left a comment
There was a problem hiding this comment.
Reviewed PR #784 against base fdd28ae and head a758585. Five P2 findings are attached inline; I recommend addressing them before merge.
Validation: the independent compute trajectory tests passed (11 passed, 2 skipped). Focused CPU probes reproduced the behavioral regressions against base/head and the numerical limit violation in the new interpolation. These probes use source-isolated methods and in-memory ports. Standard simulation-package test collection was blocked by the local DexSim ImportError for reconstruct_cable_rings_kernel; no live simulation, GPU, renderer, or hardware validation was performed.
Merge the latest composed spatial generalization base, preserve both generalization regression tests, record per-case lifecycle attribution, retain bypass-only domain rows, and version aggregate/report schemas.
22989ba
into
codex/composed-spatial-generalization
Description
Atomic Skill trajectories could reach the requested endpoint while still producing visibly or physically incorrect motion: uneven speed, compressed duration, unconstrained contact motion, discontinuous velocity/hand commands, and missing stabilization phases. This PR fixes those behaviors without changing the typed action contracts.
Stack
codex/composed-spatial-generalizationThis PR should merge after #779.
Problems and how to reproduce them
The regressions below describe the behavior on the parent commit. The named tests in this PR are also focused reproduction cases: run them against the parent production implementation to observe the failure, and against this branch to verify the fix.
IK interpolation did not enforce velocity or acceleration limits
velocity_limit/acceleration_limit, and a lowsample_count.tests/compute/test_trajectory.py -k minimum_jerktests/sim/motion/test_motion_generator_batched.py -k "limited_cartesian_motion or ik_interp_consumes"sample_countcould compress a slower planner trajectorydt.sum()is longer than(sample_count - 1) * control_dt, then compose it into Push, Slide, OpenDoor, Twist, AxisAlign, PickUp, Place, HandOver, or CoordinatedPlacement.sample_countpositions and discarded its timing. A physically slow path was therefore executed faster, with visibly nonuniform phase speed.tests/sim/atomic_actions/test_primitives_helpers.py -k resample_planned_trajectory.Contact skills accepted endpoint-only paths that did not preserve contact geometry
MotionPolicy(strategy="motion_gen").tests/sim/atomic_actions/test_actions.py -k motion_gen_rejects_uncertified_contact_pathPublished velocity was discontinuous at starts, stops, and holds
trajectory.velocities.tests/sim/atomic_actions/test_actions.py -k composed_actions_materialize_velocity_and_end_in_zero_hold.Runtime cadence silently rounded or merged incompatible durations
control_dtor a requested sleep duration that is not an integer multiple ofphysics_dt; the simulation adapter previously rounded upward withceil.tests/sim/atomic_actions/test_runner.py -k mismatched_active_batch_intervalstests/sim/atomic_actions/test_sim_adapter.py -k off_gridCoordinated dual-arm motion only enforced the closed chain sparsely
tests/sim/atomic_actions/test_actions.py -k coordinated_pick_selects_reachable_candidate.Hand commands could jump away from the observed robot state
qpos. In addition,interpolate_hand_qpos(..., n_waypoints=1)returned the start state, so a one-frame close/open command had no effect.tests/sim/atomic_actions/test_trajectory_ops.py -k interpolate_hand_qpostests/sim/atomic_actions/test_actions.py -k move_held_object_moves_only_exclusively_held_rowsHandOver released the source immediately after receiver closure
receive_closeandhandover_release.tests/sim/atomic_actions/test_actions.py -k handover.Pour reversed immediately at the apex
tests/sim/atomic_actions/test_actions.py -k pour_rotates_held_object.How each problem is fixed
Bounded, smooth interpolation
sample_countas a lower bound and expand the trajectory until discrete joint velocity and acceleration satisfy the policy limits.Native timing preservation
dton the control grid.Fail-closed contact behavior
ik_interp.motion_genuntil that backend can certify every contact-path sample, rather than silently accepting endpoint-only approximations.Rest-consistent velocity output
Exact execution cadence
control_dtand sleep durations to lie on the physics grid, allowing only floating-point tolerance rather than rounding to a different duration.Dense closed-chain projection
Continuous hand state
qposand hold that state through arm-only phases.Stable handover sequencing
receive_holdsegment before releasing the source.Physical pour dwell
dwell_durationconfiguration.Review follow-ups
All four Greptile inline findings were reproduced and are valid:
Mixed HandOver directions shared mutable phase lengths
Passive effect polling used an off-grid simulation sleep
physics_dt=0.01, the defaultminimum_cycle_time=0.001, and a pending physical-effect verification.Limit-driven Cartesian expansion cut inside articulated arcs
Configured Task Programs rejected the new timing fields
velocity_limit,acceleration_limit, or Pourdwell_durationto configured YAML.Exact-path starts used a stricter tolerance than successful IK
Zero-length HandOver holds entered a non-empty padding helper
HandOverOptions(hold_steps=0).Dense float32 minimum-jerk sampling could reverse and exceed limits
The new limits shifted the public
MotionPolicypositional constructorMotionPolicy("ik_interp", 50, "zero", DynamicCollisionMode.OFF, None)call.One failed OpenDoor/Twist row could abort the whole exact-path batch
Slide release expansion could outgrow the hand-opening phase
hand_interp_steps; assembly previously raised a tensor shape error.FAILED, and cannot skip ahead on a laterstep().ik_interpbypassed the Robot-owned speed caps introduced by Use robot joint limits in motion planning #786[0.05, 1.2]: omission must preserve both caps, while an explicit0.2request must resolve to[0.05, 0.2].MotionPolicypreserves omitted velocity asNonethrough configuration and metadata. Planner-backed motion delegates that omission to Use robot joint limits in motion planning #786's runtime resolver; the current stacked base has a compatibility fallback.ik_interpapplies the same ordered, batch-strict, mimic-aware Robot caps directly.tests/sim/motion/planners/test_toppra_batched.py -k device_bound_constraints.Type of change
Validation
black --check --diff --color ./— pass (black==26.3.1)git diff --check— passpython -m compileall -q embodichain tests— passpython docs/scripts/check_api_docs.py— 2613/2613 exports documentedpython .agents/skills/project-dev-context/scripts/context.py check— passpytest -q tests/test_agent_context_map.py tests/test_agent_context_tools.py— 40 passedpytest -q tests/compute/test_trajectory.py— 13 passed, 2 skippedtests/sim/motion/test_motion_generator_batched.py— 91 passed, 1 skippedtests/lab/task_program/test_semantic_executor.py— 54 passedThe local
embodichain311environment contains an older DexSim build withoutRTRenderMode; the simulation test commands supplied that enum at import timeonly so the repository tests could run. No dependency or production-code shim
is included in this PR.
Screenshots
Not applicable; the observable changes are trajectory timing, derivatives, path geometry, and segment sequencing.
Checklist
black .command to format the code base.python docs/scripts/check_api_docs.py.