iSWAP: transports planned from the resource model, refused when they would hit something - #1469
Closed
stefangolas wants to merge 9 commits into
Closed
stefangolas wants to merge 9 commits into
stefangolas wants to merge 9 commits into
Conversation
…and the model says what a grip takes
…until it has played
…annel ahead leaves first
stefangolas
force-pushed
the
star-iswap
branch
from
October 3, 2026 22:10
bfad8f2 to
7a66d91
Compare
Contributor
Author
|
Closing this in favour of #1468: the four viewer demos (the Y ripple, the 96 head, the iSWAP, and the CO-RE gripper) have been folded into it, and its branch tree is now identical to this one. The transport planning and collision checking this PR's title and body describe are not in the branch - they were likely dropped in a rebase; if that work resurfaces it should come back as its own PR with its own description. |
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 free
to 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.
iSWAP: plate and lid transports planned from the resource model, refused when they would hit something
The iSWAP's plate and lid moves are planned from where resources actually are (
iswap_transport.py), and every plan is checked for what it would hit before anything runs (iswap_collisions.py): the arm's parts, what it holds, and what rides the X-arm with it are swept along the plan and tested by GJK distance against the world — the deck frame for what stands still, and the arm's own frame for the channels and the 96-head that ride it. A plan that would meet something is refused withiSWAPCollisionError.Layering (separation of concerns)
pylabrobot/resources/collision.py— generic, machine-agnostic: box semantics over the resource tree (solid / frame / enclosure, by how a resource holds its children), convex pieces, swept segments, GJK distance, a bounding-volume broadphase. Declared hulls (.collision.jsonper model) refine a resource's pieces where shipped; without one, a resource is its box.hamilton/star/driver/features/iswap_transport.py/iswap_collisions.py— the iSWAP's own kinematics and judgement, besideiswap.py. The planner plans; the collision module judges; nothing here is wired into a drive path yet.Behaviour changes
None on live firmware. Nothing here is called from a drive path — the planner and the checker are a library (see the demos), and the tests drive them directly.
Simulator only: the simulated iSWAP now answers the force-window grip close (
C0 GC) by stopping the jaws at the commanded width, so the model's grip is the planned grip. Live hardware is unaffected; simulated command streams that grip change their answers, not their writes.Notes
Upstream ships no
.collision.jsonhull files, so every resource is checked as its box (conservative, with touch-leniency for box-represented resources); the sweeps-vs-model consistency test is therefore checked on bare parts.Stacked on STAR: act firmware commands out in the viewer (motion playback) #1468 (shares the demo's motion-attachment API); base retargets to main once that merges.