UNPKG

spot-sdk-ts

Version:

TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics

2,521 lines 114 kB
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry = exports.SpotCheckFeedbackResponse_LegPairResultsEntry = exports.SpotCheckFeedbackResponse_FootHeightResultsEntry = exports.SpotCheckFeedbackResponse_KinematicCalResultsEntry = exports.SpotCheckFeedbackResponse_LoadCellResultsEntry = exports.SpotCheckFeedbackResponse_CameraResultsEntry = exports.SpotCheckFeedbackResponse = exports.SpotCheckFeedbackRequest = exports.SpotCheckCommandResponse = exports.SpotCheckCommandRequest = exports.cameraCalibrationFeedbackResponse_StatusToJSON = exports.cameraCalibrationFeedbackResponse_StatusFromJSON = exports.CameraCalibrationFeedbackResponse_Status = exports.cameraCalibrationCommandRequest_CommandToJSON = exports.cameraCalibrationCommandRequest_CommandFromJSON = exports.CameraCalibrationCommandRequest_Command = exports.hipRangeOfMotionResult_ErrorToJSON = exports.hipRangeOfMotionResult_ErrorFromJSON = exports.HipRangeOfMotionResult_Error = exports.legPairCheckResult_StatusToJSON = exports.legPairCheckResult_StatusFromJSON = exports.LegPairCheckResult_Status = exports.footHeightCheckResult_StatusToJSON = exports.footHeightCheckResult_StatusFromJSON = exports.FootHeightCheckResult_Status = exports.jointKinematicCheckResult_ErrorToJSON = exports.jointKinematicCheckResult_ErrorFromJSON = exports.JointKinematicCheckResult_Error = exports.loadCellSpotCheckResult_ErrorToJSON = exports.loadCellSpotCheckResult_ErrorFromJSON = exports.LoadCellSpotCheckResult_Error = exports.payloadCheckResult_ErrorToJSON = exports.payloadCheckResult_ErrorFromJSON = exports.PayloadCheckResult_Error = exports.depthPlaneSpotCheckResult_StatusToJSON = exports.depthPlaneSpotCheckResult_StatusFromJSON = exports.DepthPlaneSpotCheckResult_Status = exports.spotCheckFeedbackResponse_ErrorToJSON = exports.spotCheckFeedbackResponse_ErrorFromJSON = exports.SpotCheckFeedbackResponse_Error = exports.spotCheckFeedbackResponse_StateToJSON = exports.spotCheckFeedbackResponse_StateFromJSON = exports.SpotCheckFeedbackResponse_State = exports.spotCheckCommandResponse_StatusToJSON = exports.spotCheckCommandResponse_StatusFromJSON = exports.SpotCheckCommandResponse_Status = exports.spotCheckCommandRequest_CommandToJSON = exports.spotCheckCommandRequest_CommandFromJSON = exports.SpotCheckCommandRequest_Command = exports.protobufPackage = void 0;
exports.CameraCalibrationFeedbackResponse = exports.CameraCalibrationFeedbackRequest = exports.CameraCalibrationCommandResponse = exports.CameraCalibrationCommandRequest = exports.HipRangeOfMotionResult = exports.LegPairCheckResult = exports.FootHeightCheckResult = exports.JointKinematicCheckResult = exports.LoadCellSpotCheckResult = exports.PayloadCheckResult = exports.DepthPlaneSpotCheckResult = void 0;
/* eslint-disable */
const timestamp_1 = require("../../../google/protobuf/timestamp");
const header_1 = require("../header");
const lease_1 = require("../lease");
const minimal_1 = __importDefault(require("protobufjs/minimal"));
exports.protobufPackage = "bosdyn.api.spot";
var SpotCheckCommandRequest_Command;
(function (SpotCheckCommandRequest_Command) {
    /** COMMAND_UNKNOWN - Unused enum. */
    SpotCheckCommandRequest_Command[SpotCheckCommandRequest_Command["COMMAND_UNKNOWN"] = 0] = "COMMAND_UNKNOWN";
    /** COMMAND_START - Start spot check joint calibration and camera checks. */
    SpotCheckCommandRequest_Command[SpotCheckCommandRequest_Command["COMMAND_START"] = 1] = "COMMAND_START";
    /** COMMAND_ABORT - Abort spot check joint calibration and camera check. */
    SpotCheckCommandRequest_Command[SpotCheckCommandRequest_Command["COMMAND_ABORT"] = 2] = "COMMAND_ABORT";
    /** COMMAND_REVERT_CAL - Revert joint calibration back to the previous values. */
    SpotCheckCommandRequest_Command[SpotCheckCommandRequest_Command["COMMAND_REVERT_CAL"] = 3] = "COMMAND_REVERT_CAL";
    SpotCheckCommandRequest_Command[SpotCheckCommandRequest_Command["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(SpotCheckCommandRequest_Command = exports.SpotCheckCommandRequest_Command || (exports.SpotCheckCommandRequest_Command = {}));
function spotCheckCommandRequest_CommandFromJSON(object) {
    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;
    }
}
exports.spotCheckCommandRequest_CommandFromJSON = spotCheckCommandRequest_CommandFromJSON;
function spotCheckCommandRequest_CommandToJSON(object) {
    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";
    }
}
exports.spotCheckCommandRequest_CommandToJSON = spotCheckCommandRequest_CommandToJSON;
var SpotCheckCommandResponse_Status;
(function (SpotCheckCommandResponse_Status) {
    /** STATUS_UNKNOWN - Unknown */
    SpotCheckCommandResponse_Status[SpotCheckCommandResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
    /** STATUS_OK - Request was accepted. */
    SpotCheckCommandResponse_Status[SpotCheckCommandResponse_Status["STATUS_OK"] = 1] = "STATUS_OK";
    /** STATUS_ERROR - An error ocurred. */
    SpotCheckCommandResponse_Status[SpotCheckCommandResponse_Status["STATUS_ERROR"] = 2] = "STATUS_ERROR";
    SpotCheckCommandResponse_Status[SpotCheckCommandResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(SpotCheckCommandResponse_Status = exports.SpotCheckCommandResponse_Status || (exports.SpotCheckCommandResponse_Status = {}));
function spotCheckCommandResponse_StatusFromJSON(object) {
    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;
    }
}
exports.spotCheckCommandResponse_StatusFromJSON = spotCheckCommandResponse_StatusFromJSON;
function spotCheckCommandResponse_StatusToJSON(object) {
    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";
    }
}
exports.spotCheckCommandResponse_StatusToJSON = spotCheckCommandResponse_StatusToJSON;
var SpotCheckFeedbackResponse_State;
(function (SpotCheckFeedbackResponse_State) {
    /** STATE_UNKNOWN - Unused enum. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_UNKNOWN"] = 0] = "STATE_UNKNOWN";
    /** STATE_USER_ABORTED - SpotCheck is aborted by the user. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_USER_ABORTED"] = 1] = "STATE_USER_ABORTED";
    /** STATE_STARTING - SpotCheck is initializing. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_STARTING"] = 2] = "STATE_STARTING";
    /** STATE_LOADCELL_CAL - Load cell calibration underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_LOADCELL_CAL"] = 3] = "STATE_LOADCELL_CAL";
    /** STATE_ENDSTOP_CAL - Endstop calibration underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_ENDSTOP_CAL"] = 4] = "STATE_ENDSTOP_CAL";
    /** STATE_CAMERA_CHECK - Camera check underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_CAMERA_CHECK"] = 5] = "STATE_CAMERA_CHECK";
    /** STATE_BODY_POSING - Body pose routine underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_BODY_POSING"] = 6] = "STATE_BODY_POSING";
    /** STATE_FINISHED - Spot check successfully finished. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_FINISHED"] = 7] = "STATE_FINISHED";
    /** STATE_REVERTING_CAL - Reverting calibration to previous values. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_REVERTING_CAL"] = 8] = "STATE_REVERTING_CAL";
    /** STATE_ERROR - Error occurred while running spotcheck. Inspect error for more info. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_ERROR"] = 9] = "STATE_ERROR";
    /** STATE_WAITING_FOR_COMMAND - Waiting for user command. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_WAITING_FOR_COMMAND"] = 10] = "STATE_WAITING_FOR_COMMAND";
    /** STATE_HIP_RANGE_OF_MOTION_CHECK - Hip range of motion check underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_HIP_RANGE_OF_MOTION_CHECK"] = 11] = "STATE_HIP_RANGE_OF_MOTION_CHECK";
    /** STATE_GRIPPER_CAL - Gripper calibration underway. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_GRIPPER_CAL"] = 12] = "STATE_GRIPPER_CAL";
    /** STATE_SIT_DOWN_AFTER_RUN - Sitting down after run. */
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["STATE_SIT_DOWN_AFTER_RUN"] = 13] = "STATE_SIT_DOWN_AFTER_RUN";
    SpotCheckFeedbackResponse_State[SpotCheckFeedbackResponse_State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(SpotCheckFeedbackResponse_State = exports.SpotCheckFeedbackResponse_State || (exports.SpotCheckFeedbackResponse_State = {}));
function spotCheckFeedbackResponse_StateFromJSON(object) {
    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;
    }
}
exports.spotCheckFeedbackResponse_StateFromJSON = spotCheckFeedbackResponse_StateFromJSON;
function spotCheckFeedbackResponse_StateToJSON(object) {
    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";
    }
}
exports.spotCheckFeedbackResponse_StateToJSON = spotCheckFeedbackResponse_StateToJSON;
/**
 * If SpotCheck experienced an error, specific error details reported here.
 * This reflects an error in the routine.
 */
var SpotCheckFeedbackResponse_Error;
(function (SpotCheckFeedbackResponse_Error) {
    /** ERROR_UNKNOWN - Unused enum. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_UNKNOWN"] = 0] = "ERROR_UNKNOWN";
    /** ERROR_NONE - No error has occurred. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_NONE"] = 1] = "ERROR_NONE";
    /** ERROR_UNEXPECTED_POWER_CHANGE - Unexpected motor power state transition. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_UNEXPECTED_POWER_CHANGE"] = 2] = "ERROR_UNEXPECTED_POWER_CHANGE";
    /** ERROR_INIT_IMU_CHECK - Robot body is not flat on the ground. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_INIT_IMU_CHECK"] = 3] = "ERROR_INIT_IMU_CHECK";
    /** ERROR_INIT_NOT_SITTING - Robot body is not close to a sitting pose */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_INIT_NOT_SITTING"] = 4] = "ERROR_INIT_NOT_SITTING";
    /** ERROR_LOADCELL_TIMEOUT - Timeout during loadcell calibration. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_LOADCELL_TIMEOUT"] = 5] = "ERROR_LOADCELL_TIMEOUT";
    /** ERROR_POWER_ON_FAILURE - Error enabling motor power. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_POWER_ON_FAILURE"] = 6] = "ERROR_POWER_ON_FAILURE";
    /** ERROR_ENDSTOP_TIMEOUT - Timeout during endstop calibration. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_ENDSTOP_TIMEOUT"] = 7] = "ERROR_ENDSTOP_TIMEOUT";
    /** ERROR_FAILED_STAND - Robot failed to stand. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_FAILED_STAND"] = 8] = "ERROR_FAILED_STAND";
    /** ERROR_CAMERA_TIMEOUT - Timeout during camera check. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_CAMERA_TIMEOUT"] = 9] = "ERROR_CAMERA_TIMEOUT";
    /** ERROR_GROUND_CHECK - Flat ground check failed. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_GROUND_CHECK"] = 10] = "ERROR_GROUND_CHECK";
    /** ERROR_POWER_OFF_FAILURE - Robot failed to power off. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_POWER_OFF_FAILURE"] = 11] = "ERROR_POWER_OFF_FAILURE";
    /** ERROR_REVERT_FAILURE - Robot failed to revert calibration. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_REVERT_FAILURE"] = 12] = "ERROR_REVERT_FAILURE";
    /** ERROR_FGKC_FAILURE - Robot failed to do flat ground kinematic calibration. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_FGKC_FAILURE"] = 13] = "ERROR_FGKC_FAILURE";
    /** ERROR_GRIPPER_CAL_TIMEOUT - Timeout during gripper calibration. */
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["ERROR_GRIPPER_CAL_TIMEOUT"] = 14] = "ERROR_GRIPPER_CAL_TIMEOUT";
    SpotCheckFeedbackResponse_Error[SpotCheckFeedbackResponse_Error["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(SpotCheckFeedbackResponse_Error = exports.SpotCheckFeedbackResponse_Error || (exports.SpotCheckFeedbackResponse_Error = {}));
function spotCheckFeedbackResponse_ErrorFromJSON(object) {
    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;
    }
}
exports.spotCheckFeedbackResponse_ErrorFromJSON = spotCheckFeedbackResponse_ErrorFromJSON;
function spotCheckFeedbackResponse_ErrorToJSON(object) {
    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";
    }
}
exports.spotCheckFeedbackResponse_ErrorToJSON = spotCheckFeedbackResponse_ErrorToJSON;
/** Errors reflect an issue with camera hardware. */
var DepthPlaneSpotCheckResult_Status;
(function (DepthPlaneSpotCheckResult_Status) {
    /** STATUS_UNKNOWN - Unused enum. */
    DepthPlaneSpotCheckResult_Status[DepthPlaneSpotCheckResult_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
    /** STATUS_OK - No detected calibration error. */
    DepthPlaneSpotCheckResult_Status[DepthPlaneSpotCheckResult_Status["STATUS_OK"] = 1] = "STATUS_OK";
    /** STATUS_WARNING - Possible calibration error detected. */
    DepthPlaneSpotCheckResult_Status[DepthPlaneSpotCheckResult_Status["STATUS_WARNING"] = 2] = "STATUS_WARNING";
    /** STATUS_ERROR - Error with robot calibration. */
    DepthPlaneSpotCheckResult_Status[DepthPlaneSpotCheckResult_Status["STATUS_ERROR"] = 3] = "STATUS_ERROR";
    DepthPlaneSpotCheckResult_Status[DepthPlaneSpotCheckResult_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(DepthPlaneSpotCheckResult_Status = exports.DepthPlaneSpotCheckResult_Status || (exports.DepthPlaneSpotCheckResult_Status = {}));
function depthPlaneSpotCheckResult_StatusFromJSON(object) {
    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;
    }
}
exports.depthPlaneSpotCheckResult_StatusFromJSON = depthPlaneSpotCheckResult_StatusFromJSON;
function depthPlaneSpotCheckResult_StatusToJSON(object) {
    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";
    }
}
exports.depthPlaneSpotCheckResult_StatusToJSON = depthPlaneSpotCheckResult_StatusToJSON;
/** Errors reflect an issue with payload configuration. */
var PayloadCheckResult_Error;
(function (PayloadCheckResult_Error) {
    /** ERROR_UNKNOWN - Unused enum. */
    PayloadCheckResult_Error[PayloadCheckResult_Error["ERROR_UNKNOWN"] = 0] = "ERROR_UNKNOWN";
    /** ERROR_NONE - No error found in the payloads. */
    PayloadCheckResult_Error[PayloadCheckResult_Error["ERROR_NONE"] = 1] = "ERROR_NONE";
    /** ERROR_MASS_DISCREPANCY - There is a mass discrepancy between the registered payload and what is estimated. */
    PayloadCheckResult_Error[PayloadCheckResult_Error["ERROR_MASS_DISCREPANCY"] = 2] = "ERROR_MASS_DISCREPANCY";
    PayloadCheckResult_Error[PayloadCheckResult_Error["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(PayloadCheckResult_Error = exports.PayloadCheckResult_Error || (exports.PayloadCheckResult_Error = {}));
function payloadCheckResult_ErrorFromJSON(object) {
    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;
    }
}
exports.payloadCheckResult_ErrorFromJSON = payloadCheckResult_ErrorFromJSON;
function payloadCheckResult_ErrorToJSON(object) {
    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";
    }
}
exports.payloadCheckResult_ErrorToJSON = payloadCheckResult_ErrorToJSON;
/** Errors reflect an issue with robot hardware. */
var LoadCellSpotCheckResult_Error;
(function (LoadCellSpotCheckResult_Error) {
    /** ERROR_UNKNOWN - Unused enum. */
    LoadCellSpotCheckResult_Error[LoadCellSpotCheckResult_Error["ERROR_UNKNOWN"] = 0] = "ERROR_UNKNOWN";
    /** ERROR_NONE - No hardware error detected. */
    LoadCellSpotCheckResult_Error[LoadCellSpotCheckResult_Error["ERROR_NONE"] = 1] = "ERROR_NONE";
    /** ERROR_ZERO_OUT_OF_RANGE - Load cell calibration failure. */
    LoadCellSpotCheckResult_Error[LoadCellSpotCheckResult_Error["ERROR_ZERO_OUT_OF_RANGE"] = 2] = "ERROR_ZERO_OUT_OF_RANGE";
    LoadCellSpotCheckResult_Error[LoadCellSpotCheckResult_Error["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(LoadCellSpotCheckResult_Error = exports.LoadCellSpotCheckResult_Error || (exports.LoadCellSpotCheckResult_Error = {}));
function loadCellSpotCheckResult_ErrorFromJSON(object) {
    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;
    }
}
exports.loadCellSpotCheckResult_ErrorFromJSON = loadCellSpotCheckResult_ErrorFromJSON;
function loadCellSpotCheckResult_ErrorToJSON(object) {
    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";
    }
}
exports.loadCellSpotCheckResult_ErrorToJSON = loadCellSpotCheckResult_ErrorToJSON;
/** Errors reflect an issue with robot hardware. */
var JointKinematicCheckResult_Error;
(function (JointKinematicCheckResult_Error) {
    /** ERROR_UNKNOWN - Unused enum. */
    JointKinematicCheckResult_Error[JointKinematicCheckResult_Error["ERROR_UNKNOWN"] = 0] = "ERROR_UNKNOWN";
    /** ERROR_NONE - No hardware error detected. */
    JointKinematicCheckResult_Error[JointKinematicCheckResult_Error["ERROR_NONE"] = 1] = "ERROR_NONE";
    /** ERROR_CLUTCH_SLIP - Error detected in clutch performance. */
    JointKinematicCheckResult_Error[JointKinematicCheckResult_Error["ERROR_CLUTCH_SLIP"] = 2] = "ERROR_CLUTCH_SLIP";
    /** ERROR_INVALID_RANGE_OF_MOTION - Error if a joint has an incorrect range of motion. */
    JointKinematicCheckResult_Error[JointKinematicCheckResult_Error["ERROR_INVALID_RANGE_OF_MOTION"] = 3] = "ERROR_INVALID_RANGE_OF_MOTION";
    JointKinematicCheckResult_Error[JointKinematicCheckResult_Error["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(JointKinematicCheckResult_Error = exports.JointKinematicCheckResult_Error || (exports.JointKinematicCheckResult_Error = {}));
function jointKinematicCheckResult_ErrorFromJSON(object) {
    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;
    }
}
exports.jointKinematicCheckResult_ErrorFromJSON = jointKinematicCheckResult_ErrorFromJSON;
function jointKinematicCheckResult_ErrorToJSON(object) {
    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";
    }
}
exports.jointKinematicCheckResult_ErrorToJSON = jointKinematicCheckResult_ErrorToJSON;
/** Errors reflect an issue with robot calibration. */
var FootHeightCheckResult_Status;
(function (FootHeightCheckResult_Status) {
    /** STATUS_UNKNOWN - Unused enum. */
    FootHeightCheckResult_Status[FootHeightCheckResult_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
    /** STATUS_OK - No detected calibration error. */
    FootHeightCheckResult_Status[FootHeightCheckResult_Status["STATUS_OK"] = 1] = "STATUS_OK";
    /** STATUS_WARNING - Possible calibration error detected. */
    FootHeightCheckResult_Status[FootHeightCheckResult_Status["STATUS_WARNING"] = 2] = "STATUS_WARNING";
    /** STATUS_ERROR - Error with robot calibration. */
    FootHeightCheckResult_Status[FootHeightCheckResult_Status["STATUS_ERROR"] = 3] = "STATUS_ERROR";
    FootHeightCheckResult_Status[FootHeightCheckResult_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(FootHeightCheckResult_Status = exports.FootHeightCheckResult_Status || (exports.FootHeightCheckResult_Status = {}));
function footHeightCheckResult_StatusFromJSON(object) {
    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;
    }
}
exports.footHeightCheckResult_StatusFromJSON = footHeightCheckResult_StatusFromJSON;
function footHeightCheckResult_StatusToJSON(object) {
    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";
    }
}
exports.footHeightCheckResult_StatusToJSON = footHeightCheckResult_StatusToJSON;
var LegPairCheckResult_Status;
(function (LegPairCheckResult_Status) {
    /** STATUS_UNKNOWN - Unused enum. */
    LegPairCheckResult_Status[LegPairCheckResult_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
    /** STATUS_OK - No detected calibration error. */
    LegPairCheckResult_Status[LegPairCheckResult_Status["STATUS_OK"] = 1] = "STATUS_OK";
    /** STATUS_WARNING - Possible calibration error detected. */
    LegPairCheckResult_Status[LegPairCheckResult_Status["STATUS_WARNING"] = 2] = "STATUS_WARNING";
    /** STATUS_ERROR - Error with robot calibration. */
    LegPairCheckResult_Status[LegPairCheckResult_Status["STATUS_ERROR"] = 3] = "STATUS_ERROR";
    LegPairCheckResult_Status[LegPairCheckResult_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(LegPairCheckResult_Status = exports.LegPairCheckResult_Status || (exports.LegPairCheckResult_Status = {}));
function legPairCheckResult_StatusFromJSON(object) {
    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;
    }
}
exports.legPairCheckResult_StatusFromJSON = legPairCheckResult_StatusFromJSON;
function legPairCheckResult_StatusToJSON(object) {
    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";
    }
}
exports.legPairCheckResult_StatusToJSON = legPairCheckResult_StatusToJSON;
/** Errors reflect an issue with hip range of motion */
var HipRangeOfMotionResult_Error;
(function (HipRangeOfMotionResult_Error) {
    HipRangeOfMotionResult_Error[HipRangeOfMotionResult_Error["ERROR_UNKNOWN"] = 0] = "ERROR_UNKNOWN";
    HipRangeOfMotionResult_Error[HipRangeOfMotionResult_Error["ERROR_NONE"] = 1] = "ERROR_NONE";
    HipRangeOfMotionResult_Error[HipRangeOfMotionResult_Error["ERROR_OBSTRUCTED"] = 2] = "ERROR_OBSTRUCTED";
    HipRangeOfMotionResult_Error[HipRangeOfMotionResult_Error["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(HipRangeOfMotionResult_Error = exports.HipRangeOfMotionResult_Error || (exports.HipRangeOfMotionResult_Error = {}));
function hipRangeOfMotionResult_ErrorFromJSON(object) {
    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;
    }
}
exports.hipRangeOfMotionResult_ErrorFromJSON = hipRangeOfMotionResult_ErrorFromJSON;
function hipRangeOfMotionResult_ErrorToJSON(object) {
    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";
    }
}
exports.hipRangeOfMotionResult_ErrorToJSON = hipRangeOfMotionResult_ErrorToJSON;
var CameraCalibrationCommandRequest_Command;
(function (CameraCalibrationCommandRequest_Command) {
    /** COMMAND_UNKNOWN - Unused enum. */
    CameraCalibrationCommandRequest_Command[CameraCalibrationCommandRequest_Command["COMMAND_UNKNOWN"] = 0] = "COMMAND_UNKNOWN";
    /** COMMAND_START - Start calibration routine. */
    CameraCalibrationCommandRequest_Command[CameraCalibrationCommandRequest_Command["COMMAND_START"] = 1] = "COMMAND_START";
    /** COMMAND_CANCEL - Cancel calibration routine. */
    CameraCalibrationCommandRequest_Command[CameraCalibrationCommandRequest_Command["COMMAND_CANCEL"] = 2] = "COMMAND_CANCEL";
    CameraCalibrationCommandRequest_Command[CameraCalibrationCommandRequest_Command["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CameraCalibrationCommandRequest_Command = exports.CameraCalibrationCommandRequest_Command || (exports.CameraCalibrationCommandRequest_Command = {}));
function cameraCalibrationCommandRequest_CommandFromJSON(object) {
    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;
    }
}
exports.cameraCalibrationCommandRequest_CommandFromJSON = cameraCalibrationCommandRequest_CommandFromJSON;
function cameraCalibrationCommandRequest_CommandToJSON(object) {
    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";
    }
}
exports.cameraCalibrationCommandRequest_CommandToJSON = cameraCalibrationCommandRequest_CommandToJSON;
var CameraCalibrationFeedbackResponse_Status;
(function (CameraCalibrationFeedbackResponse_Status) {
    /** STATUS_UNKNOWN - Unused enum. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
    /** STATUS_PROCESSING - The robot is actively running calibration routine. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_PROCESSING"] = 1] = "STATUS_PROCESSING";
    /**
     * STATUS_SUCCESS - The robot successfully ran calibration routine and
     * is ready to use again.
     */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_SUCCESS"] = 2] = "STATUS_SUCCESS";
    /** STATUS_USER_CANCELED - API client canceled calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_USER_CANCELED"] = 3] = "STATUS_USER_CANCELED";
    /** STATUS_POWER_ERROR - The robot is not powered on. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_POWER_ERROR"] = 4] = "STATUS_POWER_ERROR";
    /** STATUS_LEASE_ERROR - Ownership error during calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_LEASE_ERROR"] = 5] = "STATUS_LEASE_ERROR";
    /**
     * 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
     */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_ROBOT_COMMAND_ERROR"] = 7] = "STATUS_ROBOT_COMMAND_ERROR";
    /**
     * STATUS_CALIBRATION_ERROR - Calibration procedure produced an invalid result.
     * This may occur in poor lighting conditions or if
     * calibration target moved during calibration
     * procedure.
     */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_CALIBRATION_ERROR"] = 8] = "STATUS_CALIBRATION_ERROR";
    /** STATUS_INTERNAL_ERROR - Something extraordinary happened. Try power cycling robot or contact BD. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_INTERNAL_ERROR"] = 9] = "STATUS_INTERNAL_ERROR";
    /** STATUS_CAMERA_FOCUS_ERROR - Camera focus issue detected. This is a hardware issue. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_CAMERA_FOCUS_ERROR"] = 14] = "STATUS_CAMERA_FOCUS_ERROR";
    /** STATUS_TARGET_NOT_CENTERED - Target partially, but not fully, in view when starting calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_TARGET_NOT_CENTERED"] = 6] = "STATUS_TARGET_NOT_CENTERED";
    /** STATUS_TARGET_NOT_IN_VIEW - Target not visible when starting calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_TARGET_NOT_IN_VIEW"] = 11] = "STATUS_TARGET_NOT_IN_VIEW";
    /** STATUS_TARGET_NOT_GRAVITY_ALIGNED - Target not aligned with gravity when starting calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_TARGET_NOT_GRAVITY_ALIGNED"] = 12] = "STATUS_TARGET_NOT_GRAVITY_ALIGNED";
    /** STATUS_TARGET_UPSIDE_DOWN - Target upside down when starting calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_TARGET_UPSIDE_DOWN"] = 13] = "STATUS_TARGET_UPSIDE_DOWN";
    /** STATUS_NEVER_RUN - Calibration routine has never been run. No feedback to give. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_NEVER_RUN"] = 10] = "STATUS_NEVER_RUN";
    /** STATUS_CAMERA_NOT_DETECTED - One of the cameras is not detected on the USB bus. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_CAMERA_NOT_DETECTED"] = 15] = "STATUS_CAMERA_NOT_DETECTED";
    /** STATUS_INTRINSIC_WRITE_FAILED - Failed to write intrinsic calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_INTRINSIC_WRITE_FAILED"] = 16] = "STATUS_INTRINSIC_WRITE_FAILED";
    /** STATUS_EXTRINSIC_WRITE_FAILED - Failed to write extrinsic calibration. */
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["STATUS_EXTRINSIC_WRITE_FAILED"] = 17] = "STATUS_EXTRINSIC_WRITE_FAILED";
    CameraCalibrationFeedbackResponse_Status[CameraCalibrationFeedbackResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CameraCalibrationFeedbackResponse_Status = exports.CameraCalibrationFeedbackResponse_Status || (exports.CameraCalibrationFeedbackResponse_Status = {}));
function cameraCalibrationFeedbackResponse_StatusFromJSON(object) {
    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;
    }
}
exports.cameraCalibrationFeedbackResponse_StatusFromJSON = cameraCalibrationFeedbackResponse_StatusFromJSON;
function cameraCalibrationFeedbackResponse_StatusToJSON(object) {
    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";
    }
}
exports.cameraCalibrationFeedbackResponse_StatusToJSON = cameraCalibrationFeedbackResponse_StatusToJSON;
function createBaseSpotCheckCommandRequest() {
    return { header: undefined, lease: undefined, command: 0 };
}
exports.SpotCheckCommandRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        if (message.lease !== undefined) {
            lease_1.Lease.encode(message.lease, writer.uint32(18).fork()).ldelim();
        }
        if (message.command !== 0) {
            writer.uint32(24).int32(message.command);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.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 = header_1.RequestHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.lease = lease_1.Lease.decode(reader, reader.uint32());
                    break;
                case 3:
                    message.command = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.RequestHeader.fromJSON(object.header)
                : undefined,
            lease: isSet(object.lease) ? lease_1.Lease.fromJSON(object.lease) : undefined,
            command: isSet(object.command)
                ? spotCheckCommandRequest_CommandFromJSON(object.command)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.RequestHeader.toJSON(message.header)
                : undefined);
        message.lease !== undefined &&
            (obj.lease = message.lease ? lease_1.Lease.toJSON(message.lease) : undefined);
        message.command !== undefined &&
            (obj.command = spotCheckCommandRequest_CommandToJSON(message.command));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckCommandRequest();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.RequestHeader.fromPartial(object.header)
                : undefined;
        message.lease =
            object.lease !== undefined && object.lease !== null
                ? lease_1.Lease.fromPartial(object.lease)
                : undefined;
        message.command = object.command ?? 0;
        return message;
    },
};
function createBaseSpotCheckCommandResponse() {
    return {
        header: undefined,
        leaseUseResult: undefined,
        status: 0,
        message: "",
    };
}
exports.SpotCheckCommandResponse = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        if (message.leaseUseResult !== undefined) {
            lease_1.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, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.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 = header_1.ResponseHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.leaseUseResult = lease_1.LeaseUseResult.decode(reader, reader.uint32());
                    break;
                case 3:
                    message.status = reader.int32();
                    break;
                case 4:
                    message.message = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.ResponseHeader.fromJSON(object.header)
                : undefined,
            leaseUseResult: isSet(object.leaseUseResult)
                ? lease_1.LeaseUseResult.fromJSON(object.leaseUseResult)
                : undefined,
            status: isSet(object.status)
                ? spotCheckCommandResponse_StatusFromJSON(object.status)
                : 0,
            message: isSet(object.message) ? String(object.message) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.ResponseHeader.toJSON(message.header)
                : undefined);
        message.leaseUseResult !== undefined &&
            (obj.leaseUseResult = message.leaseUseResult
                ? lease_1.LeaseUseResult.toJSON(message.leaseUseResult)
                : undefined);
        message.status !== undefined &&
            (obj.status = spotCheckCommandResponse_StatusToJSON(message.status));
        message.message !== undefined && (obj.message = message.message);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckCommandResponse();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.ResponseHeader.fromPartial(object.header)
                : undefined;
        message.leaseUseResult =
            object.leaseUseResult !== undefined && object.leaseUseResult !== null
                ? lease_1.LeaseUseResult.fromPartial(object.leaseUseResult)
                : undefined;
        message.status = object.status ?? 0;
        message.message = object.message ?? "";
        return message;
    },
};
function createBaseSpotCheckFeedbackRequest() {
    return { header: undefined };
}
exports.SpotCheckFeedbackRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.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 = header_1.RequestHeader.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.RequestHeader.fromJSON(object.header)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.RequestHeader.toJSON(message.header)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackRequest();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.RequestHeader.fromPartial(object.header)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse() {
    return {
        header: undefined,
        state: 0,
        lastCommand: 0,
        error: 0,
        cameraResults: {},
        loadCellResults: {},
        kinematicCalResults: {},
        payloadResult: undefined,
        footHeightResults: {},
        legPairResults: {},
        hipRangeOfMotionResults: {},
        progress: 0,
        lastCalTimestamp: undefined,
    };
}
exports.SpotCheckFeedbackResponse = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.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]) => {
            exports.SpotCheckFeedbackResponse_CameraResultsEntry.encode({ key: key, value }, writer.uint32(26).fork()).ldelim();
        });
        Object.entries(message.loadCellResults).forEach(([key, value]) => {
            exports.SpotCheckFeedbackResponse_LoadCellResultsEntry.encode({ key: key, value }, writer.uint32(34).fork()).ldelim();
        });
        Object.entries(message.kinematicCalResults).forEach(([key, value]) => {
            exports.SpotCheckFeedbackResponse_KinematicCalResultsEntry.encode({ key: key, value }, writer.uint32(42).fork()).ldelim();
        });
        if (message.payloadResult !== undefined) {
            exports.PayloadCheckResult.encode(message.payloadResult, writer.uint32(66).fork()).ldelim();
        }
        Object.entries(message.footHeightResults).forEach(([key, value]) => {
            exports.SpotCheckFeedbackResponse_FootHeightResultsEntry.encode({ key: key, value }, writer.uint32(82).fork()).ldelim();
        });
        Object.entries(message.legPairResults).forEach(([key, value]) => {
            exports.SpotCheckFeedbackResponse_LegPairResultsEntry.encode({ key: key, value }, writer.uint32(90).fork()).ldelim();
        });
        Object.entries(message.hipRangeOfMotionResults).forEach(([key, value]) => {
            exports.SpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry.encode({ key: key, value }, writer.uint32(106).fork()).ldelim();
        });
        if (message.progress !== 0) {
            writer.uint32(61).float(message.progress);
        }
        if (message.lastCalTimestamp !== undefined) {
            timestamp_1.Timestamp.encode(toTimestamp(message.lastCalTimestamp), writer.uint32(74).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.state = reader.int32();
                    break;
                case 12:
                    message.lastCommand = reader.int32();
                    break;
                case 6:
                    message.error = reader.int32();
                    break;
                case 3:
                    const entry3 = exports.SpotCheckFeedbackResponse_CameraResultsEntry.decode(reader, reader.uint32());
                    if (entry3.value !== undefined) {
                        message.cameraResults[entry3.key] = entry3.value;
                    }
                    break;
                case 4:
                    const entry4 = exports.SpotCheckFeedbackResponse_LoadCellResultsEntry.decode(reader, reader.uint32());
                    if (entry4.value !== undefined) {
                        message.loadCellResults[entry4.key] = entry4.value;
                    }
                    break;
                case 5:
                    const entry5 = exports.SpotCheckFeedbackResponse_KinematicCalResultsEntry.decode(reader, reader.uint32());
                    if (entry5.value !== undefined) {
                        message.kinematicCalResults[entry5.key] = entry5.value;
                    }
                    break;
                case 8:
                    message.payloadResult = exports.PayloadCheckResult.decode(reader, reader.uint32());
                    break;
                case 10:
                    const entry10 = exports.SpotCheckFeedbackResponse_FootHeightResultsEntry.decode(reader, reader.uint32());
                    if (entry10.value !== undefined) {
                        message.footHeightResults[entry10.key] = entry10.value;
                    }
                    break;
                case 11:
                    const entry11 = exports.SpotCheckFeedbackResponse_LegPairResultsEntry.decode(reader, reader.uint32());
                    if (entry11.value !== undefined) {
                        message.legPairResults[entry11.key] = entry11.value;
                    }
                    break;
                case 13:
                    const entry13 = exports.SpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry.decode(reader, reader.uint32());
                    if (entry13.value !== undefined) {
                        message.hipRangeOfMotionResults[entry13.key] = entry13.value;
                    }
                    break;
                case 7:
                    message.progress = reader.float();
                    break;
                case 9:
                    message.lastCalTimestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.ResponseHeader.fromJSON(object.header)
                : undefined,
            state: isSet(object.state)
                ? spotCheckFeedbackResponse_StateFromJSON(object.state)
                : 0,
            lastCommand: isSet(object.lastCommand)
                ? spotCheckCommandRequest_CommandFromJSON(object.lastCommand)
                : 0,
            error: isSet(object.error)
                ? spotCheckFeedbackResponse_ErrorFromJSON(object.error)
                : 0,
            cameraResults: isObject(object.cameraResults)
                ? Object.entries(object.cameraResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.DepthPlaneSpotCheckResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            loadCellResults: isObject(object.loadCellResults)
                ? Object.entries(object.loadCellResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.LoadCellSpotCheckResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            kinematicCalResults: isObject(object.kinematicCalResults)
                ? Object.entries(object.kinematicCalResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.JointKinematicCheckResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            payloadResult: isSet(object.payloadResult)
                ? exports.PayloadCheckResult.fromJSON(object.payloadResult)
                : undefined,
            footHeightResults: isObject(object.footHeightResults)
                ? Object.entries(object.footHeightResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.FootHeightCheckResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            legPairResults: isObject(object.legPairResults)
                ? Object.entries(object.legPairResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.LegPairCheckResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            hipRangeOfMotionResults: isObject(object.hipRangeOfMotionResults)
                ? Object.entries(object.hipRangeOfMotionResults).reduce((acc, [key, value]) => {
                    acc[key] = exports.HipRangeOfMotionResult.fromJSON(value);
                    return acc;
                }, {})
                : {},
            progress: isSet(object.progress) ? Number(object.progress) : 0,
            lastCalTimestamp: isSet(object.lastCalTimestamp)
                ? fromJsonTimestamp(object.lastCalTimestamp)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.ResponseHeader.toJSON(message.header)
                : undefined);
        message.state !== undefined &&
            (obj.state = spotCheckFeedbackResponse_StateToJSON(message.state));
        message.lastCommand !== undefined &&
            (obj.lastCommand = spotCheckCommandRequest_CommandToJSON(message.lastCommand));
        message.error !== undefined &&
            (obj.error = spotCheckFeedbackResponse_ErrorToJSON(message.error));
        obj.cameraResults = {};
        if (message.cameraResults) {
            Object.entries(message.cameraResults).forEach(([k, v]) => {
                obj.cameraResults[k] = exports.DepthPlaneSpotCheckResult.toJSON(v);
            });
        }
        obj.loadCellResults = {};
        if (message.loadCellResults) {
            Object.entries(message.loadCellResults).forEach(([k, v]) => {
                obj.loadCellResults[k] = exports.LoadCellSpotCheckResult.toJSON(v);
            });
        }
        obj.kinematicCalResults = {};
        if (message.kinematicCalResults) {
            Object.entries(message.kinematicCalResults).forEach(([k, v]) => {
                obj.kinematicCalResults[k] = exports.JointKinematicCheckResult.toJSON(v);
            });
        }
        message.payloadResult !== undefined &&
            (obj.payloadResult = message.payloadResult
                ? exports.PayloadCheckResult.toJSON(message.payloadResult)
                : undefined);
        obj.footHeightResults = {};
        if (message.footHeightResults) {
            Object.entries(message.footHeightResults).forEach(([k, v]) => {
                obj.footHeightResults[k] = exports.FootHeightCheckResult.toJSON(v);
            });
        }
        obj.legPairResults = {};
        if (message.legPairResults) {
            Object.entries(message.legPairResults).forEach(([k, v]) => {
                obj.legPairResults[k] = exports.LegPairCheckResult.toJSON(v);
            });
        }
        obj.hipRangeOfMotionResults = {};
        if (message.hipRangeOfMotionResults) {
            Object.entries(message.hipRangeOfMotionResults).forEach(([k, v]) => {
                obj.hipRangeOfMotionResults[k] = exports.HipRangeOfMotionResult.toJSON(v);
            });
        }
        message.progress !== undefined && (obj.progress = message.progress);
        message.lastCalTimestamp !== undefined &&
            (obj.lastCalTimestamp = message.lastCalTimestamp.toISOString());
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.ResponseHeader.fromPartial(object.header)
                : undefined;
        message.state = object.state ?? 0;
        message.lastCommand = object.lastCommand ?? 0;
        message.error = object.error ?? 0;
        message.cameraResults = Object.entries(object.cameraResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.DepthPlaneSpotCheckResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.loadCellResults = Object.entries(object.loadCellResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.LoadCellSpotCheckResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.kinematicCalResults = Object.entries(object.kinematicCalResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.JointKinematicCheckResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.payloadResult =
            object.payloadResult !== undefined && object.payloadResult !== null
                ? exports.PayloadCheckResult.fromPartial(object.payloadResult)
                : undefined;
        message.footHeightResults = Object.entries(object.footHeightResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.FootHeightCheckResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.legPairResults = Object.entries(object.legPairResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.LegPairCheckResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.hipRangeOfMotionResults = Object.entries(object.hipRangeOfMotionResults ?? {}).reduce((acc, [key, value]) => {
            if (value !== undefined) {
                acc[key] = exports.HipRangeOfMotionResult.fromPartial(value);
            }
            return acc;
        }, {});
        message.progress = object.progress ?? 0;
        message.lastCalTimestamp = object.lastCalTimestamp ?? undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_CameraResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_CameraResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.DepthPlaneSpotCheckResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_CameraResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.DepthPlaneSpotCheckResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.DepthPlaneSpotCheckResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.DepthPlaneSpotCheckResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_CameraResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.DepthPlaneSpotCheckResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_LoadCellResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_LoadCellResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.LoadCellSpotCheckResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_LoadCellResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.LoadCellSpotCheckResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.LoadCellSpotCheckResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.LoadCellSpotCheckResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_LoadCellResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.LoadCellSpotCheckResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_KinematicCalResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_KinematicCalResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.JointKinematicCheckResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_KinematicCalResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.JointKinematicCheckResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.JointKinematicCheckResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.JointKinematicCheckResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_KinematicCalResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.JointKinematicCheckResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_FootHeightResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_FootHeightResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.FootHeightCheckResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_FootHeightResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.FootHeightCheckResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.FootHeightCheckResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.FootHeightCheckResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_FootHeightResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.FootHeightCheckResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_LegPairResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_LegPairResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.LegPairCheckResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_LegPairResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.LegPairCheckResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.LegPairCheckResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.LegPairCheckResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_LegPairResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.LegPairCheckResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseSpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry() {
    return { key: "", value: undefined };
}
exports.SpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== "") {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.HipRangeOfMotionResult.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.HipRangeOfMotionResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            key: isSet(object.key) ? String(object.key) : "",
            value: isSet(object.value)
                ? exports.HipRangeOfMotionResult.fromJSON(object.value)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value
                ? exports.HipRangeOfMotionResult.toJSON(message.value)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseSpotCheckFeedbackResponse_HipRangeOfMotionResultsEntry();
        message.key = object.key ?? "";
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.HipRangeOfMotionResult.fromPartial(object.value)
                : undefined;
        return message;
    },
};
function createBaseDepthPlaneSpotCheckResult() {
    return { status: 0, severityScore: 0 };
}
exports.DepthPlaneSpotCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.status !== 0) {
            writer.uint32(8).int32(message.status);
        }
        if (message.severityScore !== 0) {
            writer.uint32(21).float(message.severityScore);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseDepthPlaneSpotCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.status = reader.int32();
                    break;
                case 2:
                    message.severityScore = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            status: isSet(object.status)
                ? depthPlaneSpotCheckResult_StatusFromJSON(object.status)
                : 0,
            severityScore: isSet(object.severityScore)
                ? Number(object.severityScore)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.status !== undefined &&
            (obj.status = depthPlaneSpotCheckResult_StatusToJSON(message.status));
        message.severityScore !== undefined &&
            (obj.severityScore = message.severityScore);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseDepthPlaneSpotCheckResult();
        message.status = object.status ?? 0;
        message.severityScore = object.severityScore ?? 0;
        return message;
    },
};
function createBasePayloadCheckResult() {
    return { error: 0, extraPayload: 0 };
}
exports.PayloadCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.error !== 0) {
            writer.uint32(8).int32(message.error);
        }
        if (message.extraPayload !== 0) {
            writer.uint32(21).float(message.extraPayload);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePayloadCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.error = reader.int32();
                    break;
                case 2:
                    message.extraPayload = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            error: isSet(object.error)
                ? payloadCheckResult_ErrorFromJSON(object.error)
                : 0,
            extraPayload: isSet(object.extraPayload)
                ? Number(object.extraPayload)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.error !== undefined &&
            (obj.error = payloadCheckResult_ErrorToJSON(message.error));
        message.extraPayload !== undefined &&
            (obj.extraPayload = message.extraPayload);
        return obj;
    },
    fromPartial(object) {
        const message = createBasePayloadCheckResult();
        message.error = object.error ?? 0;
        message.extraPayload = object.extraPayload ?? 0;
        return message;
    },
};
function createBaseLoadCellSpotCheckResult() {
    return { error: 0, zero: 0, oldZero: 0 };
}
exports.LoadCellSpotCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.error !== 0) {
            writer.uint32(16).int32(message.error);
        }
        if (message.zero !== 0) {
            writer.uint32(29).float(message.zero);
        }
        if (message.oldZero !== 0) {
            writer.uint32(37).float(message.oldZero);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLoadCellSpotCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2:
                    message.error = reader.int32();
                    break;
                case 3:
                    message.zero = reader.float();
                    break;
                case 4:
                    message.oldZero = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            error: isSet(object.error)
                ? loadCellSpotCheckResult_ErrorFromJSON(object.error)
                : 0,
            zero: isSet(object.zero) ? Number(object.zero) : 0,
            oldZero: isSet(object.oldZero) ? Number(object.oldZero) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.error !== undefined &&
            (obj.error = loadCellSpotCheckResult_ErrorToJSON(message.error));
        message.zero !== undefined && (obj.zero = message.zero);
        message.oldZero !== undefined && (obj.oldZero = message.oldZero);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseLoadCellSpotCheckResult();
        message.error = object.error ?? 0;
        message.zero = object.zero ?? 0;
        message.oldZero = object.oldZero ?? 0;
        return message;
    },
};
function createBaseJointKinematicCheckResult() {
    return { error: 0, offset: 0, oldOffset: 0, healthScore: 0 };
}
exports.JointKinematicCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.error !== 0) {
            writer.uint32(16).int32(message.error);
        }
        if (message.offset !== 0) {
            writer.uint32(29).float(message.offset);
        }
        if (message.oldOffset !== 0) {
            writer.uint32(37).float(message.oldOffset);
        }
        if (message.healthScore !== 0) {
            writer.uint32(45).float(message.healthScore);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseJointKinematicCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2:
                    message.error = reader.int32();
                    break;
                case 3:
                    message.offset = reader.float();
                    break;
                case 4:
                    message.oldOffset = reader.float();
                    break;
                case 5:
                    message.healthScore = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            error: isSet(object.error)
                ? jointKinematicCheckResult_ErrorFromJSON(object.error)
                : 0,
            offset: isSet(object.offset) ? Number(object.offset) : 0,
            oldOffset: isSet(object.oldOffset) ? Number(object.oldOffset) : 0,
            healthScore: isSet(object.healthScore) ? Number(object.healthScore) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.error !== undefined &&
            (obj.error = jointKinematicCheckResult_ErrorToJSON(message.error));
        message.offset !== undefined && (obj.offset = message.offset);
        message.oldOffset !== undefined && (obj.oldOffset = message.oldOffset);
        message.healthScore !== undefined &&
            (obj.healthScore = message.healthScore);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseJointKinematicCheckResult();
        message.error = object.error ?? 0;
        message.offset = object.offset ?? 0;
        message.oldOffset = object.oldOffset ?? 0;
        message.healthScore = object.healthScore ?? 0;
        return message;
    },
};
function createBaseFootHeightCheckResult() {
    return { status: 0, footHeightErrorFromMean: 0 };
}
exports.FootHeightCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.status !== 0) {
            writer.uint32(16).int32(message.status);
        }
        if (message.footHeightErrorFromMean !== 0) {
            writer.uint32(29).float(message.footHeightErrorFromMean);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFootHeightCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2:
                    message.status = reader.int32();
                    break;
                case 3:
                    message.footHeightErrorFromMean = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            status: isSet(object.status)
                ? footHeightCheckResult_StatusFromJSON(object.status)
                : 0,
            footHeightErrorFromMean: isSet(object.footHeightErrorFromMean)
                ? Number(object.footHeightErrorFromMean)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.status !== undefined &&
            (obj.status = footHeightCheckResult_StatusToJSON(message.status));
        message.footHeightErrorFromMean !== undefined &&
            (obj.footHeightErrorFromMean = message.footHeightErrorFromMean);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseFootHeightCheckResult();
        message.status = object.status ?? 0;
        message.footHeightErrorFromMean = object.footHeightErrorFromMean ?? 0;
        return message;
    },
};
function createBaseLegPairCheckResult() {
    return { status: 0, legPairDistanceChange: 0 };
}
exports.LegPairCheckResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.status !== 0) {
            writer.uint32(16).int32(message.status);
        }
        if (message.legPairDistanceChange !== 0) {
            writer.uint32(29).float(message.legPairDistanceChange);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseLegPairCheckResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 2:
                    message.status = reader.int32();
                    break;
                case 3:
                    message.legPairDistanceChange = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            status: isSet(object.status)
                ? legPairCheckResult_StatusFromJSON(object.status)
                : 0,
            legPairDistanceChange: isSet(object.legPairDistanceChange)
                ? Number(object.legPairDistanceChange)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.status !== undefined &&
            (obj.status = legPairCheckResult_StatusToJSON(message.status));
        message.legPairDistanceChange !== undefined &&
            (obj.legPairDistanceChange = message.legPairDistanceChange);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseLegPairCheckResult();
        message.status = object.status ?? 0;
        message.legPairDistanceChange = object.legPairDistanceChange ?? 0;
        return message;
    },
};
function createBaseHipRangeOfMotionResult() {
    return { error: 0, hx: [], hy: [] };
}
exports.HipRangeOfMotionResult = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.error !== 0) {
            writer.uint32(8).int32(message.error);
        }
        writer.uint32(18).fork();
        for (const v of message.hx) {
            writer.float(v);
        }
        writer.ldelim();
        writer.uint32(26).fork();
        for (const v of message.hy) {
            writer.float(v);
        }
        writer.ldelim();
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseHipRangeOfMotionResult();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.error = reader.int32();
                    break;
                case 2:
                    if ((tag & 7) === 2) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.hx.push(reader.float());
                        }
                    }
                    else {
                        message.hx.push(reader.float());
                    }
                    break;
                case 3:
                    if ((tag & 7) === 2) {
                        const end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) {
                            message.hy.push(reader.float());
                        }
                    }
                    else {
                        message.hy.push(reader.float());
                    }
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            error: isSet(object.error)
                ? hipRangeOfMotionResult_ErrorFromJSON(object.error)
                : 0,
            hx: Array.isArray(object?.hx) ? object.hx.map((e) => Number(e)) : [],
            hy: Array.isArray(object?.hy) ? object.hy.map((e) => Number(e)) : [],
        };
    },
    toJSON(message) {
        const obj = {};
        message.error !== undefined &&
            (obj.error = hipRangeOfMotionResult_ErrorToJSON(message.error));
        if (message.hx) {
            obj.hx = message.hx.map((e) => e);
        }
        else {
            obj.hx = [];
        }
        if (message.hy) {
            obj.hy = message.hy.map((e) => e);
        }
        else {
            obj.hy = [];
        }
        return obj;
    },
    fromPartial(object) {
        const message = createBaseHipRangeOfMotionResult();
        message.error = object.error ?? 0;
        message.hx = object.hx?.map((e) => e) || [];
        message.hy = object.hy?.map((e) => e) || [];
        return message;
    },
};
function createBaseCameraCalibrationCommandRequest() {
    return { header: undefined, lease: undefined, command: 0 };
}
exports.CameraCalibrationCommandRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        if (message.lease !== undefined) {
            lease_1.Lease.encode(message.lease, writer.uint32(18).fork()).ldelim();
        }
        if (message.command !== 0) {
            writer.uint32(24).int32(message.command);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCameraCalibrationCommandRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.header = header_1.RequestHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.lease = lease_1.Lease.decode(reader, reader.uint32());
                    break;
                case 3:
                    message.command = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.RequestHeader.fromJSON(object.header)
                : undefined,
            lease: isSet(object.lease) ? lease_1.Lease.fromJSON(object.lease) : undefined,
            command: isSet(object.command)
                ? cameraCalibrationCommandRequest_CommandFromJSON(object.command)
                : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.RequestHeader.toJSON(message.header)
                : undefined);
        message.lease !== undefined &&
            (obj.lease = message.lease ? lease_1.Lease.toJSON(message.lease) : undefined);
        message.command !== undefined &&
            (obj.command = cameraCalibrationCommandRequest_CommandToJSON(message.command));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseCameraCalibrationCommandRequest();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.RequestHeader.fromPartial(object.header)
                : undefined;
        message.lease =
            object.lease !== undefined && object.lease !== null
                ? lease_1.Lease.fromPartial(object.lease)
                : undefined;
        message.command = object.command ?? 0;
        return message;
    },
};
function createBaseCameraCalibrationCommandResponse() {
    return { header: undefined, leaseUseResult: undefined };
}
exports.CameraCalibrationCommandResponse = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        if (message.leaseUseResult !== undefined) {
            lease_1.LeaseUseResult.encode(message.leaseUseResult, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCameraCalibrationCommandResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.leaseUseResult = lease_1.LeaseUseResult.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.ResponseHeader.fromJSON(object.header)
                : undefined,
            leaseUseResult: isSet(object.leaseUseResult)
                ? lease_1.LeaseUseResult.fromJSON(object.leaseUseResult)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.ResponseHeader.toJSON(message.header)
                : undefined);
        message.leaseUseResult !== undefined &&
            (obj.leaseUseResult = message.leaseUseResult
                ? lease_1.LeaseUseResult.toJSON(message.leaseUseResult)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseCameraCalibrationCommandResponse();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.ResponseHeader.fromPartial(object.header)
                : undefined;
        message.leaseUseResult =
            object.leaseUseResult !== undefined && object.leaseUseResult !== null
                ? lease_1.LeaseUseResult.fromPartial(object.leaseUseResult)
                : undefined;
        return message;
    },
};
function createBaseCameraCalibrationFeedbackRequest() {
    return { header: undefined };
}
exports.CameraCalibrationFeedbackRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCameraCalibrationFeedbackRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.header = header_1.RequestHeader.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.RequestHeader.fromJSON(object.header)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.RequestHeader.toJSON(message.header)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseCameraCalibrationFeedbackRequest();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.RequestHeader.fromPartial(object.header)
                : undefined;
        return message;
    },
};
function createBaseCameraCalibrationFeedbackResponse() {
    return { header: undefined, status: 0, progress: 0 };
}
exports.CameraCalibrationFeedbackResponse = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.header !== undefined) {
            header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
        }
        if (message.status !== 0) {
            writer.uint32(16).int32(message.status);
        }
        if (message.progress !== 0) {
            writer.uint32(29).float(message.progress);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseCameraCalibrationFeedbackResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.status = reader.int32();
                    break;
                case 3:
                    message.progress = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            header: isSet(object.header)
                ? header_1.ResponseHeader.fromJSON(object.header)
                : undefined,
            status: isSet(object.status)
                ? cameraCalibrationFeedbackResponse_StatusFromJSON(object.status)
                : 0,
            progress: isSet(object.progress) ? Number(object.progress) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.header !== undefined &&
            (obj.header = message.header
                ? header_1.ResponseHeader.toJSON(message.header)
                : undefined);
        message.status !== undefined &&
            (obj.status = cameraCalibrationFeedbackResponse_StatusToJSON(message.status));
        message.progress !== undefined && (obj.progress = message.progress);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseCameraCalibrationFeedbackResponse();
        message.header =
            object.header !== undefined && object.header !== null
                ? header_1.ResponseHeader.fromPartial(object.header)
                : undefined;
        message.status = object.status ?? 0;
        message.progress = object.progress ?? 0;
        return message;
    },
};
function toTimestamp(date) {
    const seconds = date.getTime() / 1000;
    const nanos = (date.getTime() % 1000) * 1000000;
    return { seconds, nanos };
}
function fromTimestamp(t) {
    let millis = t.seconds * 1000;
    millis += t.nanos / 1000000;
    return new Date(millis);
}
function fromJsonTimestamp(o) {
    if (o instanceof Date) {
        return o;
    }
    else if (typeof o === "string") {
        return new Date(o);
    }
    else {
        return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
    }
}
function isObject(value) {
    return typeof value === "object" && value !== null;
}
function isSet(value) {
    return value !== null && value !== undefined;
}
//# sourceMappingURL=spot_check.js.map