Skip to content

Collision surface: query ABC, CollisionStatus, Shape world + set_shapes#8

Merged
Jepson2k merged 7 commits into
mainfrom
feat/collision
Jul 8, 2026
Merged

Collision surface: query ABC, CollisionStatus, Shape world + set_shapes#8
Jepson2k merged 7 commits into
mainfrom
feat/collision

Conversation

@Jepson2k

@Jepson2k Jepson2k commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Adds the shared collision contract that parol6 implements and Waldo-Commander consumes:

  • Robot ABC collision query surface + CollisionStatus (active/pairs on the StatusBuffer contract)
  • Shape dataclass union (Box/Sphere/Cylinder/Plane) with construction validation, per-shape margin, wire codec (shape_from_wire rejects wrong param counts), and pair-name vocabulary
  • commander.scene.shapes readback surface + client.set_shapes with acked delivery; setting shapes invalidates in-flight and queued trajectory motion (documented contract)
  • Robot.apply_shapes, PathSegment.collision_step, per-program Playback step channel

Release intent: tag v0.5.0 after merge (breaking pre-1.0 minor: new ABC members).

🤖 Generated with Claude Code

https://claude.ai/code/session_01M7tEqGhaTqJV6ZxCXgMpFU

Jepson2k and others added 7 commits June 29, 2026 08:14
Robot ABC gains has_collision_checking + in_collision / colliding_pairs /
check_trajectory / min_distance as concrete disabled-defaults, so backends
without a checker keep working and parol6's existing overrides satisfy them.

RobotStatus gains a collision sub-object (active + pairs) carrying the
colliding geometry/link pairs captured at the predicted colliding config,
for the frontend to highlight.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shapes.py: a typed dataclass-union (Box/Sphere/Cylinder/Capsule/Cone/Ellipsoid/
Plane) whose fields are the coal constructor params, mirroring coal's vocabulary.
Wire/persist serialization is derived generically from dataclasses.fields
(to_wire + shape_from_wire via a kind→class registry) — no per-shape code.

SceneHandle gains a `shapes` list (commander.scene.shapes) — the collision
world; RobotClient gains set_shapes() to push it to the backend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The status stream now carries the predicted-collision flag + pairs (parol6
provides them); declaring them on the StatusBuffer Protocol makes the frontend
consumer type-check against the contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…act; Robot.apply_shapes + PathSegment.collision_step

- Docstrings: collision surfaces cover workspace shapes, not just self-collision;
  Shape.margin marked reserved (not yet applied); SceneHandle.shapes documents
  the reassign-don't-mutate contract.
- Robot.apply_shapes: local-checker twin of client.set_shapes for host-side
  preview/editing collision queries (no-op default).
- PathSegment.collision_step: first colliding waypoint from the host-side check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Schema-skewed or corrupted persisted data previously zip-truncated into a
smaller wrong shape with no error — the enforced volume silently differed
from what was saved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, readback surface

- ShapeBase.__post_init__ rejects NaN/inf/non-positive dims, bad pose/margin;
  Plane validates its normal; shape_from_wire inherits it as the decode gate
- margin is a real per-shape clearance override (no reserved API)
- RobotClient documents the command return-code convention ABC-wide;
  set_shapes is program-layer + acknowledged; new shapes() readback query
  returning ShapeWorld (installation/program layers)
- StatusBuffer.scene_epoch; collision pairs speak URDF link names +
  shape:/install:/tool: vocabulary, never backend-internal identifiers
- ShapeChange captures mid-script set_shapes for preview marking replay

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7tEqGhaTqJV6ZxCXgMpFU
…alidation

Playback's step channel is no longer reserved surface — the host fires it
whenever executing_step_* advance, so the docstring now states that contract.
set_shapes documents that a world change invalidates in-flight and queued
trajectory motion that now violates it (backend re-guards and halts with a
collision error).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7tEqGhaTqJV6ZxCXgMpFU
@Jepson2k
Jepson2k merged commit c7d088d into main Jul 8, 2026
2 checks passed
@Jepson2k
Jepson2k deleted the feat/collision branch July 8, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant