tell_client: restore "No Pin in Gripper" detection on empty-gripper mount

Commit 071b4ab made mount() return SUCCESS as soon as it saw the intermediate
TELL "state"/Busy event, before the later "Gripper detection" event is read,
so an empty-gripper mount completed silently with no MountingFailed/pop-up.

check_command_ok blocks (wait_not_busy) until the mount sequence finishes, so
after it returns the robot's own record is authoritative: if get_mounted_sample()
is None the gripper was empty -> return NO_PIN_IN_GRIPPER, which the mounting
service maps to MountingFailed("No Pin in Gripper"). Covers manual and automation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
appleb_mandClaude Opus 4.8 committed 2026-06-24 15:30:08 +02:00
1 parent 47e05dc28c
commit 5370c0f168
3 files changed
+33

No files matched your search

+9
View File
@@ -293,6 +293,15 @@ class TellClient:
timeout=wait_timeout, msg=f"Mount {segment}{puck}-{sample}: "
)
logger.info(f"Check command okay response: {msg}")
# check_command_ok blocks (wait_not_busy) until the whole
# mount sequence has finished, so the gripper-detection event
# we observed as an intermediate "state"/Busy event is now
# resolved. The robot's own record is authoritative: if it
# reports nothing mounted, the gripper was empty (no pin),
# which we must surface rather than reporting success.
if self.get_mounted_sample() is None:
logger.warning("Mount command completed but robot reports no sample mounted")
return TellEventValueEnum.NO_PIN_IN_GRIPPER
return TellEventValueEnum.SUCCESS
elif (
event == TellEventTypeEnum.GIPPER_DETECTION.value