spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
1,485 lines (1,404 loc) • 104 kB
text/typescript
/* eslint-disable */
import { Timestamp } from "../../../google/protobuf/timestamp";
import { RequestHeader, ResponseHeader } from "../header";
import { Lease, LeaseUseResult } from "../lease";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "bosdyn.api.spot";
/** Request for the SpotCheckCommand service. */
export interface SpotCheckCommandRequest {
/** Common request header. */
header: RequestHeader | undefined;
/** The Lease to show ownership of the robot. Lease required to issue any SpotCheck command. */
lease: Lease | undefined;
/** The describing what the spot check service should do. */
command: SpotCheckCommandRequest_Command;
}
export enum SpotCheckCommandRequest_Command {
/** COMMAND_UNKNOWN - Unused enum. */
COMMAND_UNKNOWN = 0,
/** COMMAND_START - Start spot check joint calibration and camera checks. */
COMMAND_START = 1,
/** COMMAND_ABORT - Abort spot check joint calibration and camera check. */
COMMAND_ABORT = 2,
/** COMMAND_REVERT_CAL - Revert joint calibration back to the previous values. */
COMMAND_REVERT_CAL = 3,
UNRECOGNIZED = -1,
}
export function spotCheckCommandRequest_CommandFromJSON(
object: any
): SpotCheckCommandRequest_Command {
switch (object) {
case 0:
case "COMMAND_UNKNOWN":
return SpotCheckCommandRequest_Command.COMMAND_UNKNOWN;
case 1:
case "COMMAND_START":
return SpotCheckCommandRequest_Command.COMMAND_START;
case 2:
case "COMMAND_ABORT":
return SpotCheckCommandRequest_Command.COMMAND_ABORT;
case 3:
case "COMMAND_REVERT_CAL":
return SpotCheckCommandRequest_Command.COMMAND_REVERT_CAL;
case -1:
case "UNRECOGNIZED":
default:
return SpotCheckCommandRequest_Command.UNRECOGNIZED;
}
}
export function spotCheckCommandRequest_CommandToJSON(
object: SpotCheckCommandRequest_Command
): string {
switch (object) {
case SpotCheckCommandRequest_Command.COMMAND_UNKNOWN:
return "COMMAND_UNKNOWN";
case SpotCheckCommandRequest_Command.COMMAND_START:
return "COMMAND_START";
case SpotCheckCommandRequest_Command.COMMAND_ABORT:
return "COMMAND_ABORT";
case SpotCheckCommandRequest_Command.COMMAND_REVERT_CAL:
return "COMMAND_REVERT_CAL";
case SpotCheckCommandRequest_Command.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Response for the SpotCheckCommand service. */
export interface SpotCheckCommandResponse {
/** Common response header. */
header: ResponseHeader | undefined;
/** Details about how the lease was used. */
leaseUseResult: LeaseUseResult | undefined;
/** Command status */
status: SpotCheckCommandResponse_Status;
/** Human-readable description if an error occurred. */
message: string;
}
export enum SpotCheckCommandResponse_Status {
/** STATUS_UNKNOWN - Unknown */
STATUS_UNKNOWN = 0,
/** STATUS_OK - Request was accepted. */
STATUS_OK = 1,
/** STATUS_ERROR - An error ocurred. */
STATUS_ERROR = 2,
UNRECOGNIZED = -1,
}
export function spotCheckCommandResponse_StatusFromJSON(
object: any
): SpotCheckCommandResponse_Status {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return SpotCheckCommandResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return SpotCheckCommandResponse_Status.STATUS_OK;
case 2:
case "STATUS_ERROR":
return SpotCheckCommandResponse_Status.STATUS_ERROR;
case -1:
case "UNRECOGNIZED":
default:
return SpotCheckCommandResponse_Status.UNRECOGNIZED;
}
}
export function spotCheckCommandResponse_StatusToJSON(
object: SpotCheckCommandResponse_Status
): string {
switch (object) {
case SpotCheckCommandResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case SpotCheckCommandResponse_Status.STATUS_OK:
return "STATUS_OK";
case SpotCheckCommandResponse_Status.STATUS_ERROR:
return "STATUS_ERROR";
case SpotCheckCommandResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Request for the SpotCheckFeedback service. */
export interface SpotCheckFeedbackRequest {
/** Common request header. */
header: RequestHeader | undefined;
}
/** Response for the SpotCheckFeedback service. */
export interface SpotCheckFeedbackResponse {
/** Common response header. */
header: ResponseHeader | undefined;
/** The state of the spot check routine. */
state: SpotCheckFeedbackResponse_State;
/**
* The last command executed by Spotcheck. When SpotCheck is in state WAITING_FOR_COMMAND,
* the last command has completed.
*/
lastCommand: SpotCheckCommandRequest_Command;
/** The specifics of the error for the SpotCheck service. */
error: SpotCheckFeedbackResponse_Error;
/**
* Results from camera check.
* The key string is the location of the camera (e.g. frontright, frontleft, left, ...)
*/
cameraResults: { [key: string]: DepthPlaneSpotCheckResult };
/**
* Results from load cell calibration.
* The key string is the location of the joint (e.g. fl.hxa, fl.hya, fl.kna, ...)
*/
loadCellResults: { [key: string]: LoadCellSpotCheckResult };
/**
* Results from output position sensor calibration.
* The key string is the location of the joint (e.g. fl.hx, fl.hy, fl.kn, ...)
*/
kinematicCalResults: { [key: string]: JointKinematicCheckResult };
/** Result from the payload check */
payloadResult: PayloadCheckResult | undefined;
/**
* Deprecated. Results of foot height validation.
* The key string is the name of the leg (e.g. fl, fr, hl, ...)
*
* @deprecated
*/
footHeightResults: { [key: string]: FootHeightCheckResult };
/**
* Deprecated. Results of leg pair validation.
* The key string is the name of the leg pair (e.g. fl-fr, fl-hl, ...)
*
* @deprecated
*/
legPairResults: { [key: string]: LegPairCheckResult };
/**
* Results of the hip range of motion check
* The key string is the name of the leg (e.g. fl, fr, hl, ...)
*/
hipRangeOfMotionResults: { [key: string]: HipRangeOfMotionResult };
/** The approximate progress of the spot check routine, range [0-1]. */
progress: number;
/** Timestamp for the most up-to-date calibration */
lastCalTimestamp: Date | undefined;
}
export enum SpotCheckFeedbackResponse_State {
/** STATE_UNKNOWN - Unused enum. */
STATE_UNKNOWN = 0,
/** STATE_USER_ABORTED - SpotCheck is aborted by the user. */
STATE_USER_ABORTED = 1,
/** STATE_STARTING - SpotCheck is initializing. */
STATE_STARTING = 2,
/** STATE_LOADCELL_CAL - Load cell calibration underway. */
STATE_LOADCELL_CAL = 3,
/** STATE_ENDSTOP_CAL - Endstop calibration underway. */
STATE_ENDSTOP_CAL = 4,
/** STATE_CAMERA_CHECK - Camera check underway. */
STATE_CAMERA_CHECK = 5,
/** STATE_BODY_POSING - Body pose routine underway. */
STATE_BODY_POSING = 6,
/** STATE_FINISHED - Spot check successfully finished. */
STATE_FINISHED = 7,
/** STATE_REVERTING_CAL - Reverting calibration to previous values. */
STATE_REVERTING_CAL = 8,
/** STATE_ERROR - Error occurred while running spotcheck. Inspect error for more info. */
STATE_ERROR = 9,
/** STATE_WAITING_FOR_COMMAND - Waiting for user command. */
STATE_WAITING_FOR_COMMAND = 10,
/** STATE_HIP_RANGE_OF_MOTION_CHECK - Hip range of motion check underway. */
STATE_HIP_RANGE_OF_MOTION_CHECK = 11,
/** STATE_GRIPPER_CAL - Gripper calibration underway. */
STATE_GRIPPER_CAL = 12,
/** STATE_SIT_DOWN_AFTER_RUN - Sitting down after run. */
STATE_SIT_DOWN_AFTER_RUN = 13,
UNRECOGNIZED = -1,
}
export function spotCheckFeedbackResponse_StateFromJSON(
object: any
): SpotCheckFeedbackResponse_State {
switch (object) {
case 0:
case "STATE_UNKNOWN":
return SpotCheckFeedbackResponse_State.STATE_UNKNOWN;
case 1:
case "STATE_USER_ABORTED":
return SpotCheckFeedbackResponse_State.STATE_USER_ABORTED;
case 2:
case "STATE_STARTING":
return SpotCheckFeedbackResponse_State.STATE_STARTING;
case 3:
case "STATE_LOADCELL_CAL":
return SpotCheckFeedbackResponse_State.STATE_LOADCELL_CAL;
case 4:
case "STATE_ENDSTOP_CAL":
return SpotCheckFeedbackResponse_State.STATE_ENDSTOP_CAL;
case 5:
case "STATE_CAMERA_CHECK":
return SpotCheckFeedbackResponse_State.STATE_CAMERA_CHECK;
case 6:
case "STATE_BODY_POSING":
return SpotCheckFeedbackResponse_State.STATE_BODY_POSING;
case 7:
case "STATE_FINISHED":
return SpotCheckFeedbackResponse_State.STATE_FINISHED;
case 8:
case "STATE_REVERTING_CAL":
return SpotCheckFeedbackResponse_State.STATE_REVERTING_CAL;
case 9:
case "STATE_ERROR":
return SpotCheckFeedbackResponse_State.STATE_ERROR;
case 10:
case "STATE_WAITING_FOR_COMMAND":
return SpotCheckFeedbackResponse_State.STATE_WAITING_FOR_COMMAND;
case 11:
case "STATE_HIP_RANGE_OF_MOTION_CHECK":
return SpotCheckFeedbackResponse_State.STATE_HIP_RANGE_OF_MOTION_CHECK;
case 12:
case "STATE_GRIPPER_CAL":
return SpotCheckFeedbackResponse_State.STATE_GRIPPER_CAL;
case 13:
case "STATE_SIT_DOWN_AFTER_RUN":
return SpotCheckFeedbackResponse_State.STATE_SIT_DOWN_AFTER_RUN;
case -1:
case "UNRECOGNIZED":
default:
return SpotCheckFeedbackResponse_State.UNRECOGNIZED;
}
}
export function spotCheckFeedbackResponse_StateToJSON(
object: SpotCheckFeedbackResponse_State
): string {
switch (object) {
case SpotCheckFeedbackResponse_State.STATE_UNKNOWN:
return "STATE_UNKNOWN";
case SpotCheckFeedbackResponse_State.STATE_USER_ABORTED:
return "STATE_USER_ABORTED";
case SpotCheckFeedbackResponse_State.STATE_STARTING:
return "STATE_STARTING";
case SpotCheckFeedbackResponse_State.STATE_LOADCELL_CAL:
return "STATE_LOADCELL_CAL";
case SpotCheckFeedbackResponse_State.STATE_ENDSTOP_CAL:
return "STATE_ENDSTOP_CAL";
case SpotCheckFeedbackResponse_State.STATE_CAMERA_CHECK:
return "STATE_CAMERA_CHECK";
case SpotCheckFeedbackResponse_State.STATE_BODY_POSING:
return "STATE_BODY_POSING";
case SpotCheckFeedbackResponse_State.STATE_FINISHED:
return "STATE_FINISHED";
case SpotCheckFeedbackResponse_State.STATE_REVERTING_CAL:
return "STATE_REVERTING_CAL";
case SpotCheckFeedbackResponse_State.STATE_ERROR:
return "STATE_ERROR";
case SpotCheckFeedbackResponse_State.STATE_WAITING_FOR_COMMAND:
return "STATE_WAITING_FOR_COMMAND";
case SpotCheckFeedbackResponse_State.STATE_HIP_RANGE_OF_MOTION_CHECK:
return "STATE_HIP_RANGE_OF_MOTION_CHECK";
case SpotCheckFeedbackResponse_State.STATE_GRIPPER_CAL:
return "STATE_GRIPPER_CAL";
case SpotCheckFeedbackResponse_State.STATE_SIT_DOWN_AFTER_RUN:
return "STATE_SIT_DOWN_AFTER_RUN";
case SpotCheckFeedbackResponse_State.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/**
* If SpotCheck experienced an error, specific error details reported here.
* This reflects an error in the routine.
*/
export enum SpotCheckFeedbackResponse_Error {
/** ERROR_UNKNOWN - Unused enum. */
ERROR_UNKNOWN = 0,
/** ERROR_NONE - No error has occurred. */
ERROR_NONE = 1,
/** ERROR_UNEXPECTED_POWER_CHANGE - Unexpected motor power state transition. */
ERROR_UNEXPECTED_POWER_CHANGE = 2,
/** ERROR_INIT_IMU_CHECK - Robot body is not flat on the ground. */
ERROR_INIT_IMU_CHECK = 3,
/** ERROR_INIT_NOT_SITTING - Robot body is not close to a sitting pose */
ERROR_INIT_NOT_SITTING = 4,
/** ERROR_LOADCELL_TIMEOUT - Timeout during loadcell calibration. */
ERROR_LOADCELL_TIMEOUT = 5,
/** ERROR_POWER_ON_FAILURE - Error enabling motor power. */
ERROR_POWER_ON_FAILURE = 6,
/** ERROR_ENDSTOP_TIMEOUT - Timeout during endstop calibration. */
ERROR_ENDSTOP_TIMEOUT = 7,
/** ERROR_FAILED_STAND - Robot failed to stand. */
ERROR_FAILED_STAND = 8,
/** ERROR_CAMERA_TIMEOUT - Timeout during camera check. */
ERROR_CAMERA_TIMEOUT = 9,
/** ERROR_GROUND_CHECK - Flat ground check failed. */
ERROR_GROUND_CHECK = 10,
/** ERROR_POWER_OFF_FAILURE - Robot failed to power off. */
ERROR_POWER_OFF_FAILURE = 11,
/** ERROR_REVERT_FAILURE - Robot failed to revert calibration. */
ERROR_REVERT_FAILURE = 12,
/** ERROR_FGKC_FAILURE - Robot failed to do flat ground kinematic calibration. */
ERROR_FGKC_FAILURE = 13,
/** ERROR_GRIPPER_CAL_TIMEOUT - Timeout during gripper calibration. */
ERROR_GRIPPER_CAL_TIMEOUT = 14,
UNRECOGNIZED = -1,
}
export function spotCheckFeedbackResponse_ErrorFromJSON(
object: any
): SpotCheckFeedbackResponse_Error {
switch (object) {
case 0:
case "ERROR_UNKNOWN":
return SpotCheckFeedbackResponse_Error.ERROR_UNKNOWN;
case 1:
case "ERROR_NONE":
return SpotCheckFeedbackResponse_Error.ERROR_NONE;
case 2:
case "ERROR_UNEXPECTED_POWER_CHANGE":
return SpotCheckFeedbackResponse_Error.ERROR_UNEXPECTED_POWER_CHANGE;
case 3:
case "ERROR_INIT_IMU_CHECK":
return SpotCheckFeedbackResponse_Error.ERROR_INIT_IMU_CHECK;
case 4:
case "ERROR_INIT_NOT_SITTING":
return SpotCheckFeedbackResponse_Error.ERROR_INIT_NOT_SITTING;
case 5:
case "ERROR_LOADCELL_TIMEOUT":
return SpotCheckFeedbackResponse_Error.ERROR_LOADCELL_TIMEOUT;
case 6:
case "ERROR_POWER_ON_FAILURE":
return SpotCheckFeedbackResponse_Error.ERROR_POWER_ON_FAILURE;
case 7:
case "ERROR_ENDSTOP_TIMEOUT":
return SpotCheckFeedbackResponse_Error.ERROR_ENDSTOP_TIMEOUT;
case 8:
case "ERROR_FAILED_STAND":
return SpotCheckFeedbackResponse_Error.ERROR_FAILED_STAND;
case 9:
case "ERROR_CAMERA_TIMEOUT":
return SpotCheckFeedbackResponse_Error.ERROR_CAMERA_TIMEOUT;
case 10:
case "ERROR_GROUND_CHECK":
return SpotCheckFeedbackResponse_Error.ERROR_GROUND_CHECK;
case 11:
case "ERROR_POWER_OFF_FAILURE":
return SpotCheckFeedbackResponse_Error.ERROR_POWER_OFF_FAILURE;
case 12:
case "ERROR_REVERT_FAILURE":
return SpotCheckFeedbackResponse_Error.ERROR_REVERT_FAILURE;
case 13:
case "ERROR_FGKC_FAILURE":
return SpotCheckFeedbackResponse_Error.ERROR_FGKC_FAILURE;
case 14:
case "ERROR_GRIPPER_CAL_TIMEOUT":
return SpotCheckFeedbackResponse_Error.ERROR_GRIPPER_CAL_TIMEOUT;
case -1:
case "UNRECOGNIZED":
default:
return SpotCheckFeedbackResponse_Error.UNRECOGNIZED;
}
}
export function spotCheckFeedbackResponse_ErrorToJSON(
object: SpotCheckFeedbackResponse_Error
): string {
switch (object) {
case SpotCheckFeedbackResponse_Error.ERROR_UNKNOWN:
return "ERROR_UNKNOWN";
case SpotCheckFeedbackResponse_Error.ERROR_NONE:
return "ERROR_NONE";
case SpotCheckFeedbackResponse_Error.ERROR_UNEXPECTED_POWER_CHANGE:
return "ERROR_UNEXPECTED_POWER_CHANGE";
case SpotCheckFeedbackResponse_Error.ERROR_INIT_IMU_CHECK:
return "ERROR_INIT_IMU_CHECK";
case SpotCheckFeedbackResponse_Error.ERROR_INIT_NOT_SITTING:
return "ERROR_INIT_NOT_SITTING";
case SpotCheckFeedbackResponse_Error.ERROR_LOADCELL_TIMEOUT:
return "ERROR_LOADCELL_TIMEOUT";
case SpotCheckFeedbackResponse_Error.ERROR_POWER_ON_FAILURE:
return "ERROR_POWER_ON_FAILURE";
case SpotCheckFeedbackResponse_Error.ERROR_ENDSTOP_TIMEOUT:
return "ERROR_ENDSTOP_TIMEOUT";
case SpotCheckFeedbackResponse_Error.ERROR_FAILED_STAND:
return "ERROR_FAILED_STAND";
case SpotCheckFeedbackResponse_Error.ERROR_CAMERA_TIMEOUT:
return "ERROR_CAMERA_TIMEOUT";
case SpotCheckFeedbackResponse_Error.ERROR_GROUND_CHECK:
return "ERROR_GROUND_CHECK";
case SpotCheckFeedbackResponse_Error.ERROR_POWER_OFF_FAILURE:
return "ERROR_POWER_OFF_FAILURE";
case SpotCheckFeedbackResponse_Error.ERROR_REVERT_FAILURE:
return "ERROR_REVERT_FAILURE";
case SpotCheckFeedbackResponse_Error.ERROR_FGKC_FAILURE:
return "ERROR_FGKC_FAILURE";
case SpotCheckFeedbackResponse_Error.ERROR_GRIPPER_CAL_TIMEOUT:
return "ERROR_GRIPPER_CAL_TIMEOUT";
case SpotCheckFeedbackResponse_Error.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface SpotCheckFeedbackResponse_CameraResultsEntry {
key: string;
value: DepthPlaneSpotCheckResult | undefined;
}
export interface SpotCheckFeedbackResponse_LoadCellResultsEntry {
key: string;
value: LoadCellSpotCheckResult | undefined;
}
export interface SpotCheckFeedbackResponse_KinematicCalResultsEntry {
key: string;
value: JointKinematicCheckResult | undefined;
}
export interface SpotCheckFeedbackResponse_FootHeightResultsEntry {
key: string;
value: FootHeightCheckResult | undefined;
}
export interface SpotCheckFeedbackResponse_LegPairResultsEntry {
key: string;
value: LegPairCheckResult | undefined;
}
export interface SpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry {
key: string;
value: HipRangeOfMotionResult | undefined;
}
/** Results from camera check. */
export interface DepthPlaneSpotCheckResult {
/** Return status for the request. */
status: DepthPlaneSpotCheckResult_Status;
/** Higher is worse. Above 100 means the camera is severely out of calibration. */
severityScore: number;
}
/** Errors reflect an issue with camera hardware. */
export enum DepthPlaneSpotCheckResult_Status {
/** STATUS_UNKNOWN - Unused enum. */
STATUS_UNKNOWN = 0,
/** STATUS_OK - No detected calibration error. */
STATUS_OK = 1,
/** STATUS_WARNING - Possible calibration error detected. */
STATUS_WARNING = 2,
/** STATUS_ERROR - Error with robot calibration. */
STATUS_ERROR = 3,
UNRECOGNIZED = -1,
}
export function depthPlaneSpotCheckResult_StatusFromJSON(
object: any
): DepthPlaneSpotCheckResult_Status {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return DepthPlaneSpotCheckResult_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return DepthPlaneSpotCheckResult_Status.STATUS_OK;
case 2:
case "STATUS_WARNING":
return DepthPlaneSpotCheckResult_Status.STATUS_WARNING;
case 3:
case "STATUS_ERROR":
return DepthPlaneSpotCheckResult_Status.STATUS_ERROR;
case -1:
case "UNRECOGNIZED":
default:
return DepthPlaneSpotCheckResult_Status.UNRECOGNIZED;
}
}
export function depthPlaneSpotCheckResult_StatusToJSON(
object: DepthPlaneSpotCheckResult_Status
): string {
switch (object) {
case DepthPlaneSpotCheckResult_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case DepthPlaneSpotCheckResult_Status.STATUS_OK:
return "STATUS_OK";
case DepthPlaneSpotCheckResult_Status.STATUS_WARNING:
return "STATUS_WARNING";
case DepthPlaneSpotCheckResult_Status.STATUS_ERROR:
return "STATUS_ERROR";
case DepthPlaneSpotCheckResult_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Results of payload check. */
export interface PayloadCheckResult {
/** A flag to indicate if configuration has an error. */
error: PayloadCheckResult_Error;
/**
* Indicates how much extra payload (in kg) we think the robot has
* Positive indicates robot has more payload than it is configured.
* Negative indicates robot has less payload than it is configured.
*/
extraPayload: number;
}
/** Errors reflect an issue with payload configuration. */
export enum PayloadCheckResult_Error {
/** ERROR_UNKNOWN - Unused enum. */
ERROR_UNKNOWN = 0,
/** ERROR_NONE - No error found in the payloads. */
ERROR_NONE = 1,
/** ERROR_MASS_DISCREPANCY - There is a mass discrepancy between the registered payload and what is estimated. */
ERROR_MASS_DISCREPANCY = 2,
UNRECOGNIZED = -1,
}
export function payloadCheckResult_ErrorFromJSON(
object: any
): PayloadCheckResult_Error {
switch (object) {
case 0:
case "ERROR_UNKNOWN":
return PayloadCheckResult_Error.ERROR_UNKNOWN;
case 1:
case "ERROR_NONE":
return PayloadCheckResult_Error.ERROR_NONE;
case 2:
case "ERROR_MASS_DISCREPANCY":
return PayloadCheckResult_Error.ERROR_MASS_DISCREPANCY;
case -1:
case "UNRECOGNIZED":
default:
return PayloadCheckResult_Error.UNRECOGNIZED;
}
}
export function payloadCheckResult_ErrorToJSON(
object: PayloadCheckResult_Error
): string {
switch (object) {
case PayloadCheckResult_Error.ERROR_UNKNOWN:
return "ERROR_UNKNOWN";
case PayloadCheckResult_Error.ERROR_NONE:
return "ERROR_NONE";
case PayloadCheckResult_Error.ERROR_MASS_DISCREPANCY:
return "ERROR_MASS_DISCREPANCY";
case PayloadCheckResult_Error.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Results from load cell check. */
export interface LoadCellSpotCheckResult {
/** A flag to indicate if results has an error. */
error: LoadCellSpotCheckResult_Error;
/** The current loadcell zero as fraction of full range [0-1] */
zero: number;
/** The previous loadcell zero as fraction of full range [0-1] */
oldZero: number;
}
/** Errors reflect an issue with robot hardware. */
export enum LoadCellSpotCheckResult_Error {
/** ERROR_UNKNOWN - Unused enum. */
ERROR_UNKNOWN = 0,
/** ERROR_NONE - No hardware error detected. */
ERROR_NONE = 1,
/** ERROR_ZERO_OUT_OF_RANGE - Load cell calibration failure. */
ERROR_ZERO_OUT_OF_RANGE = 2,
UNRECOGNIZED = -1,
}
export function loadCellSpotCheckResult_ErrorFromJSON(
object: any
): LoadCellSpotCheckResult_Error {
switch (object) {
case 0:
case "ERROR_UNKNOWN":
return LoadCellSpotCheckResult_Error.ERROR_UNKNOWN;
case 1:
case "ERROR_NONE":
return LoadCellSpotCheckResult_Error.ERROR_NONE;
case 2:
case "ERROR_ZERO_OUT_OF_RANGE":
return LoadCellSpotCheckResult_Error.ERROR_ZERO_OUT_OF_RANGE;
case -1:
case "UNRECOGNIZED":
default:
return LoadCellSpotCheckResult_Error.UNRECOGNIZED;
}
}
export function loadCellSpotCheckResult_ErrorToJSON(
object: LoadCellSpotCheckResult_Error
): string {
switch (object) {
case LoadCellSpotCheckResult_Error.ERROR_UNKNOWN:
return "ERROR_UNKNOWN";
case LoadCellSpotCheckResult_Error.ERROR_NONE:
return "ERROR_NONE";
case LoadCellSpotCheckResult_Error.ERROR_ZERO_OUT_OF_RANGE:
return "ERROR_ZERO_OUT_OF_RANGE";
case LoadCellSpotCheckResult_Error.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Kinematic calibration results */
export interface JointKinematicCheckResult {
/** A flag to indicate if results has an error. */
error: JointKinematicCheckResult_Error;
/** The current offset [rad] */
offset: number;
/** The previous offset [rad] */
oldOffset: number;
/**
* Joint calibration health score. range [0-1]
* 0 indicates an unhealthy kinematic joint calibration
* 1 indicates a perfect kinematic joint calibration
* Typically, values greater than 0.8 should be expected.
*/
healthScore: number;
}
/** Errors reflect an issue with robot hardware. */
export enum JointKinematicCheckResult_Error {
/** ERROR_UNKNOWN - Unused enum. */
ERROR_UNKNOWN = 0,
/** ERROR_NONE - No hardware error detected. */
ERROR_NONE = 1,
/** ERROR_CLUTCH_SLIP - Error detected in clutch performance. */
ERROR_CLUTCH_SLIP = 2,
/** ERROR_INVALID_RANGE_OF_MOTION - Error if a joint has an incorrect range of motion. */
ERROR_INVALID_RANGE_OF_MOTION = 3,
UNRECOGNIZED = -1,
}
export function jointKinematicCheckResult_ErrorFromJSON(
object: any
): JointKinematicCheckResult_Error {
switch (object) {
case 0:
case "ERROR_UNKNOWN":
return JointKinematicCheckResult_Error.ERROR_UNKNOWN;
case 1:
case "ERROR_NONE":
return JointKinematicCheckResult_Error.ERROR_NONE;
case 2:
case "ERROR_CLUTCH_SLIP":
return JointKinematicCheckResult_Error.ERROR_CLUTCH_SLIP;
case 3:
case "ERROR_INVALID_RANGE_OF_MOTION":
return JointKinematicCheckResult_Error.ERROR_INVALID_RANGE_OF_MOTION;
case -1:
case "UNRECOGNIZED":
default:
return JointKinematicCheckResult_Error.UNRECOGNIZED;
}
}
export function jointKinematicCheckResult_ErrorToJSON(
object: JointKinematicCheckResult_Error
): string {
switch (object) {
case JointKinematicCheckResult_Error.ERROR_UNKNOWN:
return "ERROR_UNKNOWN";
case JointKinematicCheckResult_Error.ERROR_NONE:
return "ERROR_NONE";
case JointKinematicCheckResult_Error.ERROR_CLUTCH_SLIP:
return "ERROR_CLUTCH_SLIP";
case JointKinematicCheckResult_Error.ERROR_INVALID_RANGE_OF_MOTION:
return "ERROR_INVALID_RANGE_OF_MOTION";
case JointKinematicCheckResult_Error.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Results from foot height checks. */
export interface FootHeightCheckResult {
/** Return status for the request. */
status: FootHeightCheckResult_Status;
/** The difference between foot height and mean feet height (m). */
footHeightErrorFromMean: number;
}
/** Errors reflect an issue with robot calibration. */
export enum FootHeightCheckResult_Status {
/** STATUS_UNKNOWN - Unused enum. */
STATUS_UNKNOWN = 0,
/** STATUS_OK - No detected calibration error. */
STATUS_OK = 1,
/** STATUS_WARNING - Possible calibration error detected. */
STATUS_WARNING = 2,
/** STATUS_ERROR - Error with robot calibration. */
STATUS_ERROR = 3,
UNRECOGNIZED = -1,
}
export function footHeightCheckResult_StatusFromJSON(
object: any
): FootHeightCheckResult_Status {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return FootHeightCheckResult_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return FootHeightCheckResult_Status.STATUS_OK;
case 2:
case "STATUS_WARNING":
return FootHeightCheckResult_Status.STATUS_WARNING;
case 3:
case "STATUS_ERROR":
return FootHeightCheckResult_Status.STATUS_ERROR;
case -1:
case "UNRECOGNIZED":
default:
return FootHeightCheckResult_Status.UNRECOGNIZED;
}
}
export function footHeightCheckResult_StatusToJSON(
object: FootHeightCheckResult_Status
): string {
switch (object) {
case FootHeightCheckResult_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case FootHeightCheckResult_Status.STATUS_OK:
return "STATUS_OK";
case FootHeightCheckResult_Status.STATUS_WARNING:
return "STATUS_WARNING";
case FootHeightCheckResult_Status.STATUS_ERROR:
return "STATUS_ERROR";
case FootHeightCheckResult_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Results from leg pair checks.. */
export interface LegPairCheckResult {
/** Return status for the request. */
status: LegPairCheckResult_Status;
/** The change in estimated distance between two feet from tall to short stand (m) */
legPairDistanceChange: number;
}
export enum LegPairCheckResult_Status {
/** STATUS_UNKNOWN - Unused enum. */
STATUS_UNKNOWN = 0,
/** STATUS_OK - No detected calibration error. */
STATUS_OK = 1,
/** STATUS_WARNING - Possible calibration error detected. */
STATUS_WARNING = 2,
/** STATUS_ERROR - Error with robot calibration. */
STATUS_ERROR = 3,
UNRECOGNIZED = -1,
}
export function legPairCheckResult_StatusFromJSON(
object: any
): LegPairCheckResult_Status {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return LegPairCheckResult_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return LegPairCheckResult_Status.STATUS_OK;
case 2:
case "STATUS_WARNING":
return LegPairCheckResult_Status.STATUS_WARNING;
case 3:
case "STATUS_ERROR":
return LegPairCheckResult_Status.STATUS_ERROR;
case -1:
case "UNRECOGNIZED":
default:
return LegPairCheckResult_Status.UNRECOGNIZED;
}
}
export function legPairCheckResult_StatusToJSON(
object: LegPairCheckResult_Status
): string {
switch (object) {
case LegPairCheckResult_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case LegPairCheckResult_Status.STATUS_OK:
return "STATUS_OK";
case LegPairCheckResult_Status.STATUS_WARNING:
return "STATUS_WARNING";
case LegPairCheckResult_Status.STATUS_ERROR:
return "STATUS_ERROR";
case LegPairCheckResult_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface HipRangeOfMotionResult {
error: HipRangeOfMotionResult_Error;
/** The measured angles (radians) of the HX and HY joints where the obstruction was detected */
hx: number[];
hy: number[];
}
/** Errors reflect an issue with hip range of motion */
export enum HipRangeOfMotionResult_Error {
ERROR_UNKNOWN = 0,
ERROR_NONE = 1,
ERROR_OBSTRUCTED = 2,
UNRECOGNIZED = -1,
}
export function hipRangeOfMotionResult_ErrorFromJSON(
object: any
): HipRangeOfMotionResult_Error {
switch (object) {
case 0:
case "ERROR_UNKNOWN":
return HipRangeOfMotionResult_Error.ERROR_UNKNOWN;
case 1:
case "ERROR_NONE":
return HipRangeOfMotionResult_Error.ERROR_NONE;
case 2:
case "ERROR_OBSTRUCTED":
return HipRangeOfMotionResult_Error.ERROR_OBSTRUCTED;
case -1:
case "UNRECOGNIZED":
default:
return HipRangeOfMotionResult_Error.UNRECOGNIZED;
}
}
export function hipRangeOfMotionResult_ErrorToJSON(
object: HipRangeOfMotionResult_Error
): string {
switch (object) {
case HipRangeOfMotionResult_Error.ERROR_UNKNOWN:
return "ERROR_UNKNOWN";
case HipRangeOfMotionResult_Error.ERROR_NONE:
return "ERROR_NONE";
case HipRangeOfMotionResult_Error.ERROR_OBSTRUCTED:
return "ERROR_OBSTRUCTED";
case HipRangeOfMotionResult_Error.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Request for the CameraCalibrationCommand service. */
export interface CameraCalibrationCommandRequest {
/** Common request header. */
header: RequestHeader | undefined;
/** The Lease to show ownership of the robot. Lease is required for all cal commands. */
lease: Lease | undefined;
/** Command to start/stop the calibration. */
command: CameraCalibrationCommandRequest_Command;
}
export enum CameraCalibrationCommandRequest_Command {
/** COMMAND_UNKNOWN - Unused enum. */
COMMAND_UNKNOWN = 0,
/** COMMAND_START - Start calibration routine. */
COMMAND_START = 1,
/** COMMAND_CANCEL - Cancel calibration routine. */
COMMAND_CANCEL = 2,
UNRECOGNIZED = -1,
}
export function cameraCalibrationCommandRequest_CommandFromJSON(
object: any
): CameraCalibrationCommandRequest_Command {
switch (object) {
case 0:
case "COMMAND_UNKNOWN":
return CameraCalibrationCommandRequest_Command.COMMAND_UNKNOWN;
case 1:
case "COMMAND_START":
return CameraCalibrationCommandRequest_Command.COMMAND_START;
case 2:
case "COMMAND_CANCEL":
return CameraCalibrationCommandRequest_Command.COMMAND_CANCEL;
case -1:
case "UNRECOGNIZED":
default:
return CameraCalibrationCommandRequest_Command.UNRECOGNIZED;
}
}
export function cameraCalibrationCommandRequest_CommandToJSON(
object: CameraCalibrationCommandRequest_Command
): string {
switch (object) {
case CameraCalibrationCommandRequest_Command.COMMAND_UNKNOWN:
return "COMMAND_UNKNOWN";
case CameraCalibrationCommandRequest_Command.COMMAND_START:
return "COMMAND_START";
case CameraCalibrationCommandRequest_Command.COMMAND_CANCEL:
return "COMMAND_CANCEL";
case CameraCalibrationCommandRequest_Command.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Response for the CameraCalibrationCommand service. */
export interface CameraCalibrationCommandResponse {
/** Common response header. */
header: ResponseHeader | undefined;
/** Details about how the lease was used. */
leaseUseResult: LeaseUseResult | undefined;
}
/** Request for the CameraCalibrationFeedback service. */
export interface CameraCalibrationFeedbackRequest {
/** Common request header. */
header: RequestHeader | undefined;
}
/** Response for the CameraCalibrationFeedback service. */
export interface CameraCalibrationFeedbackResponse {
/** Common response header. */
header: ResponseHeader | undefined;
/** Status of camera calibration procedure. */
status: CameraCalibrationFeedbackResponse_Status;
/**
* The approximate progress of the calibration routine, range [0-1].
* Status takes precedence over progress value.
*/
progress: number;
}
export enum CameraCalibrationFeedbackResponse_Status {
/** STATUS_UNKNOWN - Unused enum. */
STATUS_UNKNOWN = 0,
/** STATUS_PROCESSING - The robot is actively running calibration routine. */
STATUS_PROCESSING = 1,
/**
* STATUS_SUCCESS - The robot successfully ran calibration routine and
* is ready to use again.
*/
STATUS_SUCCESS = 2,
/** STATUS_USER_CANCELED - API client canceled calibration. */
STATUS_USER_CANCELED = 3,
/** STATUS_POWER_ERROR - The robot is not powered on. */
STATUS_POWER_ERROR = 4,
/** STATUS_LEASE_ERROR - Ownership error during calibration. */
STATUS_LEASE_ERROR = 5,
/**
* STATUS_ROBOT_COMMAND_ERROR - Robot encountered an error while trying to move
* around the calibration target. Robot possibly
* encountered a fault. Check robot state for more
* details
*/
STATUS_ROBOT_COMMAND_ERROR = 7,
/**
* STATUS_CALIBRATION_ERROR - Calibration procedure produced an invalid result.
* This may occur in poor lighting conditions or if
* calibration target moved during calibration
* procedure.
*/
STATUS_CALIBRATION_ERROR = 8,
/** STATUS_INTERNAL_ERROR - Something extraordinary happened. Try power cycling robot or contact BD. */
STATUS_INTERNAL_ERROR = 9,
/** STATUS_CAMERA_FOCUS_ERROR - Camera focus issue detected. This is a hardware issue. */
STATUS_CAMERA_FOCUS_ERROR = 14,
/** STATUS_TARGET_NOT_CENTERED - Target partially, but not fully, in view when starting calibration. */
STATUS_TARGET_NOT_CENTERED = 6,
/** STATUS_TARGET_NOT_IN_VIEW - Target not visible when starting calibration. */
STATUS_TARGET_NOT_IN_VIEW = 11,
/** STATUS_TARGET_NOT_GRAVITY_ALIGNED - Target not aligned with gravity when starting calibration. */
STATUS_TARGET_NOT_GRAVITY_ALIGNED = 12,
/** STATUS_TARGET_UPSIDE_DOWN - Target upside down when starting calibration. */
STATUS_TARGET_UPSIDE_DOWN = 13,
/** STATUS_NEVER_RUN - Calibration routine has never been run. No feedback to give. */
STATUS_NEVER_RUN = 10,
/** STATUS_CAMERA_NOT_DETECTED - One of the cameras is not detected on the USB bus. */
STATUS_CAMERA_NOT_DETECTED = 15,
/** STATUS_INTRINSIC_WRITE_FAILED - Failed to write intrinsic calibration. */
STATUS_INTRINSIC_WRITE_FAILED = 16,
/** STATUS_EXTRINSIC_WRITE_FAILED - Failed to write extrinsic calibration. */
STATUS_EXTRINSIC_WRITE_FAILED = 17,
UNRECOGNIZED = -1,
}
export function cameraCalibrationFeedbackResponse_StatusFromJSON(
object: any
): CameraCalibrationFeedbackResponse_Status {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return CameraCalibrationFeedbackResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_PROCESSING":
return CameraCalibrationFeedbackResponse_Status.STATUS_PROCESSING;
case 2:
case "STATUS_SUCCESS":
return CameraCalibrationFeedbackResponse_Status.STATUS_SUCCESS;
case 3:
case "STATUS_USER_CANCELED":
return CameraCalibrationFeedbackResponse_Status.STATUS_USER_CANCELED;
case 4:
case "STATUS_POWER_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_POWER_ERROR;
case 5:
case "STATUS_LEASE_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_LEASE_ERROR;
case 7:
case "STATUS_ROBOT_COMMAND_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_ROBOT_COMMAND_ERROR;
case 8:
case "STATUS_CALIBRATION_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_CALIBRATION_ERROR;
case 9:
case "STATUS_INTERNAL_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_INTERNAL_ERROR;
case 14:
case "STATUS_CAMERA_FOCUS_ERROR":
return CameraCalibrationFeedbackResponse_Status.STATUS_CAMERA_FOCUS_ERROR;
case 6:
case "STATUS_TARGET_NOT_CENTERED":
return CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_CENTERED;
case 11:
case "STATUS_TARGET_NOT_IN_VIEW":
return CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_IN_VIEW;
case 12:
case "STATUS_TARGET_NOT_GRAVITY_ALIGNED":
return CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_GRAVITY_ALIGNED;
case 13:
case "STATUS_TARGET_UPSIDE_DOWN":
return CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_UPSIDE_DOWN;
case 10:
case "STATUS_NEVER_RUN":
return CameraCalibrationFeedbackResponse_Status.STATUS_NEVER_RUN;
case 15:
case "STATUS_CAMERA_NOT_DETECTED":
return CameraCalibrationFeedbackResponse_Status.STATUS_CAMERA_NOT_DETECTED;
case 16:
case "STATUS_INTRINSIC_WRITE_FAILED":
return CameraCalibrationFeedbackResponse_Status.STATUS_INTRINSIC_WRITE_FAILED;
case 17:
case "STATUS_EXTRINSIC_WRITE_FAILED":
return CameraCalibrationFeedbackResponse_Status.STATUS_EXTRINSIC_WRITE_FAILED;
case -1:
case "UNRECOGNIZED":
default:
return CameraCalibrationFeedbackResponse_Status.UNRECOGNIZED;
}
}
export function cameraCalibrationFeedbackResponse_StatusToJSON(
object: CameraCalibrationFeedbackResponse_Status
): string {
switch (object) {
case CameraCalibrationFeedbackResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case CameraCalibrationFeedbackResponse_Status.STATUS_PROCESSING:
return "STATUS_PROCESSING";
case CameraCalibrationFeedbackResponse_Status.STATUS_SUCCESS:
return "STATUS_SUCCESS";
case CameraCalibrationFeedbackResponse_Status.STATUS_USER_CANCELED:
return "STATUS_USER_CANCELED";
case CameraCalibrationFeedbackResponse_Status.STATUS_POWER_ERROR:
return "STATUS_POWER_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_LEASE_ERROR:
return "STATUS_LEASE_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_ROBOT_COMMAND_ERROR:
return "STATUS_ROBOT_COMMAND_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_CALIBRATION_ERROR:
return "STATUS_CALIBRATION_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_INTERNAL_ERROR:
return "STATUS_INTERNAL_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_CAMERA_FOCUS_ERROR:
return "STATUS_CAMERA_FOCUS_ERROR";
case CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_CENTERED:
return "STATUS_TARGET_NOT_CENTERED";
case CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_IN_VIEW:
return "STATUS_TARGET_NOT_IN_VIEW";
case CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_NOT_GRAVITY_ALIGNED:
return "STATUS_TARGET_NOT_GRAVITY_ALIGNED";
case CameraCalibrationFeedbackResponse_Status.STATUS_TARGET_UPSIDE_DOWN:
return "STATUS_TARGET_UPSIDE_DOWN";
case CameraCalibrationFeedbackResponse_Status.STATUS_NEVER_RUN:
return "STATUS_NEVER_RUN";
case CameraCalibrationFeedbackResponse_Status.STATUS_CAMERA_NOT_DETECTED:
return "STATUS_CAMERA_NOT_DETECTED";
case CameraCalibrationFeedbackResponse_Status.STATUS_INTRINSIC_WRITE_FAILED:
return "STATUS_INTRINSIC_WRITE_FAILED";
case CameraCalibrationFeedbackResponse_Status.STATUS_EXTRINSIC_WRITE_FAILED:
return "STATUS_EXTRINSIC_WRITE_FAILED";
case CameraCalibrationFeedbackResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
function createBaseSpotCheckCommandRequest(): SpotCheckCommandRequest {
return { header: undefined, lease: undefined, command: 0 };
}
export const SpotCheckCommandRequest = {
encode(
message: SpotCheckCommandRequest,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.header !== undefined) {
RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.lease !== undefined) {
Lease.encode(message.lease, writer.uint32(18).fork()).ldelim();
}
if (message.command !== 0) {
writer.uint32(24).int32(message.command);
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number
): SpotCheckCommandRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSpotCheckCommandRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = RequestHeader.decode(reader, reader.uint32());
break;
case 2:
message.lease = Lease.decode(reader, reader.uint32());
break;
case 3:
message.command = reader.int32() as any;
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): SpotCheckCommandRequest {
return {
header: isSet(object.header)
? RequestHeader.fromJSON(object.header)
: undefined,
lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined,
command: isSet(object.command)
? spotCheckCommandRequest_CommandFromJSON(object.command)
: 0,
};
},
toJSON(message: SpotCheckCommandRequest): unknown {
const obj: any = {};
message.header !== undefined &&
(obj.header = message.header
? RequestHeader.toJSON(message.header)
: undefined);
message.lease !== undefined &&
(obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined);
message.command !== undefined &&
(obj.command = spotCheckCommandRequest_CommandToJSON(message.command));
return obj;
},
fromPartial<I extends Exact<DeepPartial<SpotCheckCommandRequest>, I>>(
object: I
): SpotCheckCommandRequest {
const message = createBaseSpotCheckCommandRequest();
message.header =
object.header !== undefined && object.header !== null
? RequestHeader.fromPartial(object.header)
: undefined;
message.lease =
object.lease !== undefined && object.lease !== null
? Lease.fromPartial(object.lease)
: undefined;
message.command = object.command ?? 0;
return message;
},
};
function createBaseSpotCheckCommandResponse(): SpotCheckCommandResponse {
return {
header: undefined,
leaseUseResult: undefined,
status: 0,
message: "",
};
}
export const SpotCheckCommandResponse = {
encode(
message: SpotCheckCommandResponse,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.header !== undefined) {
ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.leaseUseResult !== undefined) {
LeaseUseResult.encode(
message.leaseUseResult,
writer.uint32(18).fork()
).ldelim();
}
if (message.status !== 0) {
writer.uint32(24).int32(message.status);
}
if (message.message !== "") {
writer.uint32(34).string(message.message);
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number
): SpotCheckCommandResponse {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSpotCheckCommandResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = ResponseHeader.decode(reader, reader.uint32());
break;
case 2:
message.leaseUseResult = LeaseUseResult.decode(
reader,
reader.uint32()
);
break;
case 3:
message.status = reader.int32() as any;
break;
case 4:
message.message = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): SpotCheckCommandResponse {
return {
header: isSet(object.header)
? ResponseHeader.fromJSON(object.header)
: undefined,
leaseUseResult: isSet(object.leaseUseResult)
? LeaseUseResult.fromJSON(object.leaseUseResult)
: undefined,
status: isSet(object.status)
? spotCheckCommandResponse_StatusFromJSON(object.status)
: 0,
message: isSet(object.message) ? String(object.message) : "",
};
},
toJSON(message: SpotCheckCommandResponse): unknown {
const obj: any = {};
message.header !== undefined &&
(obj.header = message.header
? ResponseHeader.toJSON(message.header)
: undefined);
message.leaseUseResult !== undefined &&
(obj.leaseUseResult = message.leaseUseResult
? LeaseUseResult.toJSON(message.leaseUseResult)
: undefined);
message.status !== undefined &&
(obj.status = spotCheckCommandResponse_StatusToJSON(message.status));
message.message !== undefined && (obj.message = message.message);
return obj;
},
fromPartial<I extends Exact<DeepPartial<SpotCheckCommandResponse>, I>>(
object: I
): SpotCheckCommandResponse {
const message = createBaseSpotCheckCommandResponse();
message.header =
object.header !== undefined && object.header !== null
? ResponseHeader.fromPartial(object.header)
: undefined;
message.leaseUseResult =
object.leaseUseResult !== undefined && object.leaseUseResult !== null
? LeaseUseResult.fromPartial(object.leaseUseResult)
: undefined;
message.status = object.status ?? 0;
message.message = object.message ?? "";
return message;
},
};
function createBaseSpotCheckFeedbackRequest(): SpotCheckFeedbackRequest {
return { header: undefined };
}
export const SpotCheckFeedbackRequest = {
encode(
message: SpotCheckFeedbackRequest,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.header !== undefined) {
RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number
): SpotCheckFeedbackRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSpotCheckFeedbackRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = RequestHeader.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): SpotCheckFeedbackRequest {
return {
header: isSet(object.header)
? RequestHeader.fromJSON(object.header)
: undefined,
};
},
toJSON(message: SpotCheckFeedbackRequest): unknown {
const obj: any = {};
message.header !== undefined &&
(obj.header = message.header
? RequestHeader.toJSON(message.header)
: undefined);
return obj;
},
fromPartial<I extends Exact<DeepPartial<SpotCheckFeedbackRequest>, I>>(
object: I
): SpotCheckFeedbackRequest {
const message = createBaseSpotCheckFeedbackRequest();
message.header =
object.header !== undefined && object.header !== null
? RequestHeader.fromPartial(object.header)
: undefined;
return message;
},
};
function createBaseSpotCheckFeedbackResponse(): SpotCheckFeedbackResponse {
return {
header: undefined,
state: 0,
lastCommand: 0,
error: 0,
cameraResults: {},
loadCellResults: {},
kinematicCalResults: {},
payloadResult: undefined,
footHeightResults: {},
legPairResults: {},
hipRangeOfMotionResults: {},
progress: 0,
lastCalTimestamp: undefined,
};
}
export const SpotCheckFeedbackResponse = {
encode(
message: SpotCheckFeedbackResponse,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.header !== undefined) {
ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.state !== 0) {
writer.uint32(16).int32(message.state);
}
if (message.lastCommand !== 0) {
writer.uint32(96).int32(message.lastCommand);
}
if (message.error !== 0) {
writer.uint32(48).int32(message.error);
}
Object.entries(message.cameraResults).forEach(([key, value]) => {
SpotCheckFeedbackResponse_CameraResultsEntry.encode(
{ key: key as any, value },
writer.uint32(26).fork()
).ldelim();
});
Object.entries(message.loadCellResults).forEach(([key, value]) => {
SpotCheckFeedbackResponse_LoadCellResultsEntry.encode(
{ key: key as any, value },
writer.uint32(34).fork()
).ldelim();
});
Object.entries(message.kinematicCalResults).forEach(([key, value]) => {
SpotCheckFeedbackResponse_KinematicCalResultsEntry.encode(
{ key: key as any, value },
writer.uint32(42).fork()
).ldelim();
});
if (message.payloadResult !== undefined) {
PayloadCheckResult.encode(
message.payloadResult,
writer.uint32(66).fork()
).ldelim();
}
Object.entries(message.footHeightResults).forEach(([key, value]) => {
SpotCheckFeedbackResponse_FootHeightResultsEntry.encode(
{ key: key as any, value },
writer.uint32(82).fork()
).ldelim();
});
Object.entries(message.legPairResults).forEach(([key, value]) => {
SpotCheckFeedbackResponse_LegPairResultsEntry.encode(
{ key: key as any, value },
writer.uint32(90).fork()