Proposal
Interpolate segment-by-segment while preserving each keyframe boundary, or explicitly insert exact keyframes into the sampled output. Also validate that sample_interval can accommodate all required keyframes.
Better implement a new interpolate_with_distance (embodichain/lab/sim/utility/action_utils.py) that interpolate segment-by-segment.
Motivation
Multi-waypoint trajectories do not guarantee exact visits to intermediate waypoints
embodichain/lab/sim/atomic_actions/trajectory.py:336
embodichain/lab/sim/atomic_actions/trajectory.py:360
The implementation passes all keyframes to interpolate_with_distance() and resamples the entire path to a fixed count. That preserves path order, but it does not guarantee intermediate waypoints appear as emitted trajectory samples. For example, keyframes [0, 1, 3] with 5 samples become [0, 0.75, 1.5, 2.25, 3], so waypoint 1 is skipped. This conflicts with the new “visits every waypoint” API contract and can miss clearance/safety waypoints.
Additional context
Checklist
Proposal
Interpolate segment-by-segment while preserving each keyframe boundary, or explicitly insert exact keyframes into the sampled output. Also validate that
sample_intervalcan accommodate all required keyframes.Better implement a new
interpolate_with_distance(embodichain/lab/sim/utility/action_utils.py) that interpolate segment-by-segment.Motivation
Multi-waypoint trajectories do not guarantee exact visits to intermediate waypoints
embodichain/lab/sim/atomic_actions/trajectory.py:336embodichain/lab/sim/atomic_actions/trajectory.py:360The implementation passes all keyframes to
interpolate_with_distance()and resamples the entire path to a fixed count. That preserves path order, but it does not guarantee intermediate waypoints appear as emitted trajectory samples. For example, keyframes[0, 1, 3]with 5 samples become[0, 0.75, 1.5, 2.25, 3], so waypoint 1 is skipped. This conflicts with the new “visits every waypoint” API contract and can miss clearance/safety waypoints.Additional context
Checklist