Estop
For clients to the emergency stop (estop) service.
- exception bosdyn.client.estop.EstopResponseError(response, error_message=None)[source]
Bases:
ResponseError
General class of errors for Estop service.
- exception bosdyn.client.estop.EndpointUnknownError(response, error_message=None)[source]
Bases:
EstopResponseError
The endpoint specified in the request is not registered.
- exception bosdyn.client.estop.IncorrectChallengeResponseError(response, error_message=None)[source]
Bases:
EstopResponseError
The challenge and/or response was incorrect.
- exception bosdyn.client.estop.EndpointMismatchError(response, error_message=None)[source]
Bases:
EstopResponseError
Target endpoint did not match.
- exception bosdyn.client.estop.ConfigMismatchError(response, error_message=None)[source]
Bases:
EstopResponseError
Registered to the wrong configuration.
- exception bosdyn.client.estop.InvalidEndpointError(response, error_message=None)[source]
Bases:
EstopResponseError
New endpoint was invalid.
- exception bosdyn.client.estop.InvalidIdError(response, error_message=None)[source]
Bases:
EstopResponseError
Tried to replace a EstopConfig, but provided bad ID.
- exception bosdyn.client.estop.MotorsOnError(response, error_message=None)[source]
Bases:
EstopResponseError
The operation is not allowed while motors are on.
- class bosdyn.client.estop.StopLevel(value)
Bases:
IntEnum
An enumeration.
- ESTOP_LEVEL_UNKNOWN = 0
- ESTOP_LEVEL_CUT = 1
- ESTOP_LEVEL_SETTLE_THEN_CUT = 2
- ESTOP_LEVEL_NONE = 4
- class bosdyn.client.estop.EstopClient(name='EstopClient - PID: 52')[source]
Bases:
BaseClient
Client to the estop service.
- default_service_name = 'estop'
- service_type = 'bosdyn.api.EstopService'
- register(target_config_id, endpoint, **kwargs)[source]
Register the endpoint in the target configuration.
- Parameters:
target_config_id – The identification of the current configuration on the robot.
endpoint – Estop endpoint.
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
estop_pb2.EstopEndpoint that has been registered.
- deregister(target_config_id, endpoint, **kwargs)[source]
Deregister the endpoint in the target configuration.
- Parameters:
target_config_id – The identification of the current configuration on the robot.
endpoint – Estop endpoint.
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- get_config(**kwargs)[source]
Return the estop configuration of the robot.
- Parameters:
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
estop_pb2.EstopConfig the robot is currently using.
- set_config(config, target_config_id, **kwargs)[source]
Change the estop configuration of the robot.
- Parameters:
config – New configuration to set.
target_config_id – The identification of the current configuration on the robot.
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
estop_pb2.EstopConfig the robot is currently using.
- get_status(**kwargs)[source]
Return the estop status of the robot.
- Parameters:
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
estop_pb2.EstopSystemStatus from the server.
- check_in(stop_level, endpoint, challenge, response, suppress_incorrect=False, **kwargs)[source]
Check in with the estop system.
- Parameters:
stop_level – Integer / enum representing desired stop level. See StopLevel enum.
endpoint – The endpoint asserting the stop level.
challenge – A previously received challenge from the server.
response – A response to the ‘challenge’ argument.
suppress_incorrect – Set True to prevent an IncorrectChallengeResponseError from being raised when STATUS_INVALID is returned. Useful for the first check-in, before a challenge has been sent by the server.
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
A new challenge from the server.
- class bosdyn.client.estop.EstopEndpoint(client, name, estop_timeout, role='PDB_rooted', first_checkin=True, estop_cut_power_timeout=None)[source]
Bases:
object
Endpoint in the software estop system.
- REQUIRED_ROLE = 'PDB_rooted'
- property last_set_level
- force_simple_setup()[source]
Replaces the existing estop configuration with a single-endpoint configuration.
- stop(**kwargs)[source]
Issue a CUT stop level command to the robot, cutting motor power immediately.
- Parameters:
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
None. Will raise an error if RPC failed.
- settle_then_cut(**kwargs)[source]
Issue a SETTLE_THEN_CUT stop level. The robot will attempt to sit before cutting motor power.
- Parameters:
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
None. Will raise an error if RPC failed.
- allow(**kwargs)[source]
Issue a NONE stop level command to the robot, allowing motor power.
- Parameters:
kwargs – Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
- Returns:
None. Will raise an error if RPC failed.
- check_in_at_level(level, **kwargs)[source]
Check in at a specified level.
Meant for internal use, but may be helpful for higher-level wrappers.
- property unique_id
Return the _unique_id. Should be used as read-only.
- class bosdyn.client.estop.EstopKeepAlive(endpoint, rpc_timeout_seconds=None, rpc_interval_seconds=None, keep_running_cb=None, max_status_queue_size=20)[source]
Bases:
object
Wraps an EstopEndpoint to do periodic check-ins, keeping software estop from timing out.
This is intended to be the common implementation of both periodic checking-in and one-time check-ins. See the command line utility and the “Big Red Button” application for examples.
You should not access any of the “private” members, or the wrapped endpoint.
- property last_set_level
- property logger
- property endpoint
Return the _endpoint. Should be used as read-only.
- property client
Return the _endpoint.client. Should be used as read-only.