Robot State¶
For clients to use the robot state service.
- class bosdyn.client.robot_state.RobotStateClient[source]¶
Bases:
BaseClient
Client for the RobotState service.
- default_service_name = 'robot-state'¶
- service_type = 'bosdyn.api.RobotStateService'¶
- get_robot_state(**kwargs)[source]¶
Obtain current state of the robot.
- Returns
The current robot state.
- Return type
RobotState
- Raises
RpcError – Problem communicating with the robot.
- get_robot_metrics(**kwargs)[source]¶
Obtain robot metrics, such as distance traveled or time powered on.
- Returns
All of the current robot metrics.
- Raises
RpcError – Problem communicating with the robot.
- get_robot_hardware_configuration(**kwargs)[source]¶
Obtain current hardware configuration of robot.
- Returns
The hardware configuration, which includes the link names.
- Raises
RpcError – Problem communicating with the robot.
- get_robot_hardware_configuration_async(**kwargs)[source]¶
Async version of get_robot_hardware_configuration()
- get_robot_link_model(link_name, **kwargs)[source]¶
Obtain link model OBJ for a specific link.
- Parameters
link_name (string) – Name of the link to get the model.
- Returns
The bosdyn.api.Skeleton.Link.ObjModel for the specified link.
- Raises
RpcError – Problem communicating with the robot.
- bosdyn.client.robot_state.has_arm(state_client, timeout=None)[source]¶
Check if the robot has an arm attached.
- Parameters
state_client – RobotStateClient to query for robot state.
timeout – Number of seconds to wait for RPC response.
- Returns
Returns True if robot has an arm, False otherwise.
- Return type
bool
- Raises
RpcError – A problem occurred trying to communicate with the robot.