kompass.components._vision_follower#

Vision target tracking helper for the Controller component.

Encapsulates the Vision Follower lifecycle (setup, initial-target acquisition, action loop, termination) and the vision-only state (_vision_controller, _tracked_center, latest detections, depth image and metadata) that previously lived directly on the Controller.

The helper holds a back-reference to its owning ROS Controller component (self._component) and reads shared infrastructure (TF listeners, callbacks, robot model, publishers, logger) through it.

The helper never mutates Component state except via the documented methods _publish and _stop_robot, plus config._frame_mode which the helper sets at setup time: LOCAL unless the vision algorithm’s configuration asks for the world frame and global localization is available.

Module Contents#

Classes#

VisionFollower

Owns the vision tracking lifecycle for a Controller component in vision mode.

API#

class kompass.components._vision_follower.VisionFollower(component: kompass.components.controller.Controller)#

Owns the vision tracking lifecycle for a Controller component in vision mode.

optimal_path()#

Return the kompass_core optimal path for the current vision controller, if any.

setup() → bool#

Build the core vision controller. Stores it on success.

Tracks in the LOCAL (robot-relative) frame by default. The world frame is used only when requested by config and if global localization is available. Otherwise it falls back to LOCAL with a warning.

execute_action(goal_handle) → kompass_interfaces.action.TrackVisionTarget.Result#

Run the vision tracking action to completion.

request_stop() → bool#

Request termination of an ongoing vision tracking action.

Returns True on success (or if no action is ongoing), False if the action server fails to acknowledge within ten loop ticks.