小乌龟控制完成
This commit is contained in:
1 parent
b09567204c
commit
cdcf44c156
329 files changed
+16783
No files matched your search
@@ -0,0 +1,226 @@
|
||||
// Auto-generated. Do not edit!
|
||||
|
||||
// (in-package Aee1220310013.srv)
|
||||
|
||||
|
||||
"use strict";
|
||||
|
||||
const _serializer = _ros_msg_utils.Serialize;
|
||||
const _arraySerializer = _serializer.Array;
|
||||
const _deserializer = _ros_msg_utils.Deserialize;
|
||||
const _arrayDeserializer = _deserializer.Array;
|
||||
const _finder = _ros_msg_utils.Find;
|
||||
const _getByteLength = _ros_msg_utils.getByteLength;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
class ProcessIDRequest {
|
||||
constructor(initObj={}) {
|
||||
if (initObj === null) {
|
||||
// initObj === null is a special case for deserialization where we don't initialize fields
|
||||
this.student_id = null;
|
||||
}
|
||||
else {
|
||||
if (initObj.hasOwnProperty('student_id')) {
|
||||
this.student_id = initObj.student_id
|
||||
}
|
||||
else {
|
||||
this.student_id = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static serialize(obj, buffer, bufferOffset) {
|
||||
// Serializes a message object of type ProcessIDRequest
|
||||
// Serialize message field [student_id]
|
||||
bufferOffset = _serializer.string(obj.student_id, buffer, bufferOffset);
|
||||
return bufferOffset;
|
||||
}
|
||||
|
||||
static deserialize(buffer, bufferOffset=[0]) {
|
||||
//deserializes a message object of type ProcessIDRequest
|
||||
let len;
|
||||
let data = new ProcessIDRequest(null);
|
||||
// Deserialize message field [student_id]
|
||||
data.student_id = _deserializer.string(buffer, bufferOffset);
|
||||
return data;
|
||||
}
|
||||
|
||||
static getMessageSize(object) {
|
||||
let length = 0;
|
||||
length += _getByteLength(object.student_id);
|
||||
return length + 4;
|
||||
}
|
||||
|
||||
static datatype() {
|
||||
// Returns string type for a service object
|
||||
return 'Aee1220310013/ProcessIDRequest';
|
||||
}
|
||||
|
||||
static md5sum() {
|
||||
//Returns md5sum for a message object
|
||||
return '372af5010cb802275110c9bd017544b8';
|
||||
}
|
||||
|
||||
static messageDefinition() {
|
||||
// Returns full string definition for message
|
||||
return `
|
||||
string student_id
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
static Resolve(msg) {
|
||||
// deep-construct a valid message object instance of whatever was passed in
|
||||
if (typeof msg !== 'object' || msg === null) {
|
||||
msg = {};
|
||||
}
|
||||
const resolved = new ProcessIDRequest(null);
|
||||
if (msg.student_id !== undefined) {
|
||||
resolved.student_id = msg.student_id;
|
||||
}
|
||||
else {
|
||||
resolved.student_id = ''
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
};
|
||||
|
||||
class ProcessIDResponse {
|
||||
constructor(initObj={}) {
|
||||
if (initObj === null) {
|
||||
// initObj === null is a special case for deserialization where we don't initialize fields
|
||||
this.x = null;
|
||||
this.y = null;
|
||||
this.radius = null;
|
||||
this.direction = null;
|
||||
}
|
||||
else {
|
||||
if (initObj.hasOwnProperty('x')) {
|
||||
this.x = initObj.x
|
||||
}
|
||||
else {
|
||||
this.x = 0.0;
|
||||
}
|
||||
if (initObj.hasOwnProperty('y')) {
|
||||
this.y = initObj.y
|
||||
}
|
||||
else {
|
||||
this.y = 0.0;
|
||||
}
|
||||
if (initObj.hasOwnProperty('radius')) {
|
||||
this.radius = initObj.radius
|
||||
}
|
||||
else {
|
||||
this.radius = 0.0;
|
||||
}
|
||||
if (initObj.hasOwnProperty('direction')) {
|
||||
this.direction = initObj.direction
|
||||
}
|
||||
else {
|
||||
this.direction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static serialize(obj, buffer, bufferOffset) {
|
||||
// Serializes a message object of type ProcessIDResponse
|
||||
// Serialize message field [x]
|
||||
bufferOffset = _serializer.float32(obj.x, buffer, bufferOffset);
|
||||
// Serialize message field [y]
|
||||
bufferOffset = _serializer.float32(obj.y, buffer, bufferOffset);
|
||||
// Serialize message field [radius]
|
||||
bufferOffset = _serializer.float32(obj.radius, buffer, bufferOffset);
|
||||
// Serialize message field [direction]
|
||||
bufferOffset = _serializer.int32(obj.direction, buffer, bufferOffset);
|
||||
return bufferOffset;
|
||||
}
|
||||
|
||||
static deserialize(buffer, bufferOffset=[0]) {
|
||||
//deserializes a message object of type ProcessIDResponse
|
||||
let len;
|
||||
let data = new ProcessIDResponse(null);
|
||||
// Deserialize message field [x]
|
||||
data.x = _deserializer.float32(buffer, bufferOffset);
|
||||
// Deserialize message field [y]
|
||||
data.y = _deserializer.float32(buffer, bufferOffset);
|
||||
// Deserialize message field [radius]
|
||||
data.radius = _deserializer.float32(buffer, bufferOffset);
|
||||
// Deserialize message field [direction]
|
||||
data.direction = _deserializer.int32(buffer, bufferOffset);
|
||||
return data;
|
||||
}
|
||||
|
||||
static getMessageSize(object) {
|
||||
return 16;
|
||||
}
|
||||
|
||||
static datatype() {
|
||||
// Returns string type for a service object
|
||||
return 'Aee1220310013/ProcessIDResponse';
|
||||
}
|
||||
|
||||
static md5sum() {
|
||||
//Returns md5sum for a message object
|
||||
return 'deec39c810656f01d6b1be82e15bf4e7';
|
||||
}
|
||||
|
||||
static messageDefinition() {
|
||||
// Returns full string definition for message
|
||||
return `
|
||||
float32 x
|
||||
float32 y
|
||||
float32 radius
|
||||
int32 direction
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
static Resolve(msg) {
|
||||
// deep-construct a valid message object instance of whatever was passed in
|
||||
if (typeof msg !== 'object' || msg === null) {
|
||||
msg = {};
|
||||
}
|
||||
const resolved = new ProcessIDResponse(null);
|
||||
if (msg.x !== undefined) {
|
||||
resolved.x = msg.x;
|
||||
}
|
||||
else {
|
||||
resolved.x = 0.0
|
||||
}
|
||||
|
||||
if (msg.y !== undefined) {
|
||||
resolved.y = msg.y;
|
||||
}
|
||||
else {
|
||||
resolved.y = 0.0
|
||||
}
|
||||
|
||||
if (msg.radius !== undefined) {
|
||||
resolved.radius = msg.radius;
|
||||
}
|
||||
else {
|
||||
resolved.radius = 0.0
|
||||
}
|
||||
|
||||
if (msg.direction !== undefined) {
|
||||
resolved.direction = msg.direction;
|
||||
}
|
||||
else {
|
||||
resolved.direction = 0
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
Request: ProcessIDRequest,
|
||||
Response: ProcessIDResponse,
|
||||
md5sum() { return 'e7263169494a43b7a316d7ec3753d546'; },
|
||||
datatype() { return 'Aee1220310013/ProcessID'; }
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
let ProcessID = require('./ProcessID.js')
|
||||
|
||||
module.exports = {
|
||||
ProcessID: ProcessID,
|
||||
};
|
||||
Reference in new issue
Block a user