_ApplyPointCloudFilter.py
Go to the documentation of this file.
00001 """autogenerated by genpy from zyonz_msgs/ApplyPointCloudFilterRequest.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 ApplyPointCloudFilterRequest(genpy.Message):
00011   _md5sum = "cc8a0ff70cde5ed9daa21011f9ebd9fc"
00012   _type = "zyonz_msgs/ApplyPointCloudFilterRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 sensor_msgs/PointCloud2 input_pc
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_pc']
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_pc
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(ApplyPointCloudFilterRequest, self).__init__(*args, **kwds)
00103       #message fields cannot be None, assign default values for those that are
00104       if self.input_pc is None:
00105         self.input_pc = sensor_msgs.msg.PointCloud2()
00106     else:
00107       self.input_pc = 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_pc.header.seq, _x.input_pc.header.stamp.secs, _x.input_pc.header.stamp.nsecs))
00123       _x = self.input_pc.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_pc.height, _x.input_pc.width))
00131       length = len(self.input_pc.fields)
00132       buff.write(_struct_I.pack(length))
00133       for val1 in self.input_pc.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_pc.is_bigendian, _x.input_pc.point_step, _x.input_pc.row_step))
00144       _x = self.input_pc.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_pc.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_pc is None:
00162         self.input_pc = sensor_msgs.msg.PointCloud2()
00163       end = 0
00164       _x = self
00165       start = end
00166       end += 12
00167       (_x.input_pc.header.seq, _x.input_pc.header.stamp.secs, _x.input_pc.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_pc.header.frame_id = str[start:end].decode('utf-8')
00175       else:
00176         self.input_pc.header.frame_id = str[start:end]
00177       _x = self
00178       start = end
00179       end += 8
00180       (_x.input_pc.height, _x.input_pc.width,) = _struct_2I.unpack(str[start:end])
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       self.input_pc.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_pc.fields.append(val1)
00201       _x = self
00202       start = end
00203       end += 9
00204       (_x.input_pc.is_bigendian, _x.input_pc.point_step, _x.input_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00205       self.input_pc.is_bigendian = bool(self.input_pc.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_pc.data = str[start:end].decode('utf-8')
00213       else:
00214         self.input_pc.data = str[start:end]
00215       start = end
00216       end += 1
00217       (self.input_pc.is_dense,) = _struct_B.unpack(str[start:end])
00218       self.input_pc.is_dense = bool(self.input_pc.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_pc.header.seq, _x.input_pc.header.stamp.secs, _x.input_pc.header.stamp.nsecs))
00233       _x = self.input_pc.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_pc.height, _x.input_pc.width))
00241       length = len(self.input_pc.fields)
00242       buff.write(_struct_I.pack(length))
00243       for val1 in self.input_pc.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_pc.is_bigendian, _x.input_pc.point_step, _x.input_pc.row_step))
00254       _x = self.input_pc.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_pc.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_pc is None:
00273         self.input_pc = sensor_msgs.msg.PointCloud2()
00274       end = 0
00275       _x = self
00276       start = end
00277       end += 12
00278       (_x.input_pc.header.seq, _x.input_pc.header.stamp.secs, _x.input_pc.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_pc.header.frame_id = str[start:end].decode('utf-8')
00286       else:
00287         self.input_pc.header.frame_id = str[start:end]
00288       _x = self
00289       start = end
00290       end += 8
00291       (_x.input_pc.height, _x.input_pc.width,) = _struct_2I.unpack(str[start:end])
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       self.input_pc.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_pc.fields.append(val1)
00312       _x = self
00313       start = end
00314       end += 9
00315       (_x.input_pc.is_bigendian, _x.input_pc.point_step, _x.input_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00316       self.input_pc.is_bigendian = bool(self.input_pc.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_pc.data = str[start:end].decode('utf-8')
00324       else:
00325         self.input_pc.data = str[start:end]
00326       start = end
00327       end += 1
00328       (self.input_pc.is_dense,) = _struct_B.unpack(str[start:end])
00329       self.input_pc.is_dense = bool(self.input_pc.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 zyonz_msgs/ApplyPointCloudFilterResponse.msg. Do not edit."""
00341 import sys
00342 python3 = True if sys.hexversion > 0x03000000 else False
00343 import genpy
00344 import struct
00345 
00346 import std_msgs.msg
00347 import sensor_msgs.msg
00348 
00349 class ApplyPointCloudFilterResponse(genpy.Message):
00350   _md5sum = "029366dd83e506ca83f89e1c5d93a1be"
00351   _type = "zyonz_msgs/ApplyPointCloudFilterResponse"
00352   _has_header = False #flag to mark the presence of a Header object
00353   _full_text = """
00354 sensor_msgs/PointCloud2 filtered_pc
00355 sensor_msgs/PointCloud2 residual_pc
00356 
00357 
00358 ================================================================================
00359 MSG: sensor_msgs/PointCloud2
00360 # This message holds a collection of N-dimensional points, which may
00361 # contain additional information such as normals, intensity, etc. The
00362 # point data is stored as a binary blob, its layout described by the
00363 # contents of the "fields" array.
00364 
00365 # The point cloud data may be organized 2d (image-like) or 1d
00366 # (unordered). Point clouds organized as 2d images may be produced by
00367 # camera depth sensors such as stereo or time-of-flight.
00368 
00369 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00370 # points).
00371 Header header
00372 
00373 # 2D structure of the point cloud. If the cloud is unordered, height is
00374 # 1 and width is the length of the point cloud.
00375 uint32 height
00376 uint32 width
00377 
00378 # Describes the channels and their layout in the binary data blob.
00379 PointField[] fields
00380 
00381 bool    is_bigendian # Is this data bigendian?
00382 uint32  point_step   # Length of a point in bytes
00383 uint32  row_step     # Length of a row in bytes
00384 uint8[] data         # Actual point data, size is (row_step*height)
00385 
00386 bool is_dense        # True if there are no invalid points
00387 
00388 ================================================================================
00389 MSG: std_msgs/Header
00390 # Standard metadata for higher-level stamped data types.
00391 # This is generally used to communicate timestamped data 
00392 # in a particular coordinate frame.
00393 # 
00394 # sequence ID: consecutively increasing ID 
00395 uint32 seq
00396 #Two-integer timestamp that is expressed as:
00397 # * stamp.secs: seconds (stamp_secs) since epoch
00398 # * stamp.nsecs: nanoseconds since stamp_secs
00399 # time-handling sugar is provided by the client library
00400 time stamp
00401 #Frame this data is associated with
00402 # 0: no frame
00403 # 1: global frame
00404 string frame_id
00405 
00406 ================================================================================
00407 MSG: sensor_msgs/PointField
00408 # This message holds the description of one point entry in the
00409 # PointCloud2 message format.
00410 uint8 INT8    = 1
00411 uint8 UINT8   = 2
00412 uint8 INT16   = 3
00413 uint8 UINT16  = 4
00414 uint8 INT32   = 5
00415 uint8 UINT32  = 6
00416 uint8 FLOAT32 = 7
00417 uint8 FLOAT64 = 8
00418 
00419 string name      # Name of field
00420 uint32 offset    # Offset from start of point struct
00421 uint8  datatype  # Datatype enumeration, see above
00422 uint32 count     # How many elements in the field
00423 
00424 """
00425   __slots__ = ['filtered_pc','residual_pc']
00426   _slot_types = ['sensor_msgs/PointCloud2','sensor_msgs/PointCloud2']
00427 
00428   def __init__(self, *args, **kwds):
00429     """
00430     Constructor. Any message fields that are implicitly/explicitly
00431     set to None will be assigned a default value. The recommend
00432     use is keyword arguments as this is more robust to future message
00433     changes.  You cannot mix in-order arguments and keyword arguments.
00434 
00435     The available fields are:
00436        filtered_pc,residual_pc
00437 
00438     :param args: complete set of field values, in .msg order
00439     :param kwds: use keyword arguments corresponding to message field names
00440     to set specific fields.
00441     """
00442     if args or kwds:
00443       super(ApplyPointCloudFilterResponse, self).__init__(*args, **kwds)
00444       #message fields cannot be None, assign default values for those that are
00445       if self.filtered_pc is None:
00446         self.filtered_pc = sensor_msgs.msg.PointCloud2()
00447       if self.residual_pc is None:
00448         self.residual_pc = sensor_msgs.msg.PointCloud2()
00449     else:
00450       self.filtered_pc = sensor_msgs.msg.PointCloud2()
00451       self.residual_pc = sensor_msgs.msg.PointCloud2()
00452 
00453   def _get_types(self):
00454     """
00455     internal API method
00456     """
00457     return self._slot_types
00458 
00459   def serialize(self, buff):
00460     """
00461     serialize message into buffer
00462     :param buff: buffer, ``StringIO``
00463     """
00464     try:
00465       _x = self
00466       buff.write(_struct_3I.pack(_x.filtered_pc.header.seq, _x.filtered_pc.header.stamp.secs, _x.filtered_pc.header.stamp.nsecs))
00467       _x = self.filtered_pc.header.frame_id
00468       length = len(_x)
00469       if python3 or type(_x) == unicode:
00470         _x = _x.encode('utf-8')
00471         length = len(_x)
00472       buff.write(struct.pack('<I%ss'%length, length, _x))
00473       _x = self
00474       buff.write(_struct_2I.pack(_x.filtered_pc.height, _x.filtered_pc.width))
00475       length = len(self.filtered_pc.fields)
00476       buff.write(_struct_I.pack(length))
00477       for val1 in self.filtered_pc.fields:
00478         _x = val1.name
00479         length = len(_x)
00480         if python3 or type(_x) == unicode:
00481           _x = _x.encode('utf-8')
00482           length = len(_x)
00483         buff.write(struct.pack('<I%ss'%length, length, _x))
00484         _x = val1
00485         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00486       _x = self
00487       buff.write(_struct_B2I.pack(_x.filtered_pc.is_bigendian, _x.filtered_pc.point_step, _x.filtered_pc.row_step))
00488       _x = self.filtered_pc.data
00489       length = len(_x)
00490       # - if encoded as a list instead, serialize as bytes instead of string
00491       if type(_x) in [list, tuple]:
00492         buff.write(struct.pack('<I%sB'%length, length, *_x))
00493       else:
00494         buff.write(struct.pack('<I%ss'%length, length, _x))
00495       _x = self
00496       buff.write(_struct_B3I.pack(_x.filtered_pc.is_dense, _x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs))
00497       _x = self.residual_pc.header.frame_id
00498       length = len(_x)
00499       if python3 or type(_x) == unicode:
00500         _x = _x.encode('utf-8')
00501         length = len(_x)
00502       buff.write(struct.pack('<I%ss'%length, length, _x))
00503       _x = self
00504       buff.write(_struct_2I.pack(_x.residual_pc.height, _x.residual_pc.width))
00505       length = len(self.residual_pc.fields)
00506       buff.write(_struct_I.pack(length))
00507       for val1 in self.residual_pc.fields:
00508         _x = val1.name
00509         length = len(_x)
00510         if python3 or type(_x) == unicode:
00511           _x = _x.encode('utf-8')
00512           length = len(_x)
00513         buff.write(struct.pack('<I%ss'%length, length, _x))
00514         _x = val1
00515         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00516       _x = self
00517       buff.write(_struct_B2I.pack(_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step))
00518       _x = self.residual_pc.data
00519       length = len(_x)
00520       # - if encoded as a list instead, serialize as bytes instead of string
00521       if type(_x) in [list, tuple]:
00522         buff.write(struct.pack('<I%sB'%length, length, *_x))
00523       else:
00524         buff.write(struct.pack('<I%ss'%length, length, _x))
00525       buff.write(_struct_B.pack(self.residual_pc.is_dense))
00526     except struct.error as se: self._check_types(se)
00527     except TypeError as te: self._check_types(te)
00528 
00529   def deserialize(self, str):
00530     """
00531     unpack serialized message in str into this message instance
00532     :param str: byte array of serialized message, ``str``
00533     """
00534     try:
00535       if self.filtered_pc is None:
00536         self.filtered_pc = sensor_msgs.msg.PointCloud2()
00537       if self.residual_pc is None:
00538         self.residual_pc = sensor_msgs.msg.PointCloud2()
00539       end = 0
00540       _x = self
00541       start = end
00542       end += 12
00543       (_x.filtered_pc.header.seq, _x.filtered_pc.header.stamp.secs, _x.filtered_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00544       start = end
00545       end += 4
00546       (length,) = _struct_I.unpack(str[start:end])
00547       start = end
00548       end += length
00549       if python3:
00550         self.filtered_pc.header.frame_id = str[start:end].decode('utf-8')
00551       else:
00552         self.filtered_pc.header.frame_id = str[start:end]
00553       _x = self
00554       start = end
00555       end += 8
00556       (_x.filtered_pc.height, _x.filtered_pc.width,) = _struct_2I.unpack(str[start:end])
00557       start = end
00558       end += 4
00559       (length,) = _struct_I.unpack(str[start:end])
00560       self.filtered_pc.fields = []
00561       for i in range(0, length):
00562         val1 = sensor_msgs.msg.PointField()
00563         start = end
00564         end += 4
00565         (length,) = _struct_I.unpack(str[start:end])
00566         start = end
00567         end += length
00568         if python3:
00569           val1.name = str[start:end].decode('utf-8')
00570         else:
00571           val1.name = str[start:end]
00572         _x = val1
00573         start = end
00574         end += 9
00575         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00576         self.filtered_pc.fields.append(val1)
00577       _x = self
00578       start = end
00579       end += 9
00580       (_x.filtered_pc.is_bigendian, _x.filtered_pc.point_step, _x.filtered_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00581       self.filtered_pc.is_bigendian = bool(self.filtered_pc.is_bigendian)
00582       start = end
00583       end += 4
00584       (length,) = _struct_I.unpack(str[start:end])
00585       start = end
00586       end += length
00587       if python3:
00588         self.filtered_pc.data = str[start:end].decode('utf-8')
00589       else:
00590         self.filtered_pc.data = str[start:end]
00591       _x = self
00592       start = end
00593       end += 13
00594       (_x.filtered_pc.is_dense, _x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00595       self.filtered_pc.is_dense = bool(self.filtered_pc.is_dense)
00596       start = end
00597       end += 4
00598       (length,) = _struct_I.unpack(str[start:end])
00599       start = end
00600       end += length
00601       if python3:
00602         self.residual_pc.header.frame_id = str[start:end].decode('utf-8')
00603       else:
00604         self.residual_pc.header.frame_id = str[start:end]
00605       _x = self
00606       start = end
00607       end += 8
00608       (_x.residual_pc.height, _x.residual_pc.width,) = _struct_2I.unpack(str[start:end])
00609       start = end
00610       end += 4
00611       (length,) = _struct_I.unpack(str[start:end])
00612       self.residual_pc.fields = []
00613       for i in range(0, length):
00614         val1 = sensor_msgs.msg.PointField()
00615         start = end
00616         end += 4
00617         (length,) = _struct_I.unpack(str[start:end])
00618         start = end
00619         end += length
00620         if python3:
00621           val1.name = str[start:end].decode('utf-8')
00622         else:
00623           val1.name = str[start:end]
00624         _x = val1
00625         start = end
00626         end += 9
00627         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00628         self.residual_pc.fields.append(val1)
00629       _x = self
00630       start = end
00631       end += 9
00632       (_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00633       self.residual_pc.is_bigendian = bool(self.residual_pc.is_bigendian)
00634       start = end
00635       end += 4
00636       (length,) = _struct_I.unpack(str[start:end])
00637       start = end
00638       end += length
00639       if python3:
00640         self.residual_pc.data = str[start:end].decode('utf-8')
00641       else:
00642         self.residual_pc.data = str[start:end]
00643       start = end
00644       end += 1
00645       (self.residual_pc.is_dense,) = _struct_B.unpack(str[start:end])
00646       self.residual_pc.is_dense = bool(self.residual_pc.is_dense)
00647       return self
00648     except struct.error as e:
00649       raise genpy.DeserializationError(e) #most likely buffer underfill
00650 
00651 
00652   def serialize_numpy(self, buff, numpy):
00653     """
00654     serialize message with numpy array types into buffer
00655     :param buff: buffer, ``StringIO``
00656     :param numpy: numpy python module
00657     """
00658     try:
00659       _x = self
00660       buff.write(_struct_3I.pack(_x.filtered_pc.header.seq, _x.filtered_pc.header.stamp.secs, _x.filtered_pc.header.stamp.nsecs))
00661       _x = self.filtered_pc.header.frame_id
00662       length = len(_x)
00663       if python3 or type(_x) == unicode:
00664         _x = _x.encode('utf-8')
00665         length = len(_x)
00666       buff.write(struct.pack('<I%ss'%length, length, _x))
00667       _x = self
00668       buff.write(_struct_2I.pack(_x.filtered_pc.height, _x.filtered_pc.width))
00669       length = len(self.filtered_pc.fields)
00670       buff.write(_struct_I.pack(length))
00671       for val1 in self.filtered_pc.fields:
00672         _x = val1.name
00673         length = len(_x)
00674         if python3 or type(_x) == unicode:
00675           _x = _x.encode('utf-8')
00676           length = len(_x)
00677         buff.write(struct.pack('<I%ss'%length, length, _x))
00678         _x = val1
00679         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00680       _x = self
00681       buff.write(_struct_B2I.pack(_x.filtered_pc.is_bigendian, _x.filtered_pc.point_step, _x.filtered_pc.row_step))
00682       _x = self.filtered_pc.data
00683       length = len(_x)
00684       # - if encoded as a list instead, serialize as bytes instead of string
00685       if type(_x) in [list, tuple]:
00686         buff.write(struct.pack('<I%sB'%length, length, *_x))
00687       else:
00688         buff.write(struct.pack('<I%ss'%length, length, _x))
00689       _x = self
00690       buff.write(_struct_B3I.pack(_x.filtered_pc.is_dense, _x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs))
00691       _x = self.residual_pc.header.frame_id
00692       length = len(_x)
00693       if python3 or type(_x) == unicode:
00694         _x = _x.encode('utf-8')
00695         length = len(_x)
00696       buff.write(struct.pack('<I%ss'%length, length, _x))
00697       _x = self
00698       buff.write(_struct_2I.pack(_x.residual_pc.height, _x.residual_pc.width))
00699       length = len(self.residual_pc.fields)
00700       buff.write(_struct_I.pack(length))
00701       for val1 in self.residual_pc.fields:
00702         _x = val1.name
00703         length = len(_x)
00704         if python3 or type(_x) == unicode:
00705           _x = _x.encode('utf-8')
00706           length = len(_x)
00707         buff.write(struct.pack('<I%ss'%length, length, _x))
00708         _x = val1
00709         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00710       _x = self
00711       buff.write(_struct_B2I.pack(_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step))
00712       _x = self.residual_pc.data
00713       length = len(_x)
00714       # - if encoded as a list instead, serialize as bytes instead of string
00715       if type(_x) in [list, tuple]:
00716         buff.write(struct.pack('<I%sB'%length, length, *_x))
00717       else:
00718         buff.write(struct.pack('<I%ss'%length, length, _x))
00719       buff.write(_struct_B.pack(self.residual_pc.is_dense))
00720     except struct.error as se: self._check_types(se)
00721     except TypeError as te: self._check_types(te)
00722 
00723   def deserialize_numpy(self, str, numpy):
00724     """
00725     unpack serialized message in str into this message instance using numpy for array types
00726     :param str: byte array of serialized message, ``str``
00727     :param numpy: numpy python module
00728     """
00729     try:
00730       if self.filtered_pc is None:
00731         self.filtered_pc = sensor_msgs.msg.PointCloud2()
00732       if self.residual_pc is None:
00733         self.residual_pc = sensor_msgs.msg.PointCloud2()
00734       end = 0
00735       _x = self
00736       start = end
00737       end += 12
00738       (_x.filtered_pc.header.seq, _x.filtered_pc.header.stamp.secs, _x.filtered_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00739       start = end
00740       end += 4
00741       (length,) = _struct_I.unpack(str[start:end])
00742       start = end
00743       end += length
00744       if python3:
00745         self.filtered_pc.header.frame_id = str[start:end].decode('utf-8')
00746       else:
00747         self.filtered_pc.header.frame_id = str[start:end]
00748       _x = self
00749       start = end
00750       end += 8
00751       (_x.filtered_pc.height, _x.filtered_pc.width,) = _struct_2I.unpack(str[start:end])
00752       start = end
00753       end += 4
00754       (length,) = _struct_I.unpack(str[start:end])
00755       self.filtered_pc.fields = []
00756       for i in range(0, length):
00757         val1 = sensor_msgs.msg.PointField()
00758         start = end
00759         end += 4
00760         (length,) = _struct_I.unpack(str[start:end])
00761         start = end
00762         end += length
00763         if python3:
00764           val1.name = str[start:end].decode('utf-8')
00765         else:
00766           val1.name = str[start:end]
00767         _x = val1
00768         start = end
00769         end += 9
00770         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00771         self.filtered_pc.fields.append(val1)
00772       _x = self
00773       start = end
00774       end += 9
00775       (_x.filtered_pc.is_bigendian, _x.filtered_pc.point_step, _x.filtered_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00776       self.filtered_pc.is_bigendian = bool(self.filtered_pc.is_bigendian)
00777       start = end
00778       end += 4
00779       (length,) = _struct_I.unpack(str[start:end])
00780       start = end
00781       end += length
00782       if python3:
00783         self.filtered_pc.data = str[start:end].decode('utf-8')
00784       else:
00785         self.filtered_pc.data = str[start:end]
00786       _x = self
00787       start = end
00788       end += 13
00789       (_x.filtered_pc.is_dense, _x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00790       self.filtered_pc.is_dense = bool(self.filtered_pc.is_dense)
00791       start = end
00792       end += 4
00793       (length,) = _struct_I.unpack(str[start:end])
00794       start = end
00795       end += length
00796       if python3:
00797         self.residual_pc.header.frame_id = str[start:end].decode('utf-8')
00798       else:
00799         self.residual_pc.header.frame_id = str[start:end]
00800       _x = self
00801       start = end
00802       end += 8
00803       (_x.residual_pc.height, _x.residual_pc.width,) = _struct_2I.unpack(str[start:end])
00804       start = end
00805       end += 4
00806       (length,) = _struct_I.unpack(str[start:end])
00807       self.residual_pc.fields = []
00808       for i in range(0, length):
00809         val1 = sensor_msgs.msg.PointField()
00810         start = end
00811         end += 4
00812         (length,) = _struct_I.unpack(str[start:end])
00813         start = end
00814         end += length
00815         if python3:
00816           val1.name = str[start:end].decode('utf-8')
00817         else:
00818           val1.name = str[start:end]
00819         _x = val1
00820         start = end
00821         end += 9
00822         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00823         self.residual_pc.fields.append(val1)
00824       _x = self
00825       start = end
00826       end += 9
00827       (_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00828       self.residual_pc.is_bigendian = bool(self.residual_pc.is_bigendian)
00829       start = end
00830       end += 4
00831       (length,) = _struct_I.unpack(str[start:end])
00832       start = end
00833       end += length
00834       if python3:
00835         self.residual_pc.data = str[start:end].decode('utf-8')
00836       else:
00837         self.residual_pc.data = str[start:end]
00838       start = end
00839       end += 1
00840       (self.residual_pc.is_dense,) = _struct_B.unpack(str[start:end])
00841       self.residual_pc.is_dense = bool(self.residual_pc.is_dense)
00842       return self
00843     except struct.error as e:
00844       raise genpy.DeserializationError(e) #most likely buffer underfill
00845 
00846 _struct_I = genpy.struct_I
00847 _struct_IBI = struct.Struct("<IBI")
00848 _struct_B = struct.Struct("<B")
00849 _struct_3I = struct.Struct("<3I")
00850 _struct_B3I = struct.Struct("<B3I")
00851 _struct_B2I = struct.Struct("<B2I")
00852 _struct_2I = struct.Struct("<2I")
00853 class ApplyPointCloudFilter(object):
00854   _type          = 'zyonz_msgs/ApplyPointCloudFilter'
00855   _md5sum = '826d5c108e211c03a9c1beaedae1a89e'
00856   _request_class  = ApplyPointCloudFilterRequest
00857   _response_class = ApplyPointCloudFilterResponse


zyonz_msgs
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 19:56:17