inserting-pauses-to-resolve-two-arm-conflicts
What it does
trajectory_a / trajectory_b: {times: [N], joints: [N x 6]} (joint
angles in the model's convention, see the assets file's joint1_note),
linearly interpolated. Each arm's spheres come from
assets/yam_spheres.json (link frames from its kinematic chain; link 6 is
taken as link 5 turned by joint 6 at its origin - the chain lists no link-6
body), on the station bases (arm 0 left at y = +0.305 m, arm 1 right; or
base_a / base_b poses). The pair is checked every check_dt (50 ms); at
the first time the clearance (sphere surface to surface) is under margin
the delayed arm (delay: shorter by duration, or a / b) gets a 0.25 s
hold at its last waypoint before that time - or one waypoint earlier when
the conflict falls inside the hold - and the check repeats, up to
max_pause. With shorter, if that arm cannot wait clear, the other is
tried.
Checks
FakeContext unit tests (tests/bundles/test_inserting_pauses_to_resolve_two_arm_conflicts.py):
no conflict, a clash resolved by delaying the shorter arm with the path
unchanged, a forced delay, the cap, bad inputs.
Synthetic crossing tasks (python -m tests.bundles._pauses_eval, CPU, 30
tasks): each arm goes home -> a random reach whose gripper lands in the
shared middle (|y| < 0.12 m, 0.05-0.30 m high) -> home over 4 s, the second
arm starting 0-1 s later. 18 of 30 conflict (median clearance -0.041 m, i.e.
the spheres overlap); 15 of 18 are resolved with pauses (added time median
1.0 s, max 3.0 s; clearance afterwards at least 0.011 m); 3 remain
unresolved (both goals overlap: no waiting helps). Before the fallback to the
other arm and the earlier hold, 10 of 18 were resolved.
Limits
- Checked only at 50 ms samples of a linear joint interpolation; a fast swing between samples can be missed (the spheres' 15 mm fit margin and the 10 mm margin cover about 0.5 m/s).
- Link 6 approximated (above); fingers taken closed.
- Timing only: overlapping goals need a re-plan (curobo) or a different order of tasks.
- No twin run.
Provenance
The sphere model is RoboSkillHub's tools/yam-spheres (PR #247, branch
tools-yam-collision-spheres at 94bcb1c, yam_spheres.json), copied here
(the chain, bases and spheres) until that bundle is merged. The scheduling is
new.


