spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
1,571 lines (1,360 loc) • 51.8 kB
JavaScript
// source: bosdyn/api/spot/robot_command.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var bosdyn_api_geometry_pb = require('../../../bosdyn/api/geometry_pb.js');
goog.object.extend(proto, bosdyn_api_geometry_pb);
var bosdyn_api_trajectory_pb = require('../../../bosdyn/api/trajectory_pb.js');
goog.object.extend(proto, bosdyn_api_trajectory_pb);
var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
goog.object.extend(proto, google_protobuf_wrappers_pb);
goog.exportSymbol('proto.bosdyn.api.spot.BodyControlParams', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.BodyControlParams.RotationSetting', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.BodyExternalForceParams', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.LocomotionHint', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.MobilityParams', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.ObstacleParams', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.SwingHeight', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.TerrainParams', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot.MobilityParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.MobilityParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.MobilityParams.displayName = 'proto.bosdyn.api.spot.MobilityParams';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot.BodyControlParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.BodyControlParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.BodyControlParams.displayName = 'proto.bosdyn.api.spot.BodyControlParams';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot.ObstacleParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.ObstacleParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.ObstacleParams.displayName = 'proto.bosdyn.api.spot.ObstacleParams';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot.TerrainParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.TerrainParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.TerrainParams.displayName = 'proto.bosdyn.api.spot.TerrainParams';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot.BodyExternalForceParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.BodyExternalForceParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.BodyExternalForceParams.displayName = 'proto.bosdyn.api.spot.BodyExternalForceParams';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.MobilityParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot.MobilityParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.MobilityParams.toObject = function(includeInstance, msg) {
var f, obj = {
velLimit: (f = msg.getVelLimit()) && bosdyn_api_geometry_pb.SE2VelocityLimit.toObject(includeInstance, f),
bodyControl: (f = msg.getBodyControl()) && proto.bosdyn.api.spot.BodyControlParams.toObject(includeInstance, f),
locomotionHint: jspb.Message.getFieldWithDefault(msg, 3, 0),
stairHint: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
allowDegradedPerception: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
obstacleParams: (f = msg.getObstacleParams()) && proto.bosdyn.api.spot.ObstacleParams.toObject(includeInstance, f),
swingHeight: jspb.Message.getFieldWithDefault(msg, 7, 0),
terrainParams: (f = msg.getTerrainParams()) && proto.bosdyn.api.spot.TerrainParams.toObject(includeInstance, f),
disallowStairTracker: jspb.Message.getBooleanFieldWithDefault(msg, 9, false),
externalForceParams: (f = msg.getExternalForceParams()) && proto.bosdyn.api.spot.BodyExternalForceParams.toObject(includeInstance, f),
disallowNonStairsPitchLimiting: jspb.Message.getBooleanFieldWithDefault(msg, 11, false),
disableNearmapCliffAvoidance: jspb.Message.getBooleanFieldWithDefault(msg, 12, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot.MobilityParams}
*/
proto.bosdyn.api.spot.MobilityParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.MobilityParams;
return proto.bosdyn.api.spot.MobilityParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.MobilityParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.MobilityParams}
*/
proto.bosdyn.api.spot.MobilityParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_geometry_pb.SE2VelocityLimit;
reader.readMessage(value,bosdyn_api_geometry_pb.SE2VelocityLimit.deserializeBinaryFromReader);
msg.setVelLimit(value);
break;
case 2:
var value = new proto.bosdyn.api.spot.BodyControlParams;
reader.readMessage(value,proto.bosdyn.api.spot.BodyControlParams.deserializeBinaryFromReader);
msg.setBodyControl(value);
break;
case 3:
var value = /** @type {!proto.bosdyn.api.spot.LocomotionHint} */ (reader.readEnum());
msg.setLocomotionHint(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setStairHint(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAllowDegradedPerception(value);
break;
case 6:
var value = new proto.bosdyn.api.spot.ObstacleParams;
reader.readMessage(value,proto.bosdyn.api.spot.ObstacleParams.deserializeBinaryFromReader);
msg.setObstacleParams(value);
break;
case 7:
var value = /** @type {!proto.bosdyn.api.spot.SwingHeight} */ (reader.readEnum());
msg.setSwingHeight(value);
break;
case 8:
var value = new proto.bosdyn.api.spot.TerrainParams;
reader.readMessage(value,proto.bosdyn.api.spot.TerrainParams.deserializeBinaryFromReader);
msg.setTerrainParams(value);
break;
case 9:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisallowStairTracker(value);
break;
case 10:
var value = new proto.bosdyn.api.spot.BodyExternalForceParams;
reader.readMessage(value,proto.bosdyn.api.spot.BodyExternalForceParams.deserializeBinaryFromReader);
msg.setExternalForceParams(value);
break;
case 11:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisallowNonStairsPitchLimiting(value);
break;
case 12:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableNearmapCliffAvoidance(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.MobilityParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot.MobilityParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.MobilityParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVelLimit();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_geometry_pb.SE2VelocityLimit.serializeBinaryToWriter
);
}
f = message.getBodyControl();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot.BodyControlParams.serializeBinaryToWriter
);
}
f = message.getLocomotionHint();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getStairHint();
if (f) {
writer.writeBool(
4,
f
);
}
f = message.getAllowDegradedPerception();
if (f) {
writer.writeBool(
5,
f
);
}
f = message.getObstacleParams();
if (f != null) {
writer.writeMessage(
6,
f,
proto.bosdyn.api.spot.ObstacleParams.serializeBinaryToWriter
);
}
f = message.getSwingHeight();
if (f !== 0.0) {
writer.writeEnum(
7,
f
);
}
f = message.getTerrainParams();
if (f != null) {
writer.writeMessage(
8,
f,
proto.bosdyn.api.spot.TerrainParams.serializeBinaryToWriter
);
}
f = message.getDisallowStairTracker();
if (f) {
writer.writeBool(
9,
f
);
}
f = message.getExternalForceParams();
if (f != null) {
writer.writeMessage(
10,
f,
proto.bosdyn.api.spot.BodyExternalForceParams.serializeBinaryToWriter
);
}
f = message.getDisallowNonStairsPitchLimiting();
if (f) {
writer.writeBool(
11,
f
);
}
f = message.getDisableNearmapCliffAvoidance();
if (f) {
writer.writeBool(
12,
f
);
}
};
/**
* optional bosdyn.api.SE2VelocityLimit vel_limit = 1;
* @return {?proto.bosdyn.api.SE2VelocityLimit}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getVelLimit = function() {
return /** @type{?proto.bosdyn.api.SE2VelocityLimit} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE2VelocityLimit, 1));
};
/**
* @param {?proto.bosdyn.api.SE2VelocityLimit|undefined} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setVelLimit = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.clearVelLimit = function() {
return this.setVelLimit(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.hasVelLimit = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional BodyControlParams body_control = 2;
* @return {?proto.bosdyn.api.spot.BodyControlParams}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getBodyControl = function() {
return /** @type{?proto.bosdyn.api.spot.BodyControlParams} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.BodyControlParams, 2));
};
/**
* @param {?proto.bosdyn.api.spot.BodyControlParams|undefined} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setBodyControl = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.clearBodyControl = function() {
return this.setBodyControl(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.hasBodyControl = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional LocomotionHint locomotion_hint = 3;
* @return {!proto.bosdyn.api.spot.LocomotionHint}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getLocomotionHint = function() {
return /** @type {!proto.bosdyn.api.spot.LocomotionHint} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.bosdyn.api.spot.LocomotionHint} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setLocomotionHint = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional bool stair_hint = 4;
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getStairHint = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setStairHint = function(value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* optional bool allow_degraded_perception = 5;
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getAllowDegradedPerception = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setAllowDegradedPerception = function(value) {
return jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* optional ObstacleParams obstacle_params = 6;
* @return {?proto.bosdyn.api.spot.ObstacleParams}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getObstacleParams = function() {
return /** @type{?proto.bosdyn.api.spot.ObstacleParams} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.ObstacleParams, 6));
};
/**
* @param {?proto.bosdyn.api.spot.ObstacleParams|undefined} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setObstacleParams = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.clearObstacleParams = function() {
return this.setObstacleParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.hasObstacleParams = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional SwingHeight swing_height = 7;
* @return {!proto.bosdyn.api.spot.SwingHeight}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getSwingHeight = function() {
return /** @type {!proto.bosdyn.api.spot.SwingHeight} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {!proto.bosdyn.api.spot.SwingHeight} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setSwingHeight = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
/**
* optional TerrainParams terrain_params = 8;
* @return {?proto.bosdyn.api.spot.TerrainParams}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getTerrainParams = function() {
return /** @type{?proto.bosdyn.api.spot.TerrainParams} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.TerrainParams, 8));
};
/**
* @param {?proto.bosdyn.api.spot.TerrainParams|undefined} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setTerrainParams = function(value) {
return jspb.Message.setWrapperField(this, 8, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.clearTerrainParams = function() {
return this.setTerrainParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.hasTerrainParams = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional bool disallow_stair_tracker = 9;
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getDisallowStairTracker = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setDisallowStairTracker = function(value) {
return jspb.Message.setProto3BooleanField(this, 9, value);
};
/**
* optional BodyExternalForceParams external_force_params = 10;
* @return {?proto.bosdyn.api.spot.BodyExternalForceParams}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getExternalForceParams = function() {
return /** @type{?proto.bosdyn.api.spot.BodyExternalForceParams} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.BodyExternalForceParams, 10));
};
/**
* @param {?proto.bosdyn.api.spot.BodyExternalForceParams|undefined} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setExternalForceParams = function(value) {
return jspb.Message.setWrapperField(this, 10, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.clearExternalForceParams = function() {
return this.setExternalForceParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.hasExternalForceParams = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* optional bool disallow_non_stairs_pitch_limiting = 11;
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getDisallowNonStairsPitchLimiting = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setDisallowNonStairsPitchLimiting = function(value) {
return jspb.Message.setProto3BooleanField(this, 11, value);
};
/**
* optional bool disable_nearmap_cliff_avoidance = 12;
* @return {boolean}
*/
proto.bosdyn.api.spot.MobilityParams.prototype.getDisableNearmapCliffAvoidance = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.MobilityParams} returns this
*/
proto.bosdyn.api.spot.MobilityParams.prototype.setDisableNearmapCliffAvoidance = function(value) {
return jspb.Message.setProto3BooleanField(this, 12, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.BodyControlParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot.BodyControlParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.BodyControlParams.toObject = function(includeInstance, msg) {
var f, obj = {
baseOffsetRtFootprint: (f = msg.getBaseOffsetRtFootprint()) && bosdyn_api_trajectory_pb.SE3Trajectory.toObject(includeInstance, f),
rotationSetting: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot.BodyControlParams}
*/
proto.bosdyn.api.spot.BodyControlParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.BodyControlParams;
return proto.bosdyn.api.spot.BodyControlParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.BodyControlParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.BodyControlParams}
*/
proto.bosdyn.api.spot.BodyControlParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_trajectory_pb.SE3Trajectory;
reader.readMessage(value,bosdyn_api_trajectory_pb.SE3Trajectory.deserializeBinaryFromReader);
msg.setBaseOffsetRtFootprint(value);
break;
case 2:
var value = /** @type {!proto.bosdyn.api.spot.BodyControlParams.RotationSetting} */ (reader.readEnum());
msg.setRotationSetting(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.BodyControlParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot.BodyControlParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.BodyControlParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getBaseOffsetRtFootprint();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_trajectory_pb.SE3Trajectory.serializeBinaryToWriter
);
}
f = message.getRotationSetting();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.BodyControlParams.RotationSetting = {
ROTATION_SETTING_UNKNOWN: 0,
ROTATION_SETTING_OFFSET: 1,
ROTATION_SETTING_ABSOLUTE: 2
};
/**
* optional bosdyn.api.SE3Trajectory base_offset_rt_footprint = 1;
* @return {?proto.bosdyn.api.SE3Trajectory}
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.getBaseOffsetRtFootprint = function() {
return /** @type{?proto.bosdyn.api.SE3Trajectory} */ (
jspb.Message.getWrapperField(this, bosdyn_api_trajectory_pb.SE3Trajectory, 1));
};
/**
* @param {?proto.bosdyn.api.SE3Trajectory|undefined} value
* @return {!proto.bosdyn.api.spot.BodyControlParams} returns this
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.setBaseOffsetRtFootprint = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.BodyControlParams} returns this
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.clearBaseOffsetRtFootprint = function() {
return this.setBaseOffsetRtFootprint(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.hasBaseOffsetRtFootprint = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional RotationSetting rotation_setting = 2;
* @return {!proto.bosdyn.api.spot.BodyControlParams.RotationSetting}
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.getRotationSetting = function() {
return /** @type {!proto.bosdyn.api.spot.BodyControlParams.RotationSetting} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.spot.BodyControlParams.RotationSetting} value
* @return {!proto.bosdyn.api.spot.BodyControlParams} returns this
*/
proto.bosdyn.api.spot.BodyControlParams.prototype.setRotationSetting = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.ObstacleParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot.ObstacleParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.ObstacleParams.toObject = function(includeInstance, msg) {
var f, obj = {
disableVisionFootObstacleAvoidance: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
disableVisionFootConstraintAvoidance: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
disableVisionBodyObstacleAvoidance: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
obstacleAvoidancePadding: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
disableVisionFootObstacleBodyAssist: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
disableVisionNegativeObstacles: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot.ObstacleParams}
*/
proto.bosdyn.api.spot.ObstacleParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.ObstacleParams;
return proto.bosdyn.api.spot.ObstacleParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.ObstacleParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.ObstacleParams}
*/
proto.bosdyn.api.spot.ObstacleParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableVisionFootObstacleAvoidance(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableVisionFootConstraintAvoidance(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableVisionBodyObstacleAvoidance(value);
break;
case 4:
var value = /** @type {number} */ (reader.readDouble());
msg.setObstacleAvoidancePadding(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableVisionFootObstacleBodyAssist(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisableVisionNegativeObstacles(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.ObstacleParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot.ObstacleParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.ObstacleParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDisableVisionFootObstacleAvoidance();
if (f) {
writer.writeBool(
1,
f
);
}
f = message.getDisableVisionFootConstraintAvoidance();
if (f) {
writer.writeBool(
2,
f
);
}
f = message.getDisableVisionBodyObstacleAvoidance();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getObstacleAvoidancePadding();
if (f !== 0.0) {
writer.writeDouble(
4,
f
);
}
f = message.getDisableVisionFootObstacleBodyAssist();
if (f) {
writer.writeBool(
5,
f
);
}
f = message.getDisableVisionNegativeObstacles();
if (f) {
writer.writeBool(
6,
f
);
}
};
/**
* optional bool disable_vision_foot_obstacle_avoidance = 1;
* @return {boolean}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getDisableVisionFootObstacleAvoidance = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setDisableVisionFootObstacleAvoidance = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* optional bool disable_vision_foot_constraint_avoidance = 2;
* @return {boolean}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getDisableVisionFootConstraintAvoidance = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setDisableVisionFootConstraintAvoidance = function(value) {
return jspb.Message.setProto3BooleanField(this, 2, value);
};
/**
* optional bool disable_vision_body_obstacle_avoidance = 3;
* @return {boolean}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getDisableVisionBodyObstacleAvoidance = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setDisableVisionBodyObstacleAvoidance = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional double obstacle_avoidance_padding = 4;
* @return {number}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getObstacleAvoidancePadding = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setObstacleAvoidancePadding = function(value) {
return jspb.Message.setProto3FloatField(this, 4, value);
};
/**
* optional bool disable_vision_foot_obstacle_body_assist = 5;
* @return {boolean}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getDisableVisionFootObstacleBodyAssist = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setDisableVisionFootObstacleBodyAssist = function(value) {
return jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* optional bool disable_vision_negative_obstacles = 6;
* @return {boolean}
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.getDisableVisionNegativeObstacles = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.ObstacleParams} returns this
*/
proto.bosdyn.api.spot.ObstacleParams.prototype.setDisableVisionNegativeObstacles = function(value) {
return jspb.Message.setProto3BooleanField(this, 6, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.TerrainParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot.TerrainParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.TerrainParams.toObject = function(includeInstance, msg) {
var f, obj = {
groundMuHint: (f = msg.getGroundMuHint()) && google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, f),
enableGratedFloor: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
gratedSurfacesMode: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot.TerrainParams}
*/
proto.bosdyn.api.spot.TerrainParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.TerrainParams;
return proto.bosdyn.api.spot.TerrainParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.TerrainParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.TerrainParams}
*/
proto.bosdyn.api.spot.TerrainParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new google_protobuf_wrappers_pb.DoubleValue;
reader.readMessage(value,google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader);
msg.setGroundMuHint(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setEnableGratedFloor(value);
break;
case 4:
var value = /** @type {!proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode} */ (reader.readEnum());
msg.setGratedSurfacesMode(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.TerrainParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot.TerrainParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.TerrainParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getGroundMuHint();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter
);
}
f = message.getEnableGratedFloor();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getGratedSurfacesMode();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode = {
GRATED_SURFACES_MODE_UNKNOWN: 0,
GRATED_SURFACES_MODE_OFF: 1,
GRATED_SURFACES_MODE_ON: 2,
GRATED_SURFACES_MODE_AUTO: 3
};
/**
* optional google.protobuf.DoubleValue ground_mu_hint = 2;
* @return {?proto.google.protobuf.DoubleValue}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.getGroundMuHint = function() {
return /** @type{?proto.google.protobuf.DoubleValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 2));
};
/**
* @param {?proto.google.protobuf.DoubleValue|undefined} value
* @return {!proto.bosdyn.api.spot.TerrainParams} returns this
*/
proto.bosdyn.api.spot.TerrainParams.prototype.setGroundMuHint = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.TerrainParams} returns this
*/
proto.bosdyn.api.spot.TerrainParams.prototype.clearGroundMuHint = function() {
return this.setGroundMuHint(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.hasGroundMuHint = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bool enable_grated_floor = 3;
* @return {boolean}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.getEnableGratedFloor = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.spot.TerrainParams} returns this
*/
proto.bosdyn.api.spot.TerrainParams.prototype.setEnableGratedFloor = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional GratedSurfacesMode grated_surfaces_mode = 4;
* @return {!proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode}
*/
proto.bosdyn.api.spot.TerrainParams.prototype.getGratedSurfacesMode = function() {
return /** @type {!proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.bosdyn.api.spot.TerrainParams.GratedSurfacesMode} value
* @return {!proto.bosdyn.api.spot.TerrainParams} returns this
*/
proto.bosdyn.api.spot.TerrainParams.prototype.setGratedSurfacesMode = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.BodyExternalForceParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot.BodyExternalForceParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.BodyExternalForceParams.toObject = function(includeInstance, msg) {
var f, obj = {
externalForceIndicator: jspb.Message.getFieldWithDefault(msg, 1, 0),
frameName: jspb.Message.getFieldWithDefault(msg, 4, ""),
externalForceOverride: (f = msg.getExternalForceOverride()) && bosdyn_api_geometry_pb.Vec3.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot.BodyExternalForceParams}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.BodyExternalForceParams;
return proto.bosdyn.api.spot.BodyExternalForceParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.BodyExternalForceParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.BodyExternalForceParams}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator} */ (reader.readEnum());
msg.setExternalForceIndicator(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setFrameName(value);
break;
case 3:
var value = new bosdyn_api_geometry_pb.Vec3;
reader.readMessage(value,bosdyn_api_geometry_pb.Vec3.deserializeBinaryFromReader);
msg.setExternalForceOverride(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.BodyExternalForceParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot.BodyExternalForceParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.BodyExternalForceParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getExternalForceIndicator();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getFrameName();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getExternalForceOverride();
if (f != null) {
writer.writeMessage(
3,
f,
bosdyn_api_geometry_pb.Vec3.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator = {
EXTERNAL_FORCE_NONE: 0,
EXTERNAL_FORCE_USE_ESTIMATE: 1,
EXTERNAL_FORCE_USE_OVERRIDE: 2
};
/**
* optional ExternalForceIndicator external_force_indicator = 1;
* @return {!proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.prototype.getExternalForceIndicator = function() {
return /** @type {!proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.bosdyn.api.spot.BodyExternalForceParams.ExternalForceIndicator} value
* @return {!proto.bosdyn.api.spot.BodyExternalForceParams} returns this
*/
proto.bosdyn.api.spot.BodyExternalForceParams.prototype.setExternalForceIndicator = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional string frame_name = 4;
* @return {string}
*/
proto.bosdyn.api.spot.BodyExternalForceParams.prototype.getFrameName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.spot.BodyExternalForceParams} returns thi