Skip to content

position_bed control verb for the Bambu A1 (approved 2026-11-05) - #12

Merged
cyrilcaoyang merged 1 commit into
mainfrom
feat/a1-position-bed
Nov 5, 2026
Merged

cyrilcaoyang merged 1 commit into
mainfrom
feat/a1-position-bed

Conversation

@cyrilcaoyang

Copy link
Copy Markdown
Collaborator

Summary

Yang approved (2026-11-05) a fifth control verb, A1 only: after a print the bed is parked forward at Y250 for the robot, where the camera cannot see the front of the plate, so agent plate checks fail.

  • POST /printers/{id}/control/position_bed with {"position": "inspect" | "pickup", "bed_path_clear": true} moves the bed to the Y configured under the printer's bed_positions (inspect_y_mm, pickup_y_mm, feed_mm_min default 3000).
  • Sends exactly G90 / G1 Y<y> F<feed>: no X, no Z, no homing, no caller-supplied coordinate.
  • Gates: claim (423); idle, error-free printer, no gateway job in flight (412); edge-verified caller (403); an agent also needs A1 agent mode on (403). bed_path_clear must be literally true.
  • Config accepts bed_positions on an A1 only, within the declared bed.
  • allowed_actions lists position_bed when the gate is open; each move emits a bed.moved event; an undelivered move returns 502 and is never retried.
  • Approval recorded in AGENTS.md and AGENT_RULES.md rule 1; README, API reference, agent guide (the inspect step before the snapshot) and example config updated.

Hardware unknowns

  • Whether the A1 accepts G1 Y after the end gcode's M18 without re-homing. If it does not, the move is reported and nothing else happens.
  • The right inspect_y_mm: start at 128 and check the camera view.

Test plan

  • uv run pytest -q — 346 passed (13 new, all on fake backends)
  • uv run ruff check .
  • Supervised hardware move on bambu_a1_01: inspect, confirm with camera, then pickup

🤖 Generated with Claude Code

Yang approved a fifth control verb for the A1 only, so the camera can see
the whole plate before a plate check after the bed was parked forward for
pickup, and so the bed can be returned to the pickup position.

POST /printers/{id}/control/position_bed takes
{"position": "inspect" | "pickup", "bed_path_clear": true} and moves the
bed to the Y configured under the printer's `bed_positions`. It sends
exactly `G90` / `G1 Y<y> F<feed>` through the backend: no X, no Z, no
homing, no caller-supplied coordinate. Gates: claim; idle, error-free
printer with no gateway job in flight; edge-verified caller; an agent also
needs agent mode on. Config accepts `bed_positions` on an A1 only. Each
move emits `bed.moved`; a refused or undelivered move is never retried.

AGENTS.md and AGENT_RULES.md rule 1 record the approval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cyrilcaoyang
cyrilcaoyang merged commit 3c1280b into main Nov 5, 2026
1 check passed
@cyrilcaoyang

Copy link
Copy Markdown
Collaborator Author

First hardware test of position_bed on bambu_a1_01: passed

Run on 2026-11-05 by agent yang-macbook-claude@lab.local (verified), A1 agent mode on, with a person watching at the printer. Per ac-organic-lab#103 (§1.3), the person confirmed the robot arm was parked clear of the bed's travel; that statement covered these two moves only. No print was started, stopped or approved.

Preconditions: printer idle and cold (24 °C), no claim held, allowed_actions included position_bed.

Time (UTC) Action Result
04:41:24 Snapshot oi2Tv9oC…r5U6 Bed in the forward pickup position; front-left corner out of frame; visible plate empty
04:41:40 position_bed inspect Accepted: {"position":"inspect","y_mm":128.0,"moved_by_verified":true,…}
04:42:00 Snapshot JMdUBoY4…sdT50 Bed moved back towards the centre; front-left corner and notch visible and clear; far corner cut off at the frame edge and under glare
04:42:13 position_bed pickup Accepted: {"position":"pickup","y_mm":250.0,"moved_by_verified":true,…}
04:42:32 Snapshot SIoOMIfF…rIgc Bed back where it started, matching the first snapshot
— Release 204
  • Printer screen: no warning during either move (reported by the person at the printer).
  • No refusals, so nothing was retried.

Findings

  • inspect (Y 128) works for front-left jobs: the front-left corner is clearly in view. The far corner is still partly out of frame. A slightly higher Y (about 140) might show both corners; that needs checking by eye.
  • The printer doesn't report bed position. The response's note says so, so the snapshot is the only confirmation that the bed moved.
  • Tooling gap (not in this PR): the lab MCP client returns only the response body, so it can't show the exact status code of a successful call.

https://claude.ai/code/session_01MTxE6oSufbKXoZ2SpcLaJq

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