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

Marker scan action server

Expose multi-position marker scans backed by a server-local VisionEngine and tag cache.

beambot.action_servers.vision_scan_server · Source

Perception and mapping · Guide · Symbol index

How it is used

This server moves through supplied scan positions and caches marker observations in its own VisionEngine. _execute() accepts flattened groups of six joint angles in radians and delegates to scan_all_tags().

Its cache is not shared with the unified vision-task server. Tool-exchange TF resets target that unified server only; this standalone scan server has no reset service.

Start here

Callable

Purpose

main

Run VisionActionServer through the shared multithreaded ROS server runner.

VisionActionServer._execute

Require six flattened joint values per scan position, group them without unit conversion and call scan_all_tags with positive overrides or defaults of three scans and 10 s timeout.

Functions

main()

Run VisionActionServer through the shared multithreaded ROS server runner.

Entry point · Source

main(args=None)

Parameter

Meaning

args

Optional ROS initialization arguments; None uses normal rclpy argument handling.

Returns: None when the server exits.

Errors: KeyboardInterrupt during spin is handled by run_server; initialization/construction and other executor errors propagate.

Side effects: Initializes ROS, constructs the action node, spins until shutdown and destroys the node/context.

VisionActionServer

Concrete BaseActionServer for multi-position marker scans with a server-local VisionEngine. Its execution override returns scan success rather than using the base stages.run() contract.

Inherits from: BaseActionServer.

VisionActionServer._execute()

Require six flattened joint values per scan position, group them without unit conversion and call scan_all_tags with positive overrides or defaults of three scans and 10 s timeout.

Extension hook · Source

_execute(self, goal_handle)

Parameter

Meaning

goal_handle

VisionScanAction handle with radian scan positions and scan settings.

Returns: VisionScanAction.Result; success requires tags_detected > 0, with an invalid-position or no-tags error otherwise.

Errors: Wrong flat length returns a failed result; scan exceptions propagate to the base wrapper. Count positivity is not separately checked.

Side effects: Moves through scan positions, captures/detects tags and updates the engine’s local tag cache; uses 0.3 s settle after each move.

VisionActionServer.__init__()

Register the beambot_vision_scan action and initialize its vision engine.

Lifecycle · Source

__init__(self)

Errors: Vision/configuration/ROS initialization errors propagate.

Side effects: Constructs VisionEngine resources and the action server.

VisionActionServer.create_stages()

Read beamline camera type/frame/dictionary and construct the scan engine.

Extension hook · Source

create_stages(self)

Returns: VisionEngine bound to this node.

Errors: Configuration/camera/engine initialization errors propagate.

Side effects: Reads configuration, initializes vision resources and logs selected camera.