_OccupancyBBXSizeQuery.py
Go to the documentation of this file.
00001 """autogenerated by genpy from collider/OccupancyBBXSizeQueryRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 
00009 class OccupancyBBXSizeQueryRequest(genpy.Message):
00010   _md5sum = "17746d0996c54d9b8b0dfe6f3cd0b588"
00011   _type = "collider/OccupancyBBXSizeQueryRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 geometry_msgs/Point center
00015 
00016 geometry_msgs/Point size
00017 
00018 ================================================================================
00019 MSG: geometry_msgs/Point
00020 # This contains the position of a point in free space
00021 float64 x
00022 float64 y
00023 float64 z
00024 
00025 """
00026   __slots__ = ['center','size']
00027   _slot_types = ['geometry_msgs/Point','geometry_msgs/Point']
00028 
00029   def __init__(self, *args, **kwds):
00030     """
00031     Constructor. Any message fields that are implicitly/explicitly
00032     set to None will be assigned a default value. The recommend
00033     use is keyword arguments as this is more robust to future message
00034     changes.  You cannot mix in-order arguments and keyword arguments.
00035 
00036     The available fields are:
00037        center,size
00038 
00039     :param args: complete set of field values, in .msg order
00040     :param kwds: use keyword arguments corresponding to message field names
00041     to set specific fields.
00042     """
00043     if args or kwds:
00044       super(OccupancyBBXSizeQueryRequest, self).__init__(*args, **kwds)
00045       #message fields cannot be None, assign default values for those that are
00046       if self.center is None:
00047         self.center = geometry_msgs.msg.Point()
00048       if self.size is None:
00049         self.size = geometry_msgs.msg.Point()
00050     else:
00051       self.center = geometry_msgs.msg.Point()
00052       self.size = geometry_msgs.msg.Point()
00053 
00054   def _get_types(self):
00055     """
00056     internal API method
00057     """
00058     return self._slot_types
00059 
00060   def serialize(self, buff):
00061     """
00062     serialize message into buffer
00063     :param buff: buffer, ``StringIO``
00064     """
00065     try:
00066       _x = self
00067       buff.write(_struct_6d.pack(_x.center.x, _x.center.y, _x.center.z, _x.size.x, _x.size.y, _x.size.z))
00068     except struct.error as se: self._check_types(se)
00069     except TypeError as te: self._check_types(te)
00070 
00071   def deserialize(self, str):
00072     """
00073     unpack serialized message in str into this message instance
00074     :param str: byte array of serialized message, ``str``
00075     """
00076     try:
00077       if self.center is None:
00078         self.center = geometry_msgs.msg.Point()
00079       if self.size is None:
00080         self.size = geometry_msgs.msg.Point()
00081       end = 0
00082       _x = self
00083       start = end
00084       end += 48
00085       (_x.center.x, _x.center.y, _x.center.z, _x.size.x, _x.size.y, _x.size.z,) = _struct_6d.unpack(str[start:end])
00086       return self
00087     except struct.error as e:
00088       raise genpy.DeserializationError(e) #most likely buffer underfill
00089 
00090 
00091   def serialize_numpy(self, buff, numpy):
00092     """
00093     serialize message with numpy array types into buffer
00094     :param buff: buffer, ``StringIO``
00095     :param numpy: numpy python module
00096     """
00097     try:
00098       _x = self
00099       buff.write(_struct_6d.pack(_x.center.x, _x.center.y, _x.center.z, _x.size.x, _x.size.y, _x.size.z))
00100     except struct.error as se: self._check_types(se)
00101     except TypeError as te: self._check_types(te)
00102 
00103   def deserialize_numpy(self, str, numpy):
00104     """
00105     unpack serialized message in str into this message instance using numpy for array types
00106     :param str: byte array of serialized message, ``str``
00107     :param numpy: numpy python module
00108     """
00109     try:
00110       if self.center is None:
00111         self.center = geometry_msgs.msg.Point()
00112       if self.size is None:
00113         self.size = geometry_msgs.msg.Point()
00114       end = 0
00115       _x = self
00116       start = end
00117       end += 48
00118       (_x.center.x, _x.center.y, _x.center.z, _x.size.x, _x.size.y, _x.size.z,) = _struct_6d.unpack(str[start:end])
00119       return self
00120     except struct.error as e:
00121       raise genpy.DeserializationError(e) #most likely buffer underfill
00122 
00123 _struct_I = genpy.struct_I
00124 _struct_6d = struct.Struct("<6d")
00125 """autogenerated by genpy from collider/OccupancyBBXSizeQueryResponse.msg. Do not edit."""
00126 import sys
00127 python3 = True if sys.hexversion > 0x03000000 else False
00128 import genpy
00129 import struct
00130 
00131 import geometry_msgs.msg
00132 
00133 class OccupancyBBXSizeQueryResponse(genpy.Message):
00134   _md5sum = "32bc6e43503cdc225deabb9cd6ec4d0b"
00135   _type = "collider/OccupancyBBXSizeQueryResponse"
00136   _has_header = False #flag to mark the presence of a Header object
00137   _full_text = """
00138 geometry_msgs/Point[] occupied
00139 
00140 
00141 geometry_msgs/Point[] free
00142 
00143 
00144 float64 resolution
00145 
00146 
00147 ================================================================================
00148 MSG: geometry_msgs/Point
00149 # This contains the position of a point in free space
00150 float64 x
00151 float64 y
00152 float64 z
00153 
00154 """
00155   __slots__ = ['occupied','free','resolution']
00156   _slot_types = ['geometry_msgs/Point[]','geometry_msgs/Point[]','float64']
00157 
00158   def __init__(self, *args, **kwds):
00159     """
00160     Constructor. Any message fields that are implicitly/explicitly
00161     set to None will be assigned a default value. The recommend
00162     use is keyword arguments as this is more robust to future message
00163     changes.  You cannot mix in-order arguments and keyword arguments.
00164 
00165     The available fields are:
00166        occupied,free,resolution
00167 
00168     :param args: complete set of field values, in .msg order
00169     :param kwds: use keyword arguments corresponding to message field names
00170     to set specific fields.
00171     """
00172     if args or kwds:
00173       super(OccupancyBBXSizeQueryResponse, self).__init__(*args, **kwds)
00174       #message fields cannot be None, assign default values for those that are
00175       if self.occupied is None:
00176         self.occupied = []
00177       if self.free is None:
00178         self.free = []
00179       if self.resolution is None:
00180         self.resolution = 0.
00181     else:
00182       self.occupied = []
00183       self.free = []
00184       self.resolution = 0.
00185 
00186   def _get_types(self):
00187     """
00188     internal API method
00189     """
00190     return self._slot_types
00191 
00192   def serialize(self, buff):
00193     """
00194     serialize message into buffer
00195     :param buff: buffer, ``StringIO``
00196     """
00197     try:
00198       length = len(self.occupied)
00199       buff.write(_struct_I.pack(length))
00200       for val1 in self.occupied:
00201         _x = val1
00202         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00203       length = len(self.free)
00204       buff.write(_struct_I.pack(length))
00205       for val1 in self.free:
00206         _x = val1
00207         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00208       buff.write(_struct_d.pack(self.resolution))
00209     except struct.error as se: self._check_types(se)
00210     except TypeError as te: self._check_types(te)
00211 
00212   def deserialize(self, str):
00213     """
00214     unpack serialized message in str into this message instance
00215     :param str: byte array of serialized message, ``str``
00216     """
00217     try:
00218       if self.occupied is None:
00219         self.occupied = None
00220       if self.free is None:
00221         self.free = None
00222       end = 0
00223       start = end
00224       end += 4
00225       (length,) = _struct_I.unpack(str[start:end])
00226       self.occupied = []
00227       for i in range(0, length):
00228         val1 = geometry_msgs.msg.Point()
00229         _x = val1
00230         start = end
00231         end += 24
00232         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00233         self.occupied.append(val1)
00234       start = end
00235       end += 4
00236       (length,) = _struct_I.unpack(str[start:end])
00237       self.free = []
00238       for i in range(0, length):
00239         val1 = geometry_msgs.msg.Point()
00240         _x = val1
00241         start = end
00242         end += 24
00243         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00244         self.free.append(val1)
00245       start = end
00246       end += 8
00247       (self.resolution,) = _struct_d.unpack(str[start:end])
00248       return self
00249     except struct.error as e:
00250       raise genpy.DeserializationError(e) #most likely buffer underfill
00251 
00252 
00253   def serialize_numpy(self, buff, numpy):
00254     """
00255     serialize message with numpy array types into buffer
00256     :param buff: buffer, ``StringIO``
00257     :param numpy: numpy python module
00258     """
00259     try:
00260       length = len(self.occupied)
00261       buff.write(_struct_I.pack(length))
00262       for val1 in self.occupied:
00263         _x = val1
00264         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00265       length = len(self.free)
00266       buff.write(_struct_I.pack(length))
00267       for val1 in self.free:
00268         _x = val1
00269         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00270       buff.write(_struct_d.pack(self.resolution))
00271     except struct.error as se: self._check_types(se)
00272     except TypeError as te: self._check_types(te)
00273 
00274   def deserialize_numpy(self, str, numpy):
00275     """
00276     unpack serialized message in str into this message instance using numpy for array types
00277     :param str: byte array of serialized message, ``str``
00278     :param numpy: numpy python module
00279     """
00280     try:
00281       if self.occupied is None:
00282         self.occupied = None
00283       if self.free is None:
00284         self.free = None
00285       end = 0
00286       start = end
00287       end += 4
00288       (length,) = _struct_I.unpack(str[start:end])
00289       self.occupied = []
00290       for i in range(0, length):
00291         val1 = geometry_msgs.msg.Point()
00292         _x = val1
00293         start = end
00294         end += 24
00295         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00296         self.occupied.append(val1)
00297       start = end
00298       end += 4
00299       (length,) = _struct_I.unpack(str[start:end])
00300       self.free = []
00301       for i in range(0, length):
00302         val1 = geometry_msgs.msg.Point()
00303         _x = val1
00304         start = end
00305         end += 24
00306         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00307         self.free.append(val1)
00308       start = end
00309       end += 8
00310       (self.resolution,) = _struct_d.unpack(str[start:end])
00311       return self
00312     except struct.error as e:
00313       raise genpy.DeserializationError(e) #most likely buffer underfill
00314 
00315 _struct_I = genpy.struct_I
00316 _struct_d = struct.Struct("<d")
00317 _struct_3d = struct.Struct("<3d")
00318 class OccupancyBBXSizeQuery(object):
00319   _type          = 'collider/OccupancyBBXSizeQuery'
00320   _md5sum = '80a34f6e7e97fad3d6204d238d32527b'
00321   _request_class  = OccupancyBBXSizeQueryRequest
00322   _response_class = OccupancyBBXSizeQueryResponse


collider
Author(s): Adam Harmat, Gil E. Jones, Kai M. Wurm, Armin Hornung. Maintained by Gil E. Jones
autogenerated on Thu Dec 12 2013 11:07:38