Go to the documentation of this file.00001 """autogenerated by genpy from openraveros/body_getaabbsRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class body_getaabbsRequest(genpy.Message):
00009 _md5sum = "10fe673987681b8f34c92bca56d3c517"
00010 _type = "openraveros/body_getaabbsRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 int32 bodyid
00017
00018 """
00019 __slots__ = ['bodyid']
00020 _slot_types = ['int32']
00021
00022 def __init__(self, *args, **kwds):
00023 """
00024 Constructor. Any message fields that are implicitly/explicitly
00025 set to None will be assigned a default value. The recommend
00026 use is keyword arguments as this is more robust to future message
00027 changes. You cannot mix in-order arguments and keyword arguments.
00028
00029 The available fields are:
00030 bodyid
00031
00032 :param args: complete set of field values, in .msg order
00033 :param kwds: use keyword arguments corresponding to message field names
00034 to set specific fields.
00035 """
00036 if args or kwds:
00037 super(body_getaabbsRequest, self).__init__(*args, **kwds)
00038
00039 if self.bodyid is None:
00040 self.bodyid = 0
00041 else:
00042 self.bodyid = 0
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 buff.write(_struct_i.pack(self.bodyid))
00057 except struct.error as se: self._check_types(se)
00058 except TypeError as te: self._check_types(te)
00059
00060 def deserialize(self, str):
00061 """
00062 unpack serialized message in str into this message instance
00063 :param str: byte array of serialized message, ``str``
00064 """
00065 try:
00066 end = 0
00067 start = end
00068 end += 4
00069 (self.bodyid,) = _struct_i.unpack(str[start:end])
00070 return self
00071 except struct.error as e:
00072 raise genpy.DeserializationError(e)
00073
00074
00075 def serialize_numpy(self, buff, numpy):
00076 """
00077 serialize message with numpy array types into buffer
00078 :param buff: buffer, ``StringIO``
00079 :param numpy: numpy python module
00080 """
00081 try:
00082 buff.write(_struct_i.pack(self.bodyid))
00083 except struct.error as se: self._check_types(se)
00084 except TypeError as te: self._check_types(te)
00085
00086 def deserialize_numpy(self, str, numpy):
00087 """
00088 unpack serialized message in str into this message instance using numpy for array types
00089 :param str: byte array of serialized message, ``str``
00090 :param numpy: numpy python module
00091 """
00092 try:
00093 end = 0
00094 start = end
00095 end += 4
00096 (self.bodyid,) = _struct_i.unpack(str[start:end])
00097 return self
00098 except struct.error as e:
00099 raise genpy.DeserializationError(e)
00100
00101 _struct_I = genpy.struct_I
00102 _struct_i = struct.Struct("<i")
00103 """autogenerated by genpy from openraveros/body_getaabbsResponse.msg. Do not edit."""
00104 import sys
00105 python3 = True if sys.hexversion > 0x03000000 else False
00106 import genpy
00107 import struct
00108
00109 import openraveros.msg
00110
00111 class body_getaabbsResponse(genpy.Message):
00112 _md5sum = "eeebbc021eb35c7ba0d57775ac105297"
00113 _type = "openraveros/body_getaabbsResponse"
00114 _has_header = False
00115 _full_text = """AABB[] boxes
00116
00117
00118 ================================================================================
00119 MSG: openraveros/AABB
00120 # axis-aligned bounding box
00121 float32[3] center
00122
00123 # half widths
00124 float32[3] extents
00125
00126 """
00127 __slots__ = ['boxes']
00128 _slot_types = ['openraveros/AABB[]']
00129
00130 def __init__(self, *args, **kwds):
00131 """
00132 Constructor. Any message fields that are implicitly/explicitly
00133 set to None will be assigned a default value. The recommend
00134 use is keyword arguments as this is more robust to future message
00135 changes. You cannot mix in-order arguments and keyword arguments.
00136
00137 The available fields are:
00138 boxes
00139
00140 :param args: complete set of field values, in .msg order
00141 :param kwds: use keyword arguments corresponding to message field names
00142 to set specific fields.
00143 """
00144 if args or kwds:
00145 super(body_getaabbsResponse, self).__init__(*args, **kwds)
00146
00147 if self.boxes is None:
00148 self.boxes = []
00149 else:
00150 self.boxes = []
00151
00152 def _get_types(self):
00153 """
00154 internal API method
00155 """
00156 return self._slot_types
00157
00158 def serialize(self, buff):
00159 """
00160 serialize message into buffer
00161 :param buff: buffer, ``StringIO``
00162 """
00163 try:
00164 length = len(self.boxes)
00165 buff.write(_struct_I.pack(length))
00166 for val1 in self.boxes:
00167 buff.write(_struct_3f.pack(*val1.center))
00168 buff.write(_struct_3f.pack(*val1.extents))
00169 except struct.error as se: self._check_types(se)
00170 except TypeError as te: self._check_types(te)
00171
00172 def deserialize(self, str):
00173 """
00174 unpack serialized message in str into this message instance
00175 :param str: byte array of serialized message, ``str``
00176 """
00177 try:
00178 if self.boxes is None:
00179 self.boxes = None
00180 end = 0
00181 start = end
00182 end += 4
00183 (length,) = _struct_I.unpack(str[start:end])
00184 self.boxes = []
00185 for i in range(0, length):
00186 val1 = openraveros.msg.AABB()
00187 start = end
00188 end += 12
00189 val1.center = _struct_3f.unpack(str[start:end])
00190 start = end
00191 end += 12
00192 val1.extents = _struct_3f.unpack(str[start:end])
00193 self.boxes.append(val1)
00194 return self
00195 except struct.error as e:
00196 raise genpy.DeserializationError(e)
00197
00198
00199 def serialize_numpy(self, buff, numpy):
00200 """
00201 serialize message with numpy array types into buffer
00202 :param buff: buffer, ``StringIO``
00203 :param numpy: numpy python module
00204 """
00205 try:
00206 length = len(self.boxes)
00207 buff.write(_struct_I.pack(length))
00208 for val1 in self.boxes:
00209 buff.write(val1.center.tostring())
00210 buff.write(val1.extents.tostring())
00211 except struct.error as se: self._check_types(se)
00212 except TypeError as te: self._check_types(te)
00213
00214 def deserialize_numpy(self, str, numpy):
00215 """
00216 unpack serialized message in str into this message instance using numpy for array types
00217 :param str: byte array of serialized message, ``str``
00218 :param numpy: numpy python module
00219 """
00220 try:
00221 if self.boxes is None:
00222 self.boxes = None
00223 end = 0
00224 start = end
00225 end += 4
00226 (length,) = _struct_I.unpack(str[start:end])
00227 self.boxes = []
00228 for i in range(0, length):
00229 val1 = openraveros.msg.AABB()
00230 start = end
00231 end += 12
00232 val1.center = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3)
00233 start = end
00234 end += 12
00235 val1.extents = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3)
00236 self.boxes.append(val1)
00237 return self
00238 except struct.error as e:
00239 raise genpy.DeserializationError(e)
00240
00241 _struct_I = genpy.struct_I
00242 _struct_3f = struct.Struct("<3f")
00243 class body_getaabbs(object):
00244 _type = 'openraveros/body_getaabbs'
00245 _md5sum = '459b4a95e5d0c677cba1e141f94401ea'
00246 _request_class = body_getaabbsRequest
00247 _response_class = body_getaabbsResponse