Work in progress: this documentation is still being written and reviewed. Check details against the source code.

Vacuum monitoring state

Track ePick grasp/release state and latch a drop flag. The status subscription is disabled, so normal construction does not receive live vacuum updates.

beambot.core.vacuum_monitor · Source

Tools and end effectors · Guide · Symbol index

How it is used

This class contains the intended grasp/drop bookkeeping: executed grasp/release tasks change the armed state, a status callback latches loss, and check_lost() consumes that indication.

Monitoring is currently inactive: the orchestrator does not construct VacuumMonitor, and the constructor’s status subscription is disabled. These methods document the retained implementation; they do not establish live grasp verification.

Start here

Callable

Purpose

VacuumMonitor.update_after_tasks

For the active epick gripper, inspect executed end_effector tasks in order: grasp arms and clears the latch, release disarms and clears it. A last status of 3 immediately relatches loss on grasp.

VacuumMonitor.check_lost

Consume an armed loss indication once by disarming the monitor and returning recovery guidance.

VacuumMonitor.reset

Disarm the monitor and clear its latched loss for a new goal; preserve the last status value.

VacuumMonitor

State holder for ePick grasp arming and one-shot loss reporting. Its ROS subscription is disabled, so status updates are not received by normal construction.

VacuumMonitor.update_after_tasks()

For the active epick gripper, inspect executed end_effector tasks in order: grasp arms and clears the latch, release disarms and clears it. A last status of 3 immediately relatches loss on grasp.

Method · Source

update_after_tasks(self, executed_tasks: list[dict[str, Any]], current_gripper: str)

Parameter

Meaning

executed_tasks

Successfully executed task dictionaries.

current_gripper

Current gripper name; all names except epick are ignored.

Returns: None.

Errors: Missing configured grasp/release names are logged and cause an early return; malformed mappings can raise.

Side effects: Mutates armed/lost according to actions and logs transitions; creates no subscription.

VacuumMonitor.check_lost()

Consume an armed loss indication once by disarming the monitor and returning recovery guidance.

Method · Source

check_lost(self) -> str | None

Returns: VACUUM_LOST message if both armed and lost; otherwise None.

Errors: No explicit failure path.

Side effects: Disarms on a reported loss but leaves lost latched.

VacuumMonitor.reset()

Disarm the monitor and clear its latched loss for a new goal; preserve the last status value.

Method · Source

reset(self)

Returns: None.

Errors: No explicit failure path.

Side effects: Sets armed and lost to False.

VacuumMonitor.__init__()

Initialize disarmed vacuum state and retain gripper configuration. The local _SUBSCRIBE=False branch returns before importing ePick messages or creating a subscription.

Lifecycle · Source

__init__(self, node: Node, grippers_config: dict[str, Any], callback_group=None)

Parameter

Meaning

node

ROS node providing the logger.

grippers_config

Gripper configuration containing ePick grasp/release SRDF state names.

callback_group

Callback group retained only by the disabled subscription branch.

Errors: No ePick import/service failure occurs on the active construction path.

Side effects: Sets armed/lost false, status None and _sub None; creates no subscription.

Internal callbacks and helpers

VacuumMonitor._on_status()

Record integer object-detection status and latch a loss when status 3 arrives while armed. This callback is not subscribed by the current constructor.

Callback · Source

_on_status(self, msg)

Parameter

Meaning

msg

ePick message with numeric status; 3 means no object.

Returns: None.

Errors: Status conversion errors propagate.

Side effects: Updates status and latches lost on the first armed no-object report. Logs once per loss latch; subsequent status 3 messages do not repeat the warning.

Referenced in source (1)