Spot Check

exception bosdyn.client.spot_check.SpotCheckError(response, error_message=None)[source]

Bases: ResponseError

General class of errors for SpotCheck service.

exception bosdyn.client.spot_check.SpotCheckResponseError(response, error_message=None)[source]

Bases: SpotCheckError

General class of errors for spot check routines.

exception bosdyn.client.spot_check.SpotCheckUnexpectedPowerChangeError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Power error occurred while running spot check.

exception bosdyn.client.spot_check.SpotCheckImuCheckError(response, error_message=None)[source]

Bases: SpotCheckResponseError

IMU reports robot is not on flat round.

exception bosdyn.client.spot_check.SpotCheckNotSittingError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Robot not started in sitting configuration.

exception bosdyn.client.spot_check.SpotCheckLoadcellTimeoutError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Internal time out during spot check loadcell cal.

exception bosdyn.client.spot_check.SpotCheckPowerOnFailure(response, error_message=None)[source]

Bases: SpotCheckResponseError

Power on error occurred while running spot check.

exception bosdyn.client.spot_check.SpotCheckEndstopTimeoutError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Internal time out during spot check endstop cal.

exception bosdyn.client.spot_check.SpotCheckStandFailureError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Robot failed to stand during spotcheck.

exception bosdyn.client.spot_check.SpotCheckCameraTimeoutError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Internal time out during spot check camera check.

exception bosdyn.client.spot_check.SpotCheckGroundCheckError(response, error_message=None)[source]

Bases: SpotCheckResponseError

Robot failed flat ground check.

exception bosdyn.client.spot_check.SpotCheckTimedOutError[source]

Bases: Exception

Timed out waiting for SUCCESS response from spot check.

exception bosdyn.client.spot_check.CameraSpotCheckTimedOutError[source]

Bases: Exception

Timed out waiting for SUCCESS response from camera spot check.

exception bosdyn.client.spot_check.CameraSpotCheckFeedbackError[source]

Bases: Exception

General class of errors for camera spot check feedback.

exception bosdyn.client.spot_check.CameraCalibrationResponseError(response, error_message=None)[source]

Bases: SpotCheckError

General class of errors for camera calibration routines.

exception bosdyn.client.spot_check.CameraCalibrationUserCanceledError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

API client canceled calibration.

exception bosdyn.client.spot_check.CameraCalibrationPowerError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

The robot is not powered on.

exception bosdyn.client.spot_check.CameraCalibrationTargetNotCenteredError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

Invalid starting configuration of robot.

exception bosdyn.client.spot_check.CameraCalibrationRobotCommandError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

Robot command error occurred while running calibration.

exception bosdyn.client.spot_check.CameraCalibrationCalibrationError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

Calibration algorithm failure occurred.

exception bosdyn.client.spot_check.CameraCalibrationInternalError(response, error_message=None)[source]

Bases: CameraCalibrationResponseError

Internal error occurred .

exception bosdyn.client.spot_check.CameraCalibrationTimedOutError[source]

Bases: Exception

Timed out waiting for SUCCESS response from calibration.

class bosdyn.client.spot_check.SpotCheckClient[source]

Bases: BaseClient

A client for verifying robot health and running calibration routines.

default_service_name = 'spot-check'
service_type = 'bosdyn.api.spot.SpotCheckService'
spot_check_command(request, **kwargs)[source]

Issue a spot check command to the robot.

Raises:

Error on header error or lease use result error.

spot_check_command_async(request, **kwargs)[source]

Async version of spot_check_command().

spot_check_feedback(request, **kwargs)[source]

Check the current status of spot check.

Raises:

SpotCheckResponseError on any feedback error.

spot_check_feedback_async(request, **kwargs)[source]

Async version of spot_check_feedback().

camera_calibration_command(request, **kwargs)[source]

Issue a camera calibration command to the robot.

Raises:

Error on header error or lease use result error.

camera_calibration_command_async(request, **kwargs)[source]

Async version of camera_calibration_command().

camera_calibration_feedback(request, **kwargs)[source]

Check the current status of camera calibration.

Raises:

CameraCalibrationResponseError on any feedback error.

camera_calibration_feedback_async(request, **kwargs)[source]

Async version of camera_calibration_feedback().

bosdyn.client.spot_check.run_spot_check(spot_check_client, lease, timeout_sec=212, update_frequency=0.25, verbose=False)[source]

Run full spot check routine. The robot should be sitting on flat ground when this routine is started. This routine calibrates robot joints and checks camera health.

Parameters:
  • spot_check_client (SpotCheckClient) – client for calling calibration service.

  • lease (Lease) – A active lease. Spot check can be overridden at any time with another command.

  • timeout_sec (float) – Max time this function will block for.

  • update_frequency (float) – How often this function will query feedback.

  • verbose (bool) – Periodically print status.

Returns:

Joint and camera check and cal results.

Return type:

SpotCheckFeedbackResponse

Raises:

bosdyn.client.exceptions.Error – Throws on any error failure.

bosdyn.client.spot_check.run_camera_calibration(spot_check_client, lease, timeout_sec=1200, update_frequency=0.25, verbose=False)[source]

Run full camera calibration routine for robot. This function blocks until calibration has completed. This function should be called once the robot is powered on and standing in the configuration described in user documentation.

Parameters:
  • spot_check_client (SpotCheckClient) – client for calling calibration service.

  • lease (Lease) – A active lease, used by calibration routine to issue robot commands. Lease keep alive internally managed by service. Revoke lease to end routine at any time.

  • timeout_sec (float) – Max time this function will block for.

  • update_frequency (float) – How often this function will query feedback.

  • verbose (bool) – Periodically print status.

Raises:

bosdyn.client.exceptions.Error – Throws on any calibration failure.