spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
1,559 lines (1,467 loc) • 204 kB
text/typescript
/* eslint-disable */
import { Vec3Value, Vec2Value } from "../geometry";
import _m0 from "protobufjs/minimal";
import {
DoubleValue,
BoolValue,
Int32Value,
} from "../../../google/protobuf/wrappers";
export const protobufPackage = "bosdyn.api.spot";
/** Enum for the pivot point for certain choreography sequence moves. */
export enum Pivot {
PIVOT_UNKNOWN = 0,
PIVOT_FRONT = 1,
PIVOT_HIND = 2,
PIVOT_CENTER = 3,
UNRECOGNIZED = -1,
}
export function pivotFromJSON(object: any): Pivot {
switch (object) {
case 0:
case "PIVOT_UNKNOWN":
return Pivot.PIVOT_UNKNOWN;
case 1:
case "PIVOT_FRONT":
return Pivot.PIVOT_FRONT;
case 2:
case "PIVOT_HIND":
return Pivot.PIVOT_HIND;
case 3:
case "PIVOT_CENTER":
return Pivot.PIVOT_CENTER;
case -1:
case "UNRECOGNIZED":
default:
return Pivot.UNRECOGNIZED;
}
}
export function pivotToJSON(object: Pivot): string {
switch (object) {
case Pivot.PIVOT_UNKNOWN:
return "PIVOT_UNKNOWN";
case Pivot.PIVOT_FRONT:
return "PIVOT_FRONT";
case Pivot.PIVOT_HIND:
return "PIVOT_HIND";
case Pivot.PIVOT_CENTER:
return "PIVOT_CENTER";
case Pivot.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/**
* Enum to describe the type of easing to perform for the slices at either (or both) the
* beginning and end of a move.
*/
export enum Easing {
EASING_UNKNOWN = 0,
EASING_LINEAR = 1,
EASING_QUADRATIC_INPUT = 2,
EASING_QUADRATIC_OUTPUT = 3,
EASING_QUADRATIC_IN_OUT = 4,
EASING_CUBIC_INPUT = 5,
EASING_CUBIC_OUTPUT = 6,
EASING_CUBIC_IN_OUT = 7,
EASING_EXPONENTIAL_INPUT = 8,
EASING_EXPONENTIAL_OUTPUT = 9,
EASING_EXPONENTIAL_IN_OUT = 10,
UNRECOGNIZED = -1,
}
export function easingFromJSON(object: any): Easing {
switch (object) {
case 0:
case "EASING_UNKNOWN":
return Easing.EASING_UNKNOWN;
case 1:
case "EASING_LINEAR":
return Easing.EASING_LINEAR;
case 2:
case "EASING_QUADRATIC_INPUT":
return Easing.EASING_QUADRATIC_INPUT;
case 3:
case "EASING_QUADRATIC_OUTPUT":
return Easing.EASING_QUADRATIC_OUTPUT;
case 4:
case "EASING_QUADRATIC_IN_OUT":
return Easing.EASING_QUADRATIC_IN_OUT;
case 5:
case "EASING_CUBIC_INPUT":
return Easing.EASING_CUBIC_INPUT;
case 6:
case "EASING_CUBIC_OUTPUT":
return Easing.EASING_CUBIC_OUTPUT;
case 7:
case "EASING_CUBIC_IN_OUT":
return Easing.EASING_CUBIC_IN_OUT;
case 8:
case "EASING_EXPONENTIAL_INPUT":
return Easing.EASING_EXPONENTIAL_INPUT;
case 9:
case "EASING_EXPONENTIAL_OUTPUT":
return Easing.EASING_EXPONENTIAL_OUTPUT;
case 10:
case "EASING_EXPONENTIAL_IN_OUT":
return Easing.EASING_EXPONENTIAL_IN_OUT;
case -1:
case "UNRECOGNIZED":
default:
return Easing.UNRECOGNIZED;
}
}
export function easingToJSON(object: Easing): string {
switch (object) {
case Easing.EASING_UNKNOWN:
return "EASING_UNKNOWN";
case Easing.EASING_LINEAR:
return "EASING_LINEAR";
case Easing.EASING_QUADRATIC_INPUT:
return "EASING_QUADRATIC_INPUT";
case Easing.EASING_QUADRATIC_OUTPUT:
return "EASING_QUADRATIC_OUTPUT";
case Easing.EASING_QUADRATIC_IN_OUT:
return "EASING_QUADRATIC_IN_OUT";
case Easing.EASING_CUBIC_INPUT:
return "EASING_CUBIC_INPUT";
case Easing.EASING_CUBIC_OUTPUT:
return "EASING_CUBIC_OUTPUT";
case Easing.EASING_CUBIC_IN_OUT:
return "EASING_CUBIC_IN_OUT";
case Easing.EASING_EXPONENTIAL_INPUT:
return "EASING_EXPONENTIAL_INPUT";
case Easing.EASING_EXPONENTIAL_OUTPUT:
return "EASING_EXPONENTIAL_OUTPUT";
case Easing.EASING_EXPONENTIAL_IN_OUT:
return "EASING_EXPONENTIAL_IN_OUT";
case Easing.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export enum ArmMoveFrame {
ARM_MOVE_FRAME_UNKNOWN = 0,
ARM_MOVE_FRAME_CENTER_OF_FOOTPRINT = 1,
ARM_MOVE_FRAME_HAND = 2,
ARM_MOVE_FRAME_BODY = 3,
ARM_MOVE_FRAME_SHOULDER = 4,
ARM_MOVE_FRAME_SHADOW = 5,
ARM_MOVE_FRAME_DANCE = 6,
UNRECOGNIZED = -1,
}
export function armMoveFrameFromJSON(object: any): ArmMoveFrame {
switch (object) {
case 0:
case "ARM_MOVE_FRAME_UNKNOWN":
return ArmMoveFrame.ARM_MOVE_FRAME_UNKNOWN;
case 1:
case "ARM_MOVE_FRAME_CENTER_OF_FOOTPRINT":
return ArmMoveFrame.ARM_MOVE_FRAME_CENTER_OF_FOOTPRINT;
case 2:
case "ARM_MOVE_FRAME_HAND":
return ArmMoveFrame.ARM_MOVE_FRAME_HAND;
case 3:
case "ARM_MOVE_FRAME_BODY":
return ArmMoveFrame.ARM_MOVE_FRAME_BODY;
case 4:
case "ARM_MOVE_FRAME_SHOULDER":
return ArmMoveFrame.ARM_MOVE_FRAME_SHOULDER;
case 5:
case "ARM_MOVE_FRAME_SHADOW":
return ArmMoveFrame.ARM_MOVE_FRAME_SHADOW;
case 6:
case "ARM_MOVE_FRAME_DANCE":
return ArmMoveFrame.ARM_MOVE_FRAME_DANCE;
case -1:
case "UNRECOGNIZED":
default:
return ArmMoveFrame.UNRECOGNIZED;
}
}
export function armMoveFrameToJSON(object: ArmMoveFrame): string {
switch (object) {
case ArmMoveFrame.ARM_MOVE_FRAME_UNKNOWN:
return "ARM_MOVE_FRAME_UNKNOWN";
case ArmMoveFrame.ARM_MOVE_FRAME_CENTER_OF_FOOTPRINT:
return "ARM_MOVE_FRAME_CENTER_OF_FOOTPRINT";
case ArmMoveFrame.ARM_MOVE_FRAME_HAND:
return "ARM_MOVE_FRAME_HAND";
case ArmMoveFrame.ARM_MOVE_FRAME_BODY:
return "ARM_MOVE_FRAME_BODY";
case ArmMoveFrame.ARM_MOVE_FRAME_SHOULDER:
return "ARM_MOVE_FRAME_SHOULDER";
case ArmMoveFrame.ARM_MOVE_FRAME_SHADOW:
return "ARM_MOVE_FRAME_SHADOW";
case ArmMoveFrame.ARM_MOVE_FRAME_DANCE:
return "ARM_MOVE_FRAME_DANCE";
case ArmMoveFrame.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Enum to describe which leg is being referenced in specific choreography sequence moves. */
export enum Leg {
LEG_UNKNOWN = 0,
LEG_FRONT_LEFT = 1,
LEG_FRONT_RIGHT = 2,
LEG_HIND_LEFT = 3,
LEG_HIND_RIGHT = 4,
LEG_NO_LEG = -1,
UNRECOGNIZED = -1,
}
export function legFromJSON(object: any): Leg {
switch (object) {
case 0:
case "LEG_UNKNOWN":
return Leg.LEG_UNKNOWN;
case 1:
case "LEG_FRONT_LEFT":
return Leg.LEG_FRONT_LEFT;
case 2:
case "LEG_FRONT_RIGHT":
return Leg.LEG_FRONT_RIGHT;
case 3:
case "LEG_HIND_LEFT":
return Leg.LEG_HIND_LEFT;
case 4:
case "LEG_HIND_RIGHT":
return Leg.LEG_HIND_RIGHT;
case -1:
case "LEG_NO_LEG":
return Leg.LEG_NO_LEG;
case -1:
case "UNRECOGNIZED":
default:
return Leg.UNRECOGNIZED;
}
}
export function legToJSON(object: Leg): string {
switch (object) {
case Leg.LEG_UNKNOWN:
return "LEG_UNKNOWN";
case Leg.LEG_FRONT_LEFT:
return "LEG_FRONT_LEFT";
case Leg.LEG_FRONT_RIGHT:
return "LEG_FRONT_RIGHT";
case Leg.LEG_HIND_LEFT:
return "LEG_HIND_LEFT";
case Leg.LEG_HIND_RIGHT:
return "LEG_HIND_RIGHT";
case Leg.LEG_NO_LEG:
return "LEG_NO_LEG";
case Leg.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export enum LedLight {
LED_LIGHT_UNKNOWN = 0,
LED_LIGHT_LEFT1 = 1,
LED_LIGHT_LEFT2 = 2,
LED_LIGHT_LEFT3 = 3,
LED_LIGHT_LEFT4 = 4,
LED_LIGHT_RIGHT1 = 5,
LED_LIGHT_RIGHT2 = 6,
LED_LIGHT_RIGHT3 = 7,
LED_LIGHT_RIGHT4 = 8,
UNRECOGNIZED = -1,
}
export function ledLightFromJSON(object: any): LedLight {
switch (object) {
case 0:
case "LED_LIGHT_UNKNOWN":
return LedLight.LED_LIGHT_UNKNOWN;
case 1:
case "LED_LIGHT_LEFT1":
return LedLight.LED_LIGHT_LEFT1;
case 2:
case "LED_LIGHT_LEFT2":
return LedLight.LED_LIGHT_LEFT2;
case 3:
case "LED_LIGHT_LEFT3":
return LedLight.LED_LIGHT_LEFT3;
case 4:
case "LED_LIGHT_LEFT4":
return LedLight.LED_LIGHT_LEFT4;
case 5:
case "LED_LIGHT_RIGHT1":
return LedLight.LED_LIGHT_RIGHT1;
case 6:
case "LED_LIGHT_RIGHT2":
return LedLight.LED_LIGHT_RIGHT2;
case 7:
case "LED_LIGHT_RIGHT3":
return LedLight.LED_LIGHT_RIGHT3;
case 8:
case "LED_LIGHT_RIGHT4":
return LedLight.LED_LIGHT_RIGHT4;
case -1:
case "UNRECOGNIZED":
default:
return LedLight.UNRECOGNIZED;
}
}
export function ledLightToJSON(object: LedLight): string {
switch (object) {
case LedLight.LED_LIGHT_UNKNOWN:
return "LED_LIGHT_UNKNOWN";
case LedLight.LED_LIGHT_LEFT1:
return "LED_LIGHT_LEFT1";
case LedLight.LED_LIGHT_LEFT2:
return "LED_LIGHT_LEFT2";
case LedLight.LED_LIGHT_LEFT3:
return "LED_LIGHT_LEFT3";
case LedLight.LED_LIGHT_LEFT4:
return "LED_LIGHT_LEFT4";
case LedLight.LED_LIGHT_RIGHT1:
return "LED_LIGHT_RIGHT1";
case LedLight.LED_LIGHT_RIGHT2:
return "LED_LIGHT_RIGHT2";
case LedLight.LED_LIGHT_RIGHT3:
return "LED_LIGHT_RIGHT3";
case LedLight.LED_LIGHT_RIGHT4:
return "LED_LIGHT_RIGHT4";
case LedLight.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Euler Angle (yaw->pitch->roll) vector that uses wrapped values so we can tell which elements are set. */
export interface EulerZYXValue {
roll: number | undefined;
pitch: number | undefined;
yaw: number | undefined;
}
/** Euler Angle rates (yaw->pitch->roll) vector that uses wrapped values so we can tell which elements are set. */
export interface EulerRateZYXValue {
roll: number | undefined;
pitch: number | undefined;
yaw: number | undefined;
}
/** Parameters specific to the BodyHold move. */
export interface BodyHoldParams {
/** The robot will rotate its body to the specified orientation (roll/pitch/yaw) [rad]. */
rotation: EulerZYXValue | undefined;
/** The positional offset to the robot's current location [m]. */
translation: Vec3Value | undefined;
/** How many "slices" (beats or sub-beats) are allowed before reaching the desired pose. */
entrySlices: number | undefined;
/** How many "slices" (beats or sub-beats) are allowed for the robot to return to the original pose. */
exitSlices: number | undefined;
}
/** Parameters specific to Sway move. */
export interface SwayParams {
/** How far to move up/down [m]. */
vertical: number | undefined;
/** How far to move left/right [m]. */
horizontal: number | undefined;
/** How much to roll [rad]. */
roll: number | undefined;
/**
* What point on the robot's body should the swaying be centered at. For example, should the head move
* instead of the butt?
*/
pivot: Pivot;
/** What style motion should we use? */
style: SwayParams_SwayStyle;
/** How pronounced should the sway-style be? The value is on a scale from [0,1.0]. */
pronounced: number | undefined;
/**
* Should the robot hold previous values for the vertical, horizontal, and roll axes if the value is
* left unspecified (value of zero).
*/
holdZeroAxes: boolean | undefined;
}
/** The type of motion used by the Sway sequence move. */
export enum SwayParams_SwayStyle {
SWAY_STYLE_UNKNOWN = 0,
SWAY_STYLE_STANDARD = 1,
SWAY_STYLE_FAST_OUT = 2,
SWAY_STYLE_FAST_RETURN = 3,
SWAY_STYLE_SQUARE = 4,
SWAY_STYLE_SPIKE = 5,
SWAY_STYLE_PLATEAU = 6,
UNRECOGNIZED = -1,
}
export function swayParams_SwayStyleFromJSON(
object: any
): SwayParams_SwayStyle {
switch (object) {
case 0:
case "SWAY_STYLE_UNKNOWN":
return SwayParams_SwayStyle.SWAY_STYLE_UNKNOWN;
case 1:
case "SWAY_STYLE_STANDARD":
return SwayParams_SwayStyle.SWAY_STYLE_STANDARD;
case 2:
case "SWAY_STYLE_FAST_OUT":
return SwayParams_SwayStyle.SWAY_STYLE_FAST_OUT;
case 3:
case "SWAY_STYLE_FAST_RETURN":
return SwayParams_SwayStyle.SWAY_STYLE_FAST_RETURN;
case 4:
case "SWAY_STYLE_SQUARE":
return SwayParams_SwayStyle.SWAY_STYLE_SQUARE;
case 5:
case "SWAY_STYLE_SPIKE":
return SwayParams_SwayStyle.SWAY_STYLE_SPIKE;
case 6:
case "SWAY_STYLE_PLATEAU":
return SwayParams_SwayStyle.SWAY_STYLE_PLATEAU;
case -1:
case "UNRECOGNIZED":
default:
return SwayParams_SwayStyle.UNRECOGNIZED;
}
}
export function swayParams_SwayStyleToJSON(
object: SwayParams_SwayStyle
): string {
switch (object) {
case SwayParams_SwayStyle.SWAY_STYLE_UNKNOWN:
return "SWAY_STYLE_UNKNOWN";
case SwayParams_SwayStyle.SWAY_STYLE_STANDARD:
return "SWAY_STYLE_STANDARD";
case SwayParams_SwayStyle.SWAY_STYLE_FAST_OUT:
return "SWAY_STYLE_FAST_OUT";
case SwayParams_SwayStyle.SWAY_STYLE_FAST_RETURN:
return "SWAY_STYLE_FAST_RETURN";
case SwayParams_SwayStyle.SWAY_STYLE_SQUARE:
return "SWAY_STYLE_SQUARE";
case SwayParams_SwayStyle.SWAY_STYLE_SPIKE:
return "SWAY_STYLE_SPIKE";
case SwayParams_SwayStyle.SWAY_STYLE_PLATEAU:
return "SWAY_STYLE_PLATEAU";
case SwayParams_SwayStyle.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Parameters specific to ArmMove move. */
export interface ArmMoveParams {
/** Joint angles in radians for the arm joints. */
shoulder0: number | undefined;
shoulder1: number | undefined;
elbow0: number | undefined;
elbow1: number | undefined;
wrist0: number | undefined;
wrist1: number | undefined;
/** How the motion should be paced. */
easing: Easing;
/** Movement for the gripper. */
gripper: number | undefined;
}
export interface WorkspaceArmMoveParams {
/** The robot will rotate its body to the specified orientation (roll/pitch/yaw) [rad]. */
rotation: EulerZYXValue | undefined;
/** The positional offset to the robot's current location [m]. */
translation: Vec3Value | undefined;
/** Go to an absolute position/orientation? Otherwise, relative to starting pose. */
absolute: boolean | undefined;
/** What frame is the motion specified in. */
frame: ArmMoveFrame;
/** How the motion should be paced. */
easing: Easing;
/** If we're using the dance frame, which one? */
danceFrameId: number | undefined;
}
export interface Figure8Params {
height: number | undefined;
width: number | undefined;
beatsPerCycle: number | undefined;
}
/** Parameters for open/close of gripper. */
export interface GripperParams {
/** Angle in radians at which the gripper is open. Note that a 0 radian angle correlates to completely closed. */
angle: number | undefined;
/** Speed in m/s at which the gripper should open/close to achieve the desired angle. */
speed: number | undefined;
}
/** Parameters specific to KneelLegMove move. */
export interface KneelLegMoveParams {
/**
* Joint angles of the left front leg in radians.
* If mirrored, the joints will be flipped for the other leg.
*/
hipX: number | undefined;
hipY: number | undefined;
knee: number | undefined;
/** If mirrored is true, the joints will be flipped for the leg on the other side (right vs left) of the body. */
mirror: boolean | undefined;
/** How the motion should be paced. */
easing: Easing;
}
/** Parameters specific to KneelLegMove2 move. */
export interface KneelLegMove2Params {
/** Joint angles of the front left leg in radians. */
leftHipX: number | undefined;
leftHipY: number | undefined;
leftKnee: number | undefined;
/** Joint angles of the front right leg in radians. */
rightHipX: number | undefined;
rightHipY: number | undefined;
rightKnee: number | undefined;
/** How the motion should be paced. */
easing: Easing;
/** Should we combine with the next move into a smooth trajectory. */
linkToNext: boolean | undefined;
}
/** Parameters specific to RunningMan move. */
export interface RunningManParams {
velocity: Vec2Value | undefined;
/** How high to pick up the forward-moving feet [m]. */
swingHeight: number | undefined;
/** How far to spread the contralateral pair of feet [m]. */
spread: number | undefined;
/** Should we reverse the motion? */
reverse: boolean | undefined;
/** How many full running man cycles should the robot complete in place before starting to move with the desired velocity. */
preMoveCycles: number | undefined;
/** Do the move at some multiple of the dance cadence. */
speedMultiplier: number | undefined;
/** What fraction of the time to have feet on the ground. */
dutyCycle: number | undefined;
/** How high to hold the center of mass above the ground on average. */
comHeight: number | undefined;
}
/** Parameters specific to Hop move. */
export interface HopParams {
/** The velocity of the hop gait (X is forward; y is left)[m/s]. */
velocity: Vec2Value | undefined;
/** How fast the hop gait should turn [rad/s]. */
yawRate: number | undefined;
/** How long the robot should stand in between each hop. */
standTime: number | undefined;
}
/** Parameters specific to the RandomRotate move. */
export interface RandomRotateParams {
/** The amplitude [rad] of the rotation in each axis. */
amplitude: EulerZYXValue | undefined;
/** The speed [rad/s] of the motion in each axis. */
speed: EulerRateZYXValue | undefined;
/**
* The amount of variation allowed in the speed of the random rotations [m/s]. Note,
* this must be a positive value.
*/
speedVariation: number | undefined;
/**
* The specified speed values will be split into this many number of tiers between
* the bounds of [speed - speed_variation, speed + speed variation]. Then a tier (with
* a specified speed) will be randomly choosen and performed for each axis.
*/
numSpeedTiers: number | undefined;
/** How much can the output speed vary from the choosen tiered speed. */
tierVariation: number | undefined;
}
/** Parameters for the robot's crawling gait. */
export interface CrawlParams {
/** The number of slices (beats/sub-beats) the duration of a leg swing in the crawl gait should be. */
swingSlices: number | undefined;
/** The speed at which we should crawl [m/s]. X is forward. Y is left. */
velocity: Vec2Value | undefined;
/** The distance between the robot's left and right feet [m]. */
stanceWidth: number | undefined;
/** The distance between the robot's front and back feet [m]. */
stanceLength: number | undefined;
}
export interface GotoParams {
absolutePosition: Vec2Value | undefined;
absoluteYaw: number | undefined;
stepPositionStiffness: number | undefined;
dutyCycle: number | undefined;
/** Should we combine with the next move into a smooth trajectory. */
linkToNext: boolean | undefined;
}
/** Parameters for the Bourree move. */
export interface BourreeParams {
/** The speed at which we should bourree [m/s]. X is forward. Y is left. */
velocity: Vec2Value | undefined;
/** How fast the bourree should turn [rad/s]. */
yawRate: number | undefined;
/** How far apart front and hind feet should be. [m] */
stanceLength: number | undefined;
}
/** Parameters for moves that can go to either side. */
export interface SideParams {
side: SideParams_Side;
}
export enum SideParams_Side {
SIDE_UNKNOWN = 0,
SIDE_LEFT = 1,
SIDE_RIGHT = 2,
UNRECOGNIZED = -1,
}
export function sideParams_SideFromJSON(object: any): SideParams_Side {
switch (object) {
case 0:
case "SIDE_UNKNOWN":
return SideParams_Side.SIDE_UNKNOWN;
case 1:
case "SIDE_LEFT":
return SideParams_Side.SIDE_LEFT;
case 2:
case "SIDE_RIGHT":
return SideParams_Side.SIDE_RIGHT;
case -1:
case "UNRECOGNIZED":
default:
return SideParams_Side.UNRECOGNIZED;
}
}
export function sideParams_SideToJSON(object: SideParams_Side): string {
switch (object) {
case SideParams_Side.SIDE_UNKNOWN:
return "SIDE_UNKNOWN";
case SideParams_Side.SIDE_LEFT:
return "SIDE_LEFT";
case SideParams_Side.SIDE_RIGHT:
return "SIDE_RIGHT";
case SideParams_Side.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
/** Parameters for the robot making a jump. */
export interface JumpParams {
/** The amount in radians that the robot will turn while in the air. */
yaw: number | undefined;
/** The amount of time in slices (beats) that the robot will be in the air. */
flightSlices: number | undefined;
/** The distance between the robot's left and right feet [m]. */
stanceWidth: number | undefined;
/** The distance between the robot's front and back feet [m]. */
stanceLength: number | undefined;
/** How far the robot should jump [m]. */
translation: Vec2Value | undefined;
/** How much it should lo/td the first pair of lets ahead of the other pair. In fraction of flight time. */
splitFraction: number | undefined;
leadLegPair: JumpParams_Lead;
/** Should we turn to a yaw in choreography sequence frame? */
yawIsAbsolute: boolean | undefined;
/** Should we translate in choreography sequence frame? */
translationIsAbsolute: boolean | undefined;
/** The direction the robot should face upon landing relative to pose at the start of the dance. [rad] */
absoluteYaw: number | undefined;
/** Where the robot should land relative to the pose at the start of the dance. [m] */
absoluteTranslation: Vec2Value | undefined;
swingHeight: number | undefined;
/**
* ** Deprecation Warning ***
* DEPRECATED as of 3.0.0: The absolute field has been deprecated and split into the yaw_is_absolute and translation_is_absolute fields.
* The following field will be deprecated and moved to 'reserved' in a future release.
*
* @deprecated
*/
absolute: boolean | undefined;
}
/** If split_fraction is non-zero, which legs to lift first. */
export enum JumpParams_Lead {
LEAD_UNKNOWN = 0,
LEAD_AUTO = 1,
LEAD_FRONT = 2,
LEAD_HIND = 3,
LEAD_LEFT = 4,
LEAD_RIGHT = 5,
UNRECOGNIZED = -1,
}
export function jumpParams_LeadFromJSON(object: any): JumpParams_Lead {
switch (object) {
case 0:
case "LEAD_UNKNOWN":
return JumpParams_Lead.LEAD_UNKNOWN;
case 1:
case "LEAD_AUTO":
return JumpParams_Lead.LEAD_AUTO;
case 2:
case "LEAD_FRONT":
return JumpParams_Lead.LEAD_FRONT;
case 3:
case "LEAD_HIND":
return JumpParams_Lead.LEAD_HIND;
case 4:
case "LEAD_LEFT":
return JumpParams_Lead.LEAD_LEFT;
case 5:
case "LEAD_RIGHT":
return JumpParams_Lead.LEAD_RIGHT;
case -1:
case "UNRECOGNIZED":
default:
return JumpParams_Lead.UNRECOGNIZED;
}
}
export function jumpParams_LeadToJSON(object: JumpParams_Lead): string {
switch (object) {
case JumpParams_Lead.LEAD_UNKNOWN:
return "LEAD_UNKNOWN";
case JumpParams_Lead.LEAD_AUTO:
return "LEAD_AUTO";
case JumpParams_Lead.LEAD_FRONT:
return "LEAD_FRONT";
case JumpParams_Lead.LEAD_HIND:
return "LEAD_HIND";
case JumpParams_Lead.LEAD_LEFT:
return "LEAD_LEFT";
case JumpParams_Lead.LEAD_RIGHT:
return "LEAD_RIGHT";
case JumpParams_Lead.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface StepParams {
/** Which foot to use (FL = 1, FR = 2, HL = 3, HR = 4). */
foot: Leg;
/** Offset of the foot from it's nominal position, in meters. */
offset: Vec2Value | undefined;
/** Should we use a second foot? (None = 0, FL = 1, FR = 2, HL = 3, HR = 4). */
secondFoot: Leg;
/**
* Where should the swing foot go? This vector should be described in a gravity-aligned body frame
* relative to the centerpoint of the swing. If set to {0,0,0}, uses the default swing path.
*/
swingWaypoint: Vec3Value | undefined;
/**
* Parameters for altering swing.
* Note that these will have no effect if swing_waypoint is specified. As well, a zero (or nearly zero)
* value will be considered as an unspecified parameter.
*/
swingHeight: number | undefined;
/** m/s */
liftoffVelocity: number | undefined;
/** m/s */
touchdownVelocity: number | undefined;
/**
* Should we mirror the offset for the second foot?
* Ignored if second_foot is set to None
*/
mirrorX: boolean | undefined;
mirrorY: boolean | undefined;
/**
* ** Deprecation Warning ***
* DEPRECATED as of 2.3.0: The mirror field has been deprecated in favor for a more descriptive
* break down to mirror_x and mirror_y.
* The following field will be deprecated and moved to 'reserved' in a future release.
*
* @deprecated
*/
mirror: boolean | undefined;
/** What fraction of the swing should be spent near the waypoint. */
waypointDwell: number | undefined;
/** Should we touch the ground and come back rather than stepping to a new place? */
touch: boolean | undefined;
touchOffset: Vec2Value | undefined;
}
/** Parameters for the robot rotating the body. */
export interface RotateBodyParams {
/** The robot will rotate its body to the specified orientation (roll/pitch/yaw). */
rotation: EulerZYXValue | undefined;
/**
* If true, the robot will transition back to the initial pose we started at before this choreography sequence move begin execution,
* and otherwise it will remain in whatever pose it is in after completing the choreography sequence move.
*/
returnToStartPose: boolean | undefined;
}
/** Parameters specific to the ButtCircle DanceMove. */
export interface ButtCircleParams {
/** How big a circle the robutt will move in. Described in meters. */
radius: number | undefined;
/** The number of beats that elapse while performing the butt circle. */
beatsPerCircle: number | undefined;
/** The number of circles that will be performed. If non-zero, takes precedence over beats_per_circle. */
numberOfCircles: number | undefined;
/** The pivot point the butt circles should be centered around. */
pivot: Pivot;
/** Which way to rotate. */
clockwise: boolean | undefined;
/** Where to start. Zero is up. */
startingAngle: number | undefined;
}
/** Parameters specific to twerking */
export interface TwerkParams {
/** How far the robot should twerk in meters. */
height: number | undefined;
}
/** Parameters specific to turning. */
export interface TurnParams {
/** How far to turn, described in radians with a positive value representing a turn to the left. */
yaw: number | undefined;
/** Orientation to turn to, relative to the orientation at the start of the script. [rad] */
absoluteYaw: number | undefined;
/** Should we turn to a yaw in choreography sequence frame? */
yawIsAbsolute: boolean | undefined;
/**
* Swing parameters to describe the footstep pattern during the turning [height in meters]. Note,
* a zero (or nearly zero) value will be considered as an unspecified parameter.
*/
swingHeight: number | undefined;
/**
* Swing parameter to describe the foot's swing velocity during the turning [m/s]. Note, a zero
* (or nearly zero) value will be considered as an unspecified parameter.
*/
swingVelocity: number | undefined;
/** How far to move relative to starting position. [m] */
motion: Vec2Value | undefined;
/** Where to move relative to position at start of script. [m] */
absoluteMotion: Vec2Value | undefined;
/** Is motion specified relative to pose at start of dance? */
motionIsAbsolute: boolean | undefined;
/**
* ** Deprecation Warning ***
* DEPRECATED as of 3.0.0: The absolute field has been deprecated and split into the yaw_is_absolute and translation_is_absolute fields.
* The following field will be deprecated and moved to 'reserved' in a future release.
*
* @deprecated
*/
absolute: boolean | undefined;
}
/** Parameters specific to pace translation. */
export interface Pace2StepParams {
/** How far to move relative to starting position. [m] */
motion: Vec2Value | undefined;
/** Where to move relative to position at start of script. [m] */
absoluteMotion: Vec2Value | undefined;
/** Is motion specified relative to pose at start of dance? */
motionIsAbsolute: boolean | undefined;
/**
* Swing parameters to describe the footstep pattern during the pace translation gait. Note, a zero (or nearly zero)
* value will be considered as an unspecified parameter.
*/
swingHeight: number | undefined;
swingVelocity: number | undefined;
/** How far to turn, described in radians with a positive value representing a turn to the left. */
yaw: number | undefined;
/** Orientation to turn to, relative to the orientation at the start of the script. [rad] */
absoluteYaw: number | undefined;
/** Should we turn to a yaw in choreography sequence frame? */
yawIsAbsolute: boolean | undefined;
/**
* ** Deprecation Warning ***
* DEPRECATED as of 3.0.0: The absolute field has been deprecated and split into the yaw_is_absolute and translation_is_absolute fields.
* The following field will be deprecated and moved to 'reserved' in a future release.
*/
absolute: boolean | undefined;
}
/** Parameters specific to the chicken head move. */
export interface ChickenHeadParams {
/** Bobs the head in this direction in the robot footprint frame. */
bobMagnitude: Vec3Value | undefined;
/** How fast to bob the head. */
beatsPerCycle: number | undefined;
/** Should we move the frame when the robot steps? */
follow: boolean | undefined;
}
/** Parameters specific to clapping. */
export interface ClapParams {
/** Direction in a gravity-aligned body frame of clapping motion. A typical value for the location is (0, 1, 0). */
direction: Vec3Value | undefined;
/** Location in body frame of the clap. A typical value for the location is (0.4, 0, -0.5). */
location: Vec3Value | undefined;
/** Speed of the clap [m/s]. */
speed: number | undefined;
/** How far apart the limbs are before clapping [m]. */
clapDistance: number | undefined;
}
/** Parameters specific to the kneel_circles move. */
export interface KneelCircleParams {
/** Location in body frame of the circle center. A typical value for the location is (0.4, 0, -0.5). */
location: Vec3Value | undefined;
/** How beats per circle. One or two are reasonable values. */
beatsPerCircle: number | undefined;
/** How many circles to perform. Mutually exclusive with beats_per_circle. */
numberOfCircles: number | undefined;
/** How far apart the feet are when circling [m]. */
offset: number | undefined;
/** Size of the circles [m]. */
radius: number | undefined;
/** Which way to circle. */
reverse: boolean | undefined;
}
/** Parameters specific to FrontUp move. */
export interface FrontUpParams {
/** Should we raise the hind feet instead. */
mirror: boolean | undefined;
}
export interface FidgetStandParams {
preset: FidgetStandParams_FidgetPreset;
minGazePitch: number | undefined;
maxGazePitch: number | undefined;
gazeMeanPeriod: number | undefined;
gazeCenterCfp: Vec3Value | undefined;
shiftMeanPeriod: number | undefined;
shiftMaxTransitionTime: number | undefined;
breathMinZ: number | undefined;
breathMaxZ: number | undefined;
breathMaxPeriod: number | undefined;
legGestureMeanPeriod: number | undefined;
gazeSlewRate: number | undefined;
gazePositionGenerationGain: Vec3Value | undefined;
gazeRollGenerationGain: number | undefined;
}
export enum FidgetStandParams_FidgetPreset {
PRESET_UNKNOWN = 0,
PRESET_CUSTOM = 1,
PRESET_INTEREST = 2,
PRESET_PLAYFUL = 3,
PRESET_FEAR = 4,
PRESET_NERVOUS = 5,
PRESET_EXHAUSTED = 6,
UNRECOGNIZED = -1,
}
export function fidgetStandParams_FidgetPresetFromJSON(
object: any
): FidgetStandParams_FidgetPreset {
switch (object) {
case 0:
case "PRESET_UNKNOWN":
return FidgetStandParams_FidgetPreset.PRESET_UNKNOWN;
case 1:
case "PRESET_CUSTOM":
return FidgetStandParams_FidgetPreset.PRESET_CUSTOM;
case 2:
case "PRESET_INTEREST":
return FidgetStandParams_FidgetPreset.PRESET_INTEREST;
case 3:
case "PRESET_PLAYFUL":
return FidgetStandParams_FidgetPreset.PRESET_PLAYFUL;
case 4:
case "PRESET_FEAR":
return FidgetStandParams_FidgetPreset.PRESET_FEAR;
case 5:
case "PRESET_NERVOUS":
return FidgetStandParams_FidgetPreset.PRESET_NERVOUS;
case 6:
case "PRESET_EXHAUSTED":
return FidgetStandParams_FidgetPreset.PRESET_EXHAUSTED;
case -1:
case "UNRECOGNIZED":
default:
return FidgetStandParams_FidgetPreset.UNRECOGNIZED;
}
}
export function fidgetStandParams_FidgetPresetToJSON(
object: FidgetStandParams_FidgetPreset
): string {
switch (object) {
case FidgetStandParams_FidgetPreset.PRESET_UNKNOWN:
return "PRESET_UNKNOWN";
case FidgetStandParams_FidgetPreset.PRESET_CUSTOM:
return "PRESET_CUSTOM";
case FidgetStandParams_FidgetPreset.PRESET_INTEREST:
return "PRESET_INTEREST";
case FidgetStandParams_FidgetPreset.PRESET_PLAYFUL:
return "PRESET_PLAYFUL";
case FidgetStandParams_FidgetPreset.PRESET_FEAR:
return "PRESET_FEAR";
case FidgetStandParams_FidgetPreset.PRESET_NERVOUS:
return "PRESET_NERVOUS";
case FidgetStandParams_FidgetPreset.PRESET_EXHAUSTED:
return "PRESET_EXHAUSTED";
case FidgetStandParams_FidgetPreset.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface FrameSnapshotParams {
frameId: number | undefined;
fiducialNumber: number | undefined;
includeFrontLeftLeg: FrameSnapshotParams_Inclusion;
includeFrontRightLeg: FrameSnapshotParams_Inclusion;
includeHindLeftLeg: FrameSnapshotParams_Inclusion;
includeHindRightLeg: FrameSnapshotParams_Inclusion;
compensated: boolean | undefined;
}
export enum FrameSnapshotParams_Inclusion {
INCLUSION_UNKNOWN = 0,
INCLUSION_IF_STANCE = 1,
INCLUSION_INCLUDED = 2,
INCLUSION_EXCLUDED = 3,
UNRECOGNIZED = -1,
}
export function frameSnapshotParams_InclusionFromJSON(
object: any
): FrameSnapshotParams_Inclusion {
switch (object) {
case 0:
case "INCLUSION_UNKNOWN":
return FrameSnapshotParams_Inclusion.INCLUSION_UNKNOWN;
case 1:
case "INCLUSION_IF_STANCE":
return FrameSnapshotParams_Inclusion.INCLUSION_IF_STANCE;
case 2:
case "INCLUSION_INCLUDED":
return FrameSnapshotParams_Inclusion.INCLUSION_INCLUDED;
case 3:
case "INCLUSION_EXCLUDED":
return FrameSnapshotParams_Inclusion.INCLUSION_EXCLUDED;
case -1:
case "UNRECOGNIZED":
default:
return FrameSnapshotParams_Inclusion.UNRECOGNIZED;
}
}
export function frameSnapshotParams_InclusionToJSON(
object: FrameSnapshotParams_Inclusion
): string {
switch (object) {
case FrameSnapshotParams_Inclusion.INCLUSION_UNKNOWN:
return "INCLUSION_UNKNOWN";
case FrameSnapshotParams_Inclusion.INCLUSION_IF_STANCE:
return "INCLUSION_IF_STANCE";
case FrameSnapshotParams_Inclusion.INCLUSION_INCLUDED:
return "INCLUSION_INCLUDED";
case FrameSnapshotParams_Inclusion.INCLUSION_EXCLUDED:
return "INCLUSION_EXCLUDED";
case FrameSnapshotParams_Inclusion.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface SetColorParams {
leftColor: Color | undefined;
rightSameAsLeft: boolean | undefined;
rightColor: Color | undefined;
fadeInSlices: number | undefined;
fadeOutSlices: number | undefined;
}
export interface FadeColorParams {
topColor: Color | undefined;
bottomColor: Color | undefined;
fadeInSlices: number | undefined;
fadeOutSlices: number | undefined;
}
export interface IndependentColorParams {
topLeft: Color | undefined;
upperMidLeft: Color | undefined;
lowerMidLeft: Color | undefined;
bottomLeft: Color | undefined;
topRight: Color | undefined;
upperMidRight: Color | undefined;
lowerMidRight: Color | undefined;
bottomRight: Color | undefined;
fadeInSlices: number | undefined;
fadeOutSlices: number | undefined;
}
export interface Color {
red: number | undefined;
green: number | undefined;
blue: number | undefined;
}
export interface RippleColorParams {
main: Color | undefined;
secondary: Color | undefined;
pattern: RippleColorParams_Pattern;
lightSide: RippleColorParams_LightSide;
incrementSlices: number | undefined;
}
export enum RippleColorParams_Pattern {
PATTERN_UNKNOWN = 0,
PATTERN_FLASHING = 1,
PATTERN_SNAKE = 2,
PATTERN_ALTERNATE_COLORS = 3,
PATTERN_FINE_GRAINED_ALTERNATE_COLORS = 4,
UNRECOGNIZED = -1,
}
export function rippleColorParams_PatternFromJSON(
object: any
): RippleColorParams_Pattern {
switch (object) {
case 0:
case "PATTERN_UNKNOWN":
return RippleColorParams_Pattern.PATTERN_UNKNOWN;
case 1:
case "PATTERN_FLASHING":
return RippleColorParams_Pattern.PATTERN_FLASHING;
case 2:
case "PATTERN_SNAKE":
return RippleColorParams_Pattern.PATTERN_SNAKE;
case 3:
case "PATTERN_ALTERNATE_COLORS":
return RippleColorParams_Pattern.PATTERN_ALTERNATE_COLORS;
case 4:
case "PATTERN_FINE_GRAINED_ALTERNATE_COLORS":
return RippleColorParams_Pattern.PATTERN_FINE_GRAINED_ALTERNATE_COLORS;
case -1:
case "UNRECOGNIZED":
default:
return RippleColorParams_Pattern.UNRECOGNIZED;
}
}
export function rippleColorParams_PatternToJSON(
object: RippleColorParams_Pattern
): string {
switch (object) {
case RippleColorParams_Pattern.PATTERN_UNKNOWN:
return "PATTERN_UNKNOWN";
case RippleColorParams_Pattern.PATTERN_FLASHING:
return "PATTERN_FLASHING";
case RippleColorParams_Pattern.PATTERN_SNAKE:
return "PATTERN_SNAKE";
case RippleColorParams_Pattern.PATTERN_ALTERNATE_COLORS:
return "PATTERN_ALTERNATE_COLORS";
case RippleColorParams_Pattern.PATTERN_FINE_GRAINED_ALTERNATE_COLORS:
return "PATTERN_FINE_GRAINED_ALTERNATE_COLORS";
case RippleColorParams_Pattern.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export enum RippleColorParams_LightSide {
LIGHT_SIDE_UNKNOWN = 0,
LIGHT_SIDE_LEFT = 1,
LIGHT_SIDE_RIGHT = 2,
LIGHT_SIDE_BOTH_IN_SEQUENCE = 3,
LIGHT_SIDE_BOTH_MATCHING = 4,
UNRECOGNIZED = -1,
}
export function rippleColorParams_LightSideFromJSON(
object: any
): RippleColorParams_LightSide {
switch (object) {
case 0:
case "LIGHT_SIDE_UNKNOWN":
return RippleColorParams_LightSide.LIGHT_SIDE_UNKNOWN;
case 1:
case "LIGHT_SIDE_LEFT":
return RippleColorParams_LightSide.LIGHT_SIDE_LEFT;
case 2:
case "LIGHT_SIDE_RIGHT":
return RippleColorParams_LightSide.LIGHT_SIDE_RIGHT;
case 3:
case "LIGHT_SIDE_BOTH_IN_SEQUENCE":
return RippleColorParams_LightSide.LIGHT_SIDE_BOTH_IN_SEQUENCE;
case 4:
case "LIGHT_SIDE_BOTH_MATCHING":
return RippleColorParams_LightSide.LIGHT_SIDE_BOTH_MATCHING;
case -1:
case "UNRECOGNIZED":
default:
return RippleColorParams_LightSide.UNRECOGNIZED;
}
}
export function rippleColorParams_LightSideToJSON(
object: RippleColorParams_LightSide
): string {
switch (object) {
case RippleColorParams_LightSide.LIGHT_SIDE_UNKNOWN:
return "LIGHT_SIDE_UNKNOWN";
case RippleColorParams_LightSide.LIGHT_SIDE_LEFT:
return "LIGHT_SIDE_LEFT";
case RippleColorParams_LightSide.LIGHT_SIDE_RIGHT:
return "LIGHT_SIDE_RIGHT";
case RippleColorParams_LightSide.LIGHT_SIDE_BOTH_IN_SEQUENCE:
return "LIGHT_SIDE_BOTH_IN_SEQUENCE";
case RippleColorParams_LightSide.LIGHT_SIDE_BOTH_MATCHING:
return "LIGHT_SIDE_BOTH_MATCHING";
case RippleColorParams_LightSide.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
export interface AnimateParams {
/** The name of the animated move. There are no default values/bounds associated with this field. */
animationName: string;
/** How many slices to smoothly transition from previous pose to animation. */
bodyEntrySlices: number | undefined;
/** How many slices to return from animation to nominal pose. Zero indicates to keep final animated pose. */
bodyExitSlices: number | undefined;
/** Multiplier for animated translation by axis to exaggerate or suppress motion along specific axes. */
translationMultiplier: Vec3Value | undefined;
/** Multiplier for the animated orientation by axis to exaggerate or suppress motion along specific axes. */
rotationMultiplier: EulerZYXValue | undefined;
/** How many slices to smoothly transition from previous pose to animation. */
armEntrySlices: number | undefined;
/** Joint angle offsets in radians for the arm joints. */
shoulder0Offset: number | undefined;
shoulder1Offset: number | undefined;
elbow0Offset: number | undefined;
elbow1Offset: number | undefined;
wrist0Offset: number | undefined;
wrist1Offset: number | undefined;
gripperOffset: number | undefined;
/** How fast to playback. 1.0 is normal speed. larger is faster. */
speed: number | undefined;
/** How late into the nominal script to start. */
offsetSlices: number | undefined;
/** Multiply all gripper angles by this value. */
gripperMultiplier: number | undefined;
/** How hard the gripper can squeeze. Fraction of full strength. */
gripperStrengthFraction: number | undefined;
/**
* Which dance frame to use as a reference for workspace arm moves. Including this parameter
* overrides the animation frame.
*/
armDanceFrameId: number | undefined;
/**
* How hard to try to track the animated body motion.
* Only applicable to animations that control both the body and the legs.
* On a scale of 1 to 10 (11 for a bit extra).
* Higher will result in more closely tracking the animated body motion, but possibly at the expense of balance for more difficult animations.
*/
bodyTrackingStiffness: number | undefined;
}
function createBaseEulerZYXValue(): EulerZYXValue {
return { roll: undefined, pitch: undefined, yaw: undefined };
}
export const EulerZYXValue = {
encode(
message: EulerZYXValue,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.roll !== undefined) {
DoubleValue.encode(
{ value: message.roll! },
writer.uint32(10).fork()
).ldelim();
}
if (message.pitch !== undefined) {
DoubleValue.encode(
{ value: message.pitch! },
writer.uint32(18).fork()
).ldelim();
}
if (message.yaw !== undefined) {
DoubleValue.encode(
{ value: message.yaw! },
writer.uint32(26).fork()
).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): EulerZYXValue {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseEulerZYXValue();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.roll = DoubleValue.decode(reader, reader.uint32()).value;
break;
case 2:
message.pitch = DoubleValue.decode(reader, reader.uint32()).value;
break;
case 3:
message.yaw = DoubleValue.decode(reader, reader.uint32()).value;
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): EulerZYXValue {
return {
roll: isSet(object.roll) ? Number(object.roll) : undefined,
pitch: isSet(object.pitch) ? Number(object.pitch) : undefined,
yaw: isSet(object.yaw) ? Number(object.yaw) : undefined,
};
},
toJSON(message: EulerZYXValue): unknown {
const obj: any = {};
message.roll !== undefined && (obj.roll = message.roll);
message.pitch !== undefined && (obj.pitch = message.pitch);
message.yaw !== undefined && (obj.yaw = message.yaw);
return obj;
},
fromPartial<I extends Exact<DeepPartial<EulerZYXValue>, I>>(
object: I
): EulerZYXValue {
const message = createBaseEulerZYXValue();
message.roll = object.roll ?? undefined;
message.pitch = object.pitch ?? undefined;
message.yaw = object.yaw ?? undefined;
return message;
},
};
function createBaseEulerRateZYXValue(): EulerRateZYXValue {
return { roll: undefined, pitch: undefined, yaw: undefined };
}
export const EulerRateZYXValue = {
encode(
message: EulerRateZYXValue,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.roll !== undefined) {
DoubleValue.encode(
{ value: message.roll! },
writer.uint32(10).fork()
).ldelim();
}
if (message.pitch !== undefined) {
DoubleValue.encode(
{ value: message.pitch! },
writer.uint32(18).fork()
).ldelim();
}
if (message.yaw !== undefined) {
DoubleValue.encode(
{ value: message.yaw! },
writer.uint32(26).fork()
).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): EulerRateZYXValue {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseEulerRateZYXValue();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.roll = DoubleValue.decode(reader, reader.uint32()).value;
break;
case 2:
message.pitch = DoubleValue.decode(reader, reader.uint32()).value;
break;
case 3:
message.yaw = DoubleValue.decode(reader, reader.uint32()).value;
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): EulerRateZYXValue {
return {
roll: isSet(object.roll) ? Number(object.roll) : undefined,
pitch: isSet(object.pitch) ? Number(object.pitch) : undefined,
yaw: isSet(object.yaw) ? Number(object.yaw) : undefined,
};
},
toJSON(message: EulerRateZYXValue): unknown {
const obj: any = {};
message.roll !== undefined && (obj.roll = message.roll);
message.pitch !== undefined && (obj.pitch = message.pitch);
message.yaw !== undefined && (obj.yaw = message.yaw);
return obj;
},
fromPartial<I extends Exact<DeepPartial<EulerRateZYXValue>, I>>(
object: I
): EulerRateZYXValue {
const message = createBaseEulerRateZYXValue();
message.roll = object.roll ?? undefined;
message.pitch = object.pitch ?? undefined;
message.yaw = object.yaw ?? undefined;
return message;
},
};
function createBaseBodyHoldParams(): BodyHoldParams {
return {
rotation: undefined,
translation: undefined,
entrySlices: undefined,
exitSlices: undefined,
};
}
export const BodyHoldParams = {
encode(
message: BodyHoldParams,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.rotation !== undefined) {
EulerZYXValue.encode(message.rotation, writer.uint32(10).fork()).ldelim();
}
if (message.translation !== undefined) {
Vec3Value.encode(message.translation, writer.uint32(18).fork()).ldelim();
}
if (message.entrySlices !== undefined) {
DoubleValue.encode(
{ value: message.entrySlices! },
writer.uint32(26).fork()
).ldelim();
}
if (message.exitSlices !== undefined) {
DoubleValue.encode(
{ value: message.exitSlices! },
writer.uint32(34).fork()
).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): BodyHoldParams {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseBodyHoldParams();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.rotation = EulerZYXValue.decode(reader, reader.uint32());
break;
case 2:
message.translation = Vec3Value.decode(reader, reader.uint32());
break;
case 3:
message.entrySlices = DoubleValue.decode(
reader,
reader.uint32()
).value;
break;
case 4:
message.exitSlices = DoubleValue.decode(
reader,
reader.uint32()
).value;
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): BodyHoldParams {
return {
rotation: isSet(object.rotation)
? EulerZYXValue.fromJSON(object.rotation)
: undefined,
translation: isSet(object.translation)
? Vec3Value.fromJSON(object.translation)
: undefined,
entrySlices: isSet(object.entrySlices)
? Number(object.entrySlices)
: undefined,
exitSlices: isSet(object.exitSlices)
? Number(object.exitSlices)
: undefined,
};
},
toJSON(message: BodyHoldParams): unknown {
const obj: any = {};
message.rotation !== undefined &&
(obj.rotation = message.rotation
? EulerZYXValue.toJSON(message.rotation)
: undefined);
message.translation !== undefined &&
(obj.translation = message.translation
? Vec3Value.toJSON(message.translation)
: undefined);
message.entrySlices !== undefined &&
(obj.entrySlices = message.entrySlices);
message.exitSlices !== undefined && (obj.exitSlices = message.exitSlices);
return obj;
},
fromPartial<I extends Exact<DeepPartial<BodyHoldParams>, I>>(
object: I
): BodyHoldParams {
const message = createBaseBodyHoldParams();
message.rotation =
object.rotation !== undefined && object.rotation !== null
? EulerZYXValue.fromPartial(object.rotation)
: undefined;
message.translation =
object.translation !== undefined && object.translation !== null
? Vec3Value.fromPartial(object.translation)
: undefined;
message.entrySlices = object.entrySlices ?? undefined;
message.exitSlices = object.exitSlices ?? undefined;
return message;
},
};
function createBaseSwayParams(): SwayParams {
return {
verti