agents.components.vla¶
Module Contents¶
Classes¶
Vision-Language-Agent (VLA) Component. |
API¶
- class agents.components.vla.VLA(*, inputs: List[agents.ros.Topic], outputs: List[agents.ros.Topic], model_client: agents.clients.lerobot.LeRobotClient, config: agents.config.VLAConfig, component_name: str, **kwargs)¶
Bases:
agents.components.model_component.ModelComponentVision-Language-Agent (VLA) Component.
- custom_on_activate()¶
Custom activation
- custom_on_deactivate()¶
Custom deactivation
- set_termination_trigger(mode: Literal[timesteps, pynput.keyboard, event] = 'timesteps', max_timesteps: int = 100, stop_key: str = 'q', stop_event: Optional[agents.ros.Event] = None)¶
Set the condition used to determine when an action is done.
- Parameters:
mode – One of ‘timesteps’, ‘keyboard’, ‘event’.
max_timesteps – The number of timesteps after which to stop (used if mode=‘timesteps’ or ‘event’).
stop_key – The key to press to stop the action (used if mode=‘keyboard’).
- signal_done()¶
Signals that the action is complete. Can be used as an action for signaled events
- set_aggregation_function(agg_fn: Callable[[numpy.ndarray, numpy.ndarray], numpy.ndarray])¶
Set the aggregation function to be used for aggregating generated actions from the robot policy model
- Parameters:
agg_fn (Callable[[np.ndarray, np.ndarray], np.ndarray]) – A callable that takes two numpy arrays as input and returns a single numpy array.
- Raises:
TypeError – If
agg_fnis not a callable or does not match the expected signature.
- main_action_callback(goal_handle: agents.ros.VisionLanguageAction.Goal)¶
Callback for the VLA main action server
- Parameters:
goal_handle (VisionLanguageAction.Goal) – Incoming action goal
- Returns:
Action result
- Return type:
VisionLanguageAction.Result