Power
For clients to the power command service.
- exception bosdyn.client.power.PowerResponseError(response, error_message=None)[source]
Bases:
ResponseErrorGeneral class of errors for Power service.
- exception bosdyn.client.power.ShorePowerConnectedError(response, error_message=None)[source]
Bases:
PowerResponseErrorRobot cannot be powered on while on wall power.
- exception bosdyn.client.power.BatteryMissingError(response, error_message=None)[source]
Bases:
PowerResponseErrorBattery not inserted into robot.
- exception bosdyn.client.power.CommandInProgressError(response, error_message=None)[source]
Bases:
PowerResponseErrorPower command cannot be overwritten.
- exception bosdyn.client.power.EstoppedError(response, error_message=None)[source]
Bases:
PowerResponseErrorCannot power on while estopped; inspect EStopState for more info.
- exception bosdyn.client.power.OverriddenError(response, error_message=None)[source]
Bases:
PowerResponseErrorThe command was overridden and is no longer valid.
- exception bosdyn.client.power.KeepaliveMotorsOffError(response, error_message=None)[source]
Bases:
PowerResponseErrorCannot power on while Keepalive requests motors off.
- exception bosdyn.client.power.FaultedError(response, error_message=None)[source]
Bases:
PowerResponseErrorCannot power on due to a fault; inspect FaultState for more info.
- exception bosdyn.client.power.PowerError[source]
Bases:
ErrorGeneral class of errors to handle non-response non-grpc errors.
- exception bosdyn.client.power.CommandTimedOutError[source]
Bases:
PowerErrorTimed out waiting for SUCCESS response from power command.
- exception bosdyn.client.power.FanControlTemperatureError(response, error_message=None)[source]
Bases:
PowerResponseErrorCurrent measured robot temperatures are too high to accept user fan command.
- exception bosdyn.client.power.SafetyStopIncompatibleHardwareError(response, error_message=None)[source]
Bases:
PowerResponseErrorSafetyStop command invalid because robot is not configured for SRSF.
- exception bosdyn.client.power.SafetyStopFailedError(response, error_message=None)[source]
Bases:
PowerResponseErrorSafetyStop command executed and failed.
- exception bosdyn.client.power.SafetyStopUnknownStopTypeError(response, error_message=None)[source]
Bases:
PowerResponseErrorSafetyStop command failed due to unknown stop type.
- class bosdyn.client.power.PowerClient[source]
Bases:
BaseClientA client for enabling / disabling robot motor power. Commands are non-blocking. Clients are expected to issue a power command and then periodically check the status of this command. This service requires ownership over the robot, in the form of a lease.
- default_service_name = 'power'
- service_type = 'bosdyn.api.PowerService'
- power_command_feedback(power_command_id, **kwargs)[source]
Check the status of a previously issued power command.
- power_command_feedback_async(power_command_id, **kwargs)[source]
Async version of power_command_feedback()
- fan_power_command(percent_power, duration, lease=None, **kwargs)[source]
Issue a fan power command request to the robot.
- fan_power_command_async(percent_power, duration, lease=None, **kwargs)[source]
Async version of fan_power_command()
- fan_power_command_feedback(command_id, **kwargs)[source]
Check the status of a previously issued fan command
- fan_power_command_feedback_async(command_id, **kwargs)[source]
Async version of fan_power_command_feedback()
- bosdyn.client.power.safe_power_off(command_client, state_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Safely power off motors. See safe_power_off_motors().
Deprecated since version 3.0.0: Replaced by the less ambiguous safe_power_off_motors function.
- bosdyn.client.power.safe_power_off_motors(command_client, state_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off robot motors safely. This function blocks until robot safely powers off. This means the robot will attempt to sit before powering motors off.
- Parameters:
command_client (RobotCommandClient) – client for calling RobotCommandService safe power off.
state_client (RobotStateClient) – client for monitoring power state.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
RobotCommandResponseError – Something went wrong with the safe power off.
- bosdyn.client.power.power_on(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power on robot motors. See power_on_motors().
Deprecated since version 2.3.4: Replaced by the less ambiguous power_on_motors function.
- bosdyn.client.power.power_off(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot motors. See power_off_motors().
Deprecated since version 2.3.4: Replaced by the less ambiguous power_off_motors function.
- bosdyn.client.power.power_on_motors(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power on robot motors. This function blocks until the command returns success.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.power_off_motors(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot motors.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.safe_power_off_robot(command_client, state_client, power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot motors and then the robot computers safely. This function blocks until robot safely powers off. This means the robot will attempt to sit before powering motors off.
- Parameters:
command_client (RobotCommandClient) – client for calling RobotCommandService safe power off.
state_client (RobotStateClient) – client for monitoring power state.
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
RobotCommandResponseError – Something went wrong with the safe power off.
- bosdyn.client.power.power_off_robot(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Fully power off the robot. Powering off the robot will stop API comms.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.safe_power_cycle_robot(command_client, state_client, power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power cycle the robot safely. This function blocks until robot safely powers off. The robot will attempt to sit before powering cycling.
- Parameters:
command_client (RobotCommandClient) – client for calling RobotCommandService safe power off.
state_client (RobotStateClient) – client for monitoring power state.
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
RobotCommandResponseError – Something went wrong with the safe power off.
- bosdyn.client.power.power_cycle_robot(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power cycle the robot. Power cycling the robot will stop API comms.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.power_off_payload_ports(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot payload ports.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.power_on_payload_ports(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power on the robot payload ports.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.power_off_wifi_radio(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot Wi-Fi radio.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.
- bosdyn.client.power.power_on_wifi_radio(power_client, timeout_sec=30, update_frequency=1.0, **kwargs)[source]
Power off the robot Wi-Fi radio.
- Parameters:
power_client (bosdyn.api.PowerClient) – client for calling power service.
timeout_sec (float) – Max time this function will block for.
update_frequency (float) – The frequency with which the robot should check if the command has succeeded.
- Raises:
RpcError – Problem communicating with the robot.
power.CommandTimedOutError – Did not power off within timeout_sec
PowerResponseError – Something went wrong during the power off sequence.