BB.Kino.Shared.RobotContext (bb_kino v0.3.3)
View SourceShared utilities for robot validation and initial state fetching.
Used by all BB.Kino widgets to validate robot modules and fetch initial state data.
Summary
Functions
Fetches the initial state for a robot.
Fetches just the safety-related state for a robot.
Validates that the given module is a BB robot.
Functions
Fetches the initial state for a robot.
Returns a map containing:
:robot_struct- the robot topology struct:positions- current joint positions:velocities- current joint velocities:state- runtime state (:disarmed, :idle, :executing, :error, :disarming):armed- boolean indicating if robot is armed
Fetches just the safety-related state for a robot.
Returns a map containing:
:state- safety state (:disarmed, :armed, :disarming, :error):armed- boolean:in_error- boolean
Validates that the given module is a BB robot.
Returns {:ok, robot_module} if valid, or {:error, reason} if not.