Skip to content

v1 Mantis LC3: pick up and place a carousel's chip, the carousel read at the slot first - #1689

Open
AskeU wants to merge 2 commits into
PyLabRobot:mainfrom
AskeU:mantis-carousel-pick-up
Open

AskeU wants to merge 2 commits into
PyLabRobot:mainfrom
AskeU:mantis-carousel-pick-up

Conversation

@AskeU

@AskeU AskeU commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The Problem

A carousel's chip could only be picked up by turning the carousel and playing a path outside the driver, with nothing checking that the carousel stood at the slot, that the slot held a chip, or that it did not turn with the head inside.

PR Content

  • pick_up_chip(chip_number) and place_chip(chip_number, ...) take a carousel's chips: numbers after the six chip slots name carousel slots by the declared blocks, the left_carousel block's capacity from 7, then the right_carousel block's. A declared carousel that did not answer at setup leaves its numbers refused, never shifted to the other.
  • The head plays the carousel block's pick_up_path, measured on the unit, as it plays a chip slot's path: in to its attach line and out, reversed for a placement.
  • Before the head enters the slot: a v3 stands at idle, the carousel is homed, the slot's tag is read whole (a chip for a pick-up, none for a placement), the slot is turned to the head, and the carousel is read homed, still, without faults and at the slot's calibrated angle. Nothing moves otherwise.
  • The carousel's lock is held from that last read until the head is back at idle, so it never turns with the head in or below the slot. A v4 refuses: none has run it.
  • Tests: the arm's order of calls with the measured path; the carousel's hold refusing off the slot, while moving or with a fault, and a turn waiting for the hold, against the captured turns and status reads.
  • design.md and the hello-world notebook: the carousel's chip numbers and the checks.

Builds on #1688.

🤖 Generated with Claude Code

@AskeU
AskeU requested a review from a team as a code owner November 24, 2026 14:22
BioCam and others added 2 commits November 27, 2026 17:15
…chip with its RFID reader

The LC3 carousel was a standalone class with its own USB link: nothing knew where the Mantis's head
was when it turned, and a carousel slot's chip could only be known by picking it up.

The carousel is now a feature discovered like the others: a declared `left_carousel` or
`right_carousel` block (CarouselConfiguration's fields) gives `driver.left_carousel` /
`driver.right_carousel` (also on the device), None by default. Setup opens the LC3's command link
and its RFID reader (interface A), reads firmware and limits without moving; one that does not
answer is left out, logged. The Mantis's stop stops each carousel in place and closes its links.
MantisCarousel moves to driver/features and takes the Mantis's driver and the LC3's links; the old
module path is gone.

A carousel turns, homing included, only once the Mantis's arm is brought up and its head reads at
idle; nothing is sent otherwise. `request_tag(slot=...)` turns the slot to the reader's angle
(`rfid_slot_one_position`, the vendor's RfidCarousel<capacity>Offset), reads back under the
carousel's lock that it stands there, and reads its tag as the Mantis's reader does; a read that
times out or is malformed raises instead of reading as an empty slot; the tag read and its
description are shared module functions in rfid.py.

Tests pin the captured LC3 moves with the values they were captured with and the Mantis reader's
captured tag replies; no turn to a reader angle is captured, so none is sent; design.md lists what
no capture covers yet.

Co-Authored-By: AskeU <89412030+AskeU@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad at the slot first

A carousel's chip could only be picked up by turning the carousel and playing a path outside the
driver, with nothing checking that the carousel stood at the slot, that the slot held a chip, or
that it did not turn with the head inside.

The chip calls take a carousel's chips: a chip number after the chip slots names a carousel's slot
by the declared blocks, the `left_carousel` block's capacity from 7, then the `right_carousel`
block's; a declared carousel that did not answer at setup leaves its numbers refused, never shifted.
The numbering is ours: the vendor's ChipChanger.config has one position per LC3 location after the
chip slots, not one per slot. The chip on the head is taken for its number too.
`pick_up_chip(chip_number)` and `place_chip(chip_number, ...)` play the carousel block's
`pick_up_path`, measured on the unit, as a chip slot's path: in to its attach line and out, reversed
for a placement.

Before the head enters the slot: a v3 stands at idle, the carousel is homed and the slot's tag read
over the LC3's reader, read whole (a chip for a pick-up, none for a placement), then the slot is
turned to the head and the carousel read homed, still, without faults and at the slot's calibrated
angle. Nothing moves otherwise. The carousel's lock is held from that read until the head is back at
idle, so it does not turn with the head in or below the slot. A v4 refuses: none has run it. The
carousel and the arm are taken to be driven from one task (open point).

Tests check the arm's order of calls with the measured path, and the carousel's hold against its
captured turns and status reads; design.md and the hello-world notebook describe the calls.

Co-Authored-By: AskeU <89412030+AskeU@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam
BioCam force-pushed the mantis-carousel-pick-up branch from aff05b9 to 32e6126 Compare November 27, 2026 18:46
@BioCam BioCam changed the title v1 Mantis arm: pick up and place a chip at the LC3 carousel v1 Mantis LC3: pick up and place a carousel's chip, the carousel read at the slot first Nov 27, 2026

This branch has not been deployed

No deployments
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.

2 participants