Collision surface: query ABC, CollisionStatus, Shape world + set_shapes#8
Merged
Conversation
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
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.
Adds the shared collision contract that parol6 implements and Waldo-Commander consumes:
RobotABC collision query surface +CollisionStatus(active/pairs on theStatusBuffercontract)Shapedataclass union (Box/Sphere/Cylinder/Plane) with construction validation, per-shapemargin, wire codec (shape_from_wirerejects wrong param counts), and pair-name vocabularycommander.scene.shapesreadback surface +client.set_shapeswith acked delivery; setting shapes invalidates in-flight and queued trajectory motion (documented contract)Robot.apply_shapes,PathSegment.collision_step, per-programPlaybackstep channelRelease 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