小乌龟控制完成

This commit is contained in:
Cx330 committed 2025-10-11 21:52:39 +08:00
1 parent b09567204c
commit cdcf44c156
329 files changed
+16783

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
prefix=/home/zmn/下载/ros_turtlecontrol/devel
Name: Aee1220310013
Description: Description of Aee1220310013
Version: 0.0.0
Cflags: -I/home/zmn/下载/ros_turtlecontrol/devel/include
Libs: -L${prefix}/lib
Requires:
Whitespace-only changes.
@@ -0,0 +1,259 @@
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from Aee1220310013/ProcessIDRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class ProcessIDRequest(genpy.Message):
_md5sum = "372af5010cb802275110c9bd017544b8"
_type = "Aee1220310013/ProcessIDRequest"
_has_header = False # flag to mark the presence of a Header object
_full_text = """string student_id
"""
__slots__ = ['student_id']
_slot_types = ['string']
def __init__(self, *args, **kwds):
"""
Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes. You cannot mix in-order arguments and keyword arguments.
The available fields are:
student_id
:param args: complete set of field values, in .msg order
:param kwds: use keyword arguments corresponding to message field names
to set specific fields.
"""
if args or kwds:
super(ProcessIDRequest, self).__init__(*args, **kwds)
# message fields cannot be None, assign default values for those that are
if self.student_id is None:
self.student_id = ''
else:
self.student_id = ''
def _get_types(self):
"""
internal API method
"""
return self._slot_types
def serialize(self, buff):
"""
serialize message into buffer
:param buff: buffer, ``StringIO``
"""
try:
_x = self.student_id
length = len(_x)
if python3 or type(_x) == unicode:
_x = _x.encode('utf-8')
length = len(_x)
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize(self, str):
"""
unpack serialized message in str into this message instance
:param str: byte array of serialized message, ``str``
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
start = end
end += 4
(length,) = _struct_I.unpack(str[start:end])
start = end
end += length
if python3:
self.student_id = str[start:end].decode('utf-8', 'rosmsg')
else:
self.student_id = str[start:end]
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
def serialize_numpy(self, buff, numpy):
"""
serialize message with numpy array types into buffer
:param buff: buffer, ``StringIO``
:param numpy: numpy python module
"""
try:
_x = self.student_id
length = len(_x)
if python3 or type(_x) == unicode:
_x = _x.encode('utf-8')
length = len(_x)
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize_numpy(self, str, numpy):
"""
unpack serialized message in str into this message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
start = end
end += 4
(length,) = _struct_I.unpack(str[start:end])
start = end
end += length
if python3:
self.student_id = str[start:end].decode('utf-8', 'rosmsg')
else:
self.student_id = str[start:end]
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
_struct_I = genpy.struct_I
def _get_struct_I():
global _struct_I
return _struct_I
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from Aee1220310013/ProcessIDResponse.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class ProcessIDResponse(genpy.Message):
_md5sum = "deec39c810656f01d6b1be82e15bf4e7"
_type = "Aee1220310013/ProcessIDResponse"
_has_header = False # flag to mark the presence of a Header object
_full_text = """float32 x
float32 y
float32 radius
int32 direction
"""
__slots__ = ['x','y','radius','direction']
_slot_types = ['float32','float32','float32','int32']
def __init__(self, *args, **kwds):
"""
Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes. You cannot mix in-order arguments and keyword arguments.
The available fields are:
x,y,radius,direction
:param args: complete set of field values, in .msg order
:param kwds: use keyword arguments corresponding to message field names
to set specific fields.
"""
if args or kwds:
super(ProcessIDResponse, self).__init__(*args, **kwds)
# message fields cannot be None, assign default values for those that are
if self.x is None:
self.x = 0.
if self.y is None:
self.y = 0.
if self.radius is None:
self.radius = 0.
if self.direction is None:
self.direction = 0
else:
self.x = 0.
self.y = 0.
self.radius = 0.
self.direction = 0
def _get_types(self):
"""
internal API method
"""
return self._slot_types
def serialize(self, buff):
"""
serialize message into buffer
:param buff: buffer, ``StringIO``
"""
try:
_x = self
buff.write(_get_struct_3fi().pack(_x.x, _x.y, _x.radius, _x.direction))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize(self, str):
"""
unpack serialized message in str into this message instance
:param str: byte array of serialized message, ``str``
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
_x = self
start = end
end += 16
(_x.x, _x.y, _x.radius, _x.direction,) = _get_struct_3fi().unpack(str[start:end])
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
def serialize_numpy(self, buff, numpy):
"""
serialize message with numpy array types into buffer
:param buff: buffer, ``StringIO``
:param numpy: numpy python module
"""
try:
_x = self
buff.write(_get_struct_3fi().pack(_x.x, _x.y, _x.radius, _x.direction))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize_numpy(self, str, numpy):
"""
unpack serialized message in str into this message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
_x = self
start = end
end += 16
(_x.x, _x.y, _x.radius, _x.direction,) = _get_struct_3fi().unpack(str[start:end])
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
_struct_I = genpy.struct_I
def _get_struct_I():
global _struct_I
return _struct_I
_struct_3fi = None
def _get_struct_3fi():
global _struct_3fi
if _struct_3fi is None:
_struct_3fi = struct.Struct("<3fi")
return _struct_3fi
class ProcessID(object):
_type = 'Aee1220310013/ProcessID'
_md5sum = 'e7263169494a43b7a316d7ec3753d546'
_request_class = ProcessIDRequest
_response_class = ProcessIDResponse
@@ -0,0 +1 @@
from ._ProcessID import *