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 based on TF availability.

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.

Decides _frame_mode from TF availability: if the odom→world TF (or matching frames) is available we operate in GLOBAL, otherwise we fall back to LOCAL (robot-relative).

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.