spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
561 lines (481 loc) • 17.7 kB
JavaScript
// source: bosdyn/api/graph_nav/nav.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_graph_nav_map_pb = require('../../../bosdyn/api/graph_nav/map_pb.js');
goog.object.extend(proto, bosdyn_api_graph_nav_map_pb);
var bosdyn_api_geometry_pb = require('../../../bosdyn/api/geometry_pb.js');
goog.object.extend(proto, bosdyn_api_geometry_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.bosdyn.api.graph_nav.Localization', null, global);
goog.exportSymbol('proto.bosdyn.api.graph_nav.Route', 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.graph_nav.Route = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.graph_nav.Route.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.graph_nav.Route, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.graph_nav.Route.displayName = 'proto.bosdyn.api.graph_nav.Route';
}
/**
* 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.graph_nav.Localization = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.graph_nav.Localization, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.graph_nav.Localization.displayName = 'proto.bosdyn.api.graph_nav.Localization';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.graph_nav.Route.repeatedFields_ = [2,3];
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.graph_nav.Route.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.graph_nav.Route.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.graph_nav.Route} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.graph_nav.Route.toObject = function(includeInstance, msg) {
var f, obj = {
waypointIdList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
edgeIdList: jspb.Message.toObjectList(msg.getEdgeIdList(),
bosdyn_api_graph_nav_map_pb.Edge.Id.toObject, includeInstance)
};
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.graph_nav.Route}
*/
proto.bosdyn.api.graph_nav.Route.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.graph_nav.Route;
return proto.bosdyn.api.graph_nav.Route.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.graph_nav.Route} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.graph_nav.Route}
*/
proto.bosdyn.api.graph_nav.Route.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addWaypointId(value);
break;
case 3:
var value = new bosdyn_api_graph_nav_map_pb.Edge.Id;
reader.readMessage(value,bosdyn_api_graph_nav_map_pb.Edge.Id.deserializeBinaryFromReader);
msg.addEdgeId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.graph_nav.Route.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.graph_nav.Route.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.graph_nav.Route} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.graph_nav.Route.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getWaypointIdList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getEdgeIdList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
bosdyn_api_graph_nav_map_pb.Edge.Id.serializeBinaryToWriter
);
}
};
/**
* repeated string waypoint_id = 2;
* @return {!Array<string>}
*/
proto.bosdyn.api.graph_nav.Route.prototype.getWaypointIdList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.bosdyn.api.graph_nav.Route} returns this
*/
proto.bosdyn.api.graph_nav.Route.prototype.setWaypointIdList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.graph_nav.Route} returns this
*/
proto.bosdyn.api.graph_nav.Route.prototype.addWaypointId = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.graph_nav.Route} returns this
*/
proto.bosdyn.api.graph_nav.Route.prototype.clearWaypointIdList = function() {
return this.setWaypointIdList([]);
};
/**
* repeated Edge.Id edge_id = 3;
* @return {!Array<!proto.bosdyn.api.graph_nav.Edge.Id>}
*/
proto.bosdyn.api.graph_nav.Route.prototype.getEdgeIdList = function() {
return /** @type{!Array<!proto.bosdyn.api.graph_nav.Edge.Id>} */ (
jspb.Message.getRepeatedWrapperField(this, bosdyn_api_graph_nav_map_pb.Edge.Id, 3));
};
/**
* @param {!Array<!proto.bosdyn.api.graph_nav.Edge.Id>} value
* @return {!proto.bosdyn.api.graph_nav.Route} returns this
*/
proto.bosdyn.api.graph_nav.Route.prototype.setEdgeIdList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.bosdyn.api.graph_nav.Edge.Id=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.graph_nav.Edge.Id}
*/
proto.bosdyn.api.graph_nav.Route.prototype.addEdgeId = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.bosdyn.api.graph_nav.Edge.Id, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.graph_nav.Route} returns this
*/
proto.bosdyn.api.graph_nav.Route.prototype.clearEdgeIdList = function() {
return this.setEdgeIdList([]);
};
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.graph_nav.Localization.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.graph_nav.Localization.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.graph_nav.Localization} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.graph_nav.Localization.toObject = function(includeInstance, msg) {
var f, obj = {
waypointId: jspb.Message.getFieldWithDefault(msg, 1, ""),
waypointTformBody: (f = msg.getWaypointTformBody()) && bosdyn_api_geometry_pb.SE3Pose.toObject(includeInstance, f),
seedTformBody: (f = msg.getSeedTformBody()) && bosdyn_api_geometry_pb.SE3Pose.toObject(includeInstance, f),
timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.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.graph_nav.Localization}
*/
proto.bosdyn.api.graph_nav.Localization.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.graph_nav.Localization;
return proto.bosdyn.api.graph_nav.Localization.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.graph_nav.Localization} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.graph_nav.Localization}
*/
proto.bosdyn.api.graph_nav.Localization.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setWaypointId(value);
break;
case 2:
var value = new bosdyn_api_geometry_pb.SE3Pose;
reader.readMessage(value,bosdyn_api_geometry_pb.SE3Pose.deserializeBinaryFromReader);
msg.setWaypointTformBody(value);
break;
case 5:
var value = new bosdyn_api_geometry_pb.SE3Pose;
reader.readMessage(value,bosdyn_api_geometry_pb.SE3Pose.deserializeBinaryFromReader);
msg.setSeedTformBody(value);
break;
case 3:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.graph_nav.Localization.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.graph_nav.Localization} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.graph_nav.Localization.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getWaypointId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWaypointTformBody();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_geometry_pb.SE3Pose.serializeBinaryToWriter
);
}
f = message.getSeedTformBody();
if (f != null) {
writer.writeMessage(
5,
f,
bosdyn_api_geometry_pb.SE3Pose.serializeBinaryToWriter
);
}
f = message.getTimestamp();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};
/**
* optional string waypoint_id = 1;
* @return {string}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.getWaypointId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.setWaypointId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bosdyn.api.SE3Pose waypoint_tform_body = 2;
* @return {?proto.bosdyn.api.SE3Pose}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.getWaypointTformBody = function() {
return /** @type{?proto.bosdyn.api.SE3Pose} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE3Pose, 2));
};
/**
* @param {?proto.bosdyn.api.SE3Pose|undefined} value
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.setWaypointTformBody = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.clearWaypointTformBody = function() {
return this.setWaypointTformBody(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.hasWaypointTformBody = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bosdyn.api.SE3Pose seed_tform_body = 5;
* @return {?proto.bosdyn.api.SE3Pose}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.getSeedTformBody = function() {
return /** @type{?proto.bosdyn.api.SE3Pose} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE3Pose, 5));
};
/**
* @param {?proto.bosdyn.api.SE3Pose|undefined} value
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.setSeedTformBody = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.clearSeedTformBody = function() {
return this.setSeedTformBody(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.hasSeedTformBody = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional google.protobuf.Timestamp timestamp = 3;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.getTimestamp = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.setTimestamp = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.graph_nav.Localization} returns this
*/
proto.bosdyn.api.graph_nav.Localization.prototype.clearTimestamp = function() {
return this.setTimestamp(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.graph_nav.Localization.prototype.hasTimestamp = function() {
return jspb.Message.getField(this, 3) != null;
};
goog.object.extend(exports, proto.bosdyn.api.graph_nav);