_ProcessPointCloud2.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_perception_msgs/ProcessPointCloud2Request.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 std_msgs.msg
00008 import sensor_msgs.msg
00009 
00010 class ProcessPointCloud2Request(genpy.Message):
00011   _md5sum = "55c5f2a1ba5379341fa496de58e8d437"
00012   _type = "iri_perception_msgs/ProcessPointCloud2Request"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 sensor_msgs/PointCloud2 input
00016 
00017 ================================================================================
00018 MSG: sensor_msgs/PointCloud2
00019 # This message holds a collection of N-dimensional points, which may
00020 # contain additional information such as normals, intensity, etc. The
00021 # point data is stored as a binary blob, its layout described by the
00022 # contents of the "fields" array.
00023 
00024 # The point cloud data may be organized 2d (image-like) or 1d
00025 # (unordered). Point clouds organized as 2d images may be produced by
00026 # camera depth sensors such as stereo or time-of-flight.
00027 
00028 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00029 # points).
00030 Header header
00031 
00032 # 2D structure of the point cloud. If the cloud is unordered, height is
00033 # 1 and width is the length of the point cloud.
00034 uint32 height
00035 uint32 width
00036 
00037 # Describes the channels and their layout in the binary data blob.
00038 PointField[] fields
00039 
00040 bool    is_bigendian # Is this data bigendian?
00041 uint32  point_step   # Length of a point in bytes
00042 uint32  row_step     # Length of a row in bytes
00043 uint8[] data         # Actual point data, size is (row_step*height)
00044 
00045 bool is_dense        # True if there are no invalid points
00046 
00047 ================================================================================
00048 MSG: std_msgs/Header
00049 # Standard metadata for higher-level stamped data types.
00050 # This is generally used to communicate timestamped data 
00051 # in a particular coordinate frame.
00052 # 
00053 # sequence ID: consecutively increasing ID 
00054 uint32 seq
00055 #Two-integer timestamp that is expressed as:
00056 # * stamp.secs: seconds (stamp_secs) since epoch
00057 # * stamp.nsecs: nanoseconds since stamp_secs
00058 # time-handling sugar is provided by the client library
00059 time stamp
00060 #Frame this data is associated with
00061 # 0: no frame
00062 # 1: global frame
00063 string frame_id
00064 
00065 ================================================================================
00066 MSG: sensor_msgs/PointField
00067 # This message holds the description of one point entry in the
00068 # PointCloud2 message format.
00069 uint8 INT8    = 1
00070 uint8 UINT8   = 2
00071 uint8 INT16   = 3
00072 uint8 UINT16  = 4
00073 uint8 INT32   = 5
00074 uint8 UINT32  = 6
00075 uint8 FLOAT32 = 7
00076 uint8 FLOAT64 = 8
00077 
00078 string name      # Name of field
00079 uint32 offset    # Offset from start of point struct
00080 uint8  datatype  # Datatype enumeration, see above
00081 uint32 count     # How many elements in the field
00082 
00083 """
00084   __slots__ = ['input']
00085   _slot_types = ['sensor_msgs/PointCloud2']
00086 
00087   def __init__(self, *args, **kwds):
00088     """
00089     Constructor. Any message fields that are implicitly/explicitly
00090     set to None will be assigned a default value. The recommend
00091     use is keyword arguments as this is more robust to future message
00092     changes.  You cannot mix in-order arguments and keyword arguments.
00093 
00094     The available fields are:
00095        input
00096 
00097     :param args: complete set of field values, in .msg order
00098     :param kwds: use keyword arguments corresponding to message field names
00099     to set specific fields.
00100     """
00101     if args or kwds:
00102       super(ProcessPointCloud2Request, self).__init__(*args, **kwds)
00103       #message fields cannot be None, assign default values for those that are
00104       if self.input is None:
00105         self.input = sensor_msgs.msg.PointCloud2()
00106     else:
00107       self.input = sensor_msgs.msg.PointCloud2()
00108 
00109   def _get_types(self):
00110     """
00111     internal API method
00112     """
00113     return self._slot_types
00114 
00115   def serialize(self, buff):
00116     """
00117     serialize message into buffer
00118     :param buff: buffer, ``StringIO``
00119     """
00120     try:
00121       _x = self
00122       buff.write(_struct_3I.pack(_x.input.header.seq, _x.input.header.stamp.secs, _x.input.header.stamp.nsecs))
00123       _x = self.input.header.frame_id
00124       length = len(_x)
00125       if python3 or type(_x) == unicode:
00126         _x = _x.encode('utf-8')
00127         length = len(_x)
00128       buff.write(struct.pack('<I%ss'%length, length, _x))
00129       _x = self
00130       buff.write(_struct_2I.pack(_x.input.height, _x.input.width))
00131       length = len(self.input.fields)
00132       buff.write(_struct_I.pack(length))
00133       for val1 in self.input.fields:
00134         _x = val1.name
00135         length = len(_x)
00136         if python3 or type(_x) == unicode:
00137           _x = _x.encode('utf-8')
00138           length = len(_x)
00139         buff.write(struct.pack('<I%ss'%length, length, _x))
00140         _x = val1
00141         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00142       _x = self
00143       buff.write(_struct_B2I.pack(_x.input.is_bigendian, _x.input.point_step, _x.input.row_step))
00144       _x = self.input.data
00145       length = len(_x)
00146       # - if encoded as a list instead, serialize as bytes instead of string
00147       if type(_x) in [list, tuple]:
00148         buff.write(struct.pack('<I%sB'%length, length, *_x))
00149       else:
00150         buff.write(struct.pack('<I%ss'%length, length, _x))
00151       buff.write(_struct_B.pack(self.input.is_dense))
00152     except struct.error as se: self._check_types(se)
00153     except TypeError as te: self._check_types(te)
00154 
00155   def deserialize(self, str):
00156     """
00157     unpack serialized message in str into this message instance
00158     :param str: byte array of serialized message, ``str``
00159     """
00160     try:
00161       if self.input is None:
00162         self.input = sensor_msgs.msg.PointCloud2()
00163       end = 0
00164       _x = self
00165       start = end
00166       end += 12
00167       (_x.input.header.seq, _x.input.header.stamp.secs, _x.input.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00168       start = end
00169       end += 4
00170       (length,) = _struct_I.unpack(str[start:end])
00171       start = end
00172       end += length
00173       if python3:
00174         self.input.header.frame_id = str[start:end].decode('utf-8')
00175       else:
00176         self.input.header.frame_id = str[start:end]
00177       _x = self
00178       start = end
00179       end += 8
00180       (_x.input.height, _x.input.width,) = _struct_2I.unpack(str[start:end])
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       self.input.fields = []
00185       for i in range(0, length):
00186         val1 = sensor_msgs.msg.PointField()
00187         start = end
00188         end += 4
00189         (length,) = _struct_I.unpack(str[start:end])
00190         start = end
00191         end += length
00192         if python3:
00193           val1.name = str[start:end].decode('utf-8')
00194         else:
00195           val1.name = str[start:end]
00196         _x = val1
00197         start = end
00198         end += 9
00199         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00200         self.input.fields.append(val1)
00201       _x = self
00202       start = end
00203       end += 9
00204       (_x.input.is_bigendian, _x.input.point_step, _x.input.row_step,) = _struct_B2I.unpack(str[start:end])
00205       self.input.is_bigendian = bool(self.input.is_bigendian)
00206       start = end
00207       end += 4
00208       (length,) = _struct_I.unpack(str[start:end])
00209       start = end
00210       end += length
00211       if python3:
00212         self.input.data = str[start:end].decode('utf-8')
00213       else:
00214         self.input.data = str[start:end]
00215       start = end
00216       end += 1
00217       (self.input.is_dense,) = _struct_B.unpack(str[start:end])
00218       self.input.is_dense = bool(self.input.is_dense)
00219       return self
00220     except struct.error as e:
00221       raise genpy.DeserializationError(e) #most likely buffer underfill
00222 
00223 
00224   def serialize_numpy(self, buff, numpy):
00225     """
00226     serialize message with numpy array types into buffer
00227     :param buff: buffer, ``StringIO``
00228     :param numpy: numpy python module
00229     """
00230     try:
00231       _x = self
00232       buff.write(_struct_3I.pack(_x.input.header.seq, _x.input.header.stamp.secs, _x.input.header.stamp.nsecs))
00233       _x = self.input.header.frame_id
00234       length = len(_x)
00235       if python3 or type(_x) == unicode:
00236         _x = _x.encode('utf-8')
00237         length = len(_x)
00238       buff.write(struct.pack('<I%ss'%length, length, _x))
00239       _x = self
00240       buff.write(_struct_2I.pack(_x.input.height, _x.input.width))
00241       length = len(self.input.fields)
00242       buff.write(_struct_I.pack(length))
00243       for val1 in self.input.fields:
00244         _x = val1.name
00245         length = len(_x)
00246         if python3 or type(_x) == unicode:
00247           _x = _x.encode('utf-8')
00248           length = len(_x)
00249         buff.write(struct.pack('<I%ss'%length, length, _x))
00250         _x = val1
00251         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00252       _x = self
00253       buff.write(_struct_B2I.pack(_x.input.is_bigendian, _x.input.point_step, _x.input.row_step))
00254       _x = self.input.data
00255       length = len(_x)
00256       # - if encoded as a list instead, serialize as bytes instead of string
00257       if type(_x) in [list, tuple]:
00258         buff.write(struct.pack('<I%sB'%length, length, *_x))
00259       else:
00260         buff.write(struct.pack('<I%ss'%length, length, _x))
00261       buff.write(_struct_B.pack(self.input.is_dense))
00262     except struct.error as se: self._check_types(se)
00263     except TypeError as te: self._check_types(te)
00264 
00265   def deserialize_numpy(self, str, numpy):
00266     """
00267     unpack serialized message in str into this message instance using numpy for array types
00268     :param str: byte array of serialized message, ``str``
00269     :param numpy: numpy python module
00270     """
00271     try:
00272       if self.input is None:
00273         self.input = sensor_msgs.msg.PointCloud2()
00274       end = 0
00275       _x = self
00276       start = end
00277       end += 12
00278       (_x.input.header.seq, _x.input.header.stamp.secs, _x.input.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00279       start = end
00280       end += 4
00281       (length,) = _struct_I.unpack(str[start:end])
00282       start = end
00283       end += length
00284       if python3:
00285         self.input.header.frame_id = str[start:end].decode('utf-8')
00286       else:
00287         self.input.header.frame_id = str[start:end]
00288       _x = self
00289       start = end
00290       end += 8
00291       (_x.input.height, _x.input.width,) = _struct_2I.unpack(str[start:end])
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       self.input.fields = []
00296       for i in range(0, length):
00297         val1 = sensor_msgs.msg.PointField()
00298         start = end
00299         end += 4
00300         (length,) = _struct_I.unpack(str[start:end])
00301         start = end
00302         end += length
00303         if python3:
00304           val1.name = str[start:end].decode('utf-8')
00305         else:
00306           val1.name = str[start:end]
00307         _x = val1
00308         start = end
00309         end += 9
00310         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00311         self.input.fields.append(val1)
00312       _x = self
00313       start = end
00314       end += 9
00315       (_x.input.is_bigendian, _x.input.point_step, _x.input.row_step,) = _struct_B2I.unpack(str[start:end])
00316       self.input.is_bigendian = bool(self.input.is_bigendian)
00317       start = end
00318       end += 4
00319       (length,) = _struct_I.unpack(str[start:end])
00320       start = end
00321       end += length
00322       if python3:
00323         self.input.data = str[start:end].decode('utf-8')
00324       else:
00325         self.input.data = str[start:end]
00326       start = end
00327       end += 1
00328       (self.input.is_dense,) = _struct_B.unpack(str[start:end])
00329       self.input.is_dense = bool(self.input.is_dense)
00330       return self
00331     except struct.error as e:
00332       raise genpy.DeserializationError(e) #most likely buffer underfill
00333 
00334 _struct_I = genpy.struct_I
00335 _struct_IBI = struct.Struct("<IBI")
00336 _struct_3I = struct.Struct("<3I")
00337 _struct_B = struct.Struct("<B")
00338 _struct_2I = struct.Struct("<2I")
00339 _struct_B2I = struct.Struct("<B2I")
00340 """autogenerated by genpy from iri_perception_msgs/ProcessPointCloud2Response.msg. Do not edit."""
00341 import sys
00342 python3 = True if sys.hexversion > 0x03000000 else False
00343 import genpy
00344 import struct
00345 
00346 
00347 class ProcessPointCloud2Response(genpy.Message):
00348   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00349   _type = "iri_perception_msgs/ProcessPointCloud2Response"
00350   _has_header = False #flag to mark the presence of a Header object
00351   _full_text = """
00352 
00353 
00354 
00355 """
00356   __slots__ = []
00357   _slot_types = []
00358 
00359   def __init__(self, *args, **kwds):
00360     """
00361     Constructor. Any message fields that are implicitly/explicitly
00362     set to None will be assigned a default value. The recommend
00363     use is keyword arguments as this is more robust to future message
00364     changes.  You cannot mix in-order arguments and keyword arguments.
00365 
00366     The available fields are:
00367        
00368 
00369     :param args: complete set of field values, in .msg order
00370     :param kwds: use keyword arguments corresponding to message field names
00371     to set specific fields.
00372     """
00373     if args or kwds:
00374       super(ProcessPointCloud2Response, self).__init__(*args, **kwds)
00375 
00376   def _get_types(self):
00377     """
00378     internal API method
00379     """
00380     return self._slot_types
00381 
00382   def serialize(self, buff):
00383     """
00384     serialize message into buffer
00385     :param buff: buffer, ``StringIO``
00386     """
00387     try:
00388       pass
00389     except struct.error as se: self._check_types(se)
00390     except TypeError as te: self._check_types(te)
00391 
00392   def deserialize(self, str):
00393     """
00394     unpack serialized message in str into this message instance
00395     :param str: byte array of serialized message, ``str``
00396     """
00397     try:
00398       end = 0
00399       return self
00400     except struct.error as e:
00401       raise genpy.DeserializationError(e) #most likely buffer underfill
00402 
00403 
00404   def serialize_numpy(self, buff, numpy):
00405     """
00406     serialize message with numpy array types into buffer
00407     :param buff: buffer, ``StringIO``
00408     :param numpy: numpy python module
00409     """
00410     try:
00411       pass
00412     except struct.error as se: self._check_types(se)
00413     except TypeError as te: self._check_types(te)
00414 
00415   def deserialize_numpy(self, str, numpy):
00416     """
00417     unpack serialized message in str into this message instance using numpy for array types
00418     :param str: byte array of serialized message, ``str``
00419     :param numpy: numpy python module
00420     """
00421     try:
00422       end = 0
00423       return self
00424     except struct.error as e:
00425       raise genpy.DeserializationError(e) #most likely buffer underfill
00426 
00427 _struct_I = genpy.struct_I
00428 class ProcessPointCloud2(object):
00429   _type          = 'iri_perception_msgs/ProcessPointCloud2'
00430   _md5sum = '55c5f2a1ba5379341fa496de58e8d437'
00431   _request_class  = ProcessPointCloud2Request
00432   _response_class = ProcessPointCloud2Response


iri_perception_msgs
Author(s):
autogenerated on Fri Dec 6 2013 20:02:15