_SmoothClutter.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cpl_superpixels/SmoothClutterRequest.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 SmoothClutterRequest(genpy.Message):
00011   _md5sum = "3ce31802bb303912f7f0df69d249fd35"
00012   _type = "cpl_superpixels/SmoothClutterRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """sensor_msgs/Image clutter_labels
00015 sensor_msgs/Image raw_img
00016 
00017 ================================================================================
00018 MSG: sensor_msgs/Image
00019 # This message contains an uncompressed image
00020 # (0, 0) is at top-left corner of image
00021 #
00022 
00023 Header header        # Header timestamp should be acquisition time of image
00024                      # Header frame_id should be optical frame of camera
00025                      # origin of frame should be optical center of cameara
00026                      # +x should point to the right in the image
00027                      # +y should point down in the image
00028                      # +z should point into to plane of the image
00029                      # If the frame_id here and the frame_id of the CameraInfo
00030                      # message associated with the image conflict
00031                      # the behavior is undefined
00032 
00033 uint32 height         # image height, that is, number of rows
00034 uint32 width          # image width, that is, number of columns
00035 
00036 # The legal values for encoding are in file src/image_encodings.cpp
00037 # If you want to standardize a new string format, join
00038 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00039 
00040 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00041                       # taken from the list of strings in src/image_encodings.cpp
00042 
00043 uint8 is_bigendian    # is this data bigendian?
00044 uint32 step           # Full row length in bytes
00045 uint8[] data          # actual matrix data, size is (step * rows)
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   __slots__ = ['clutter_labels','raw_img']
00067   _slot_types = ['sensor_msgs/Image','sensor_msgs/Image']
00068 
00069   def __init__(self, *args, **kwds):
00070     """
00071     Constructor. Any message fields that are implicitly/explicitly
00072     set to None will be assigned a default value. The recommend
00073     use is keyword arguments as this is more robust to future message
00074     changes.  You cannot mix in-order arguments and keyword arguments.
00075 
00076     The available fields are:
00077        clutter_labels,raw_img
00078 
00079     :param args: complete set of field values, in .msg order
00080     :param kwds: use keyword arguments corresponding to message field names
00081     to set specific fields.
00082     """
00083     if args or kwds:
00084       super(SmoothClutterRequest, self).__init__(*args, **kwds)
00085       #message fields cannot be None, assign default values for those that are
00086       if self.clutter_labels is None:
00087         self.clutter_labels = sensor_msgs.msg.Image()
00088       if self.raw_img is None:
00089         self.raw_img = sensor_msgs.msg.Image()
00090     else:
00091       self.clutter_labels = sensor_msgs.msg.Image()
00092       self.raw_img = sensor_msgs.msg.Image()
00093 
00094   def _get_types(self):
00095     """
00096     internal API method
00097     """
00098     return self._slot_types
00099 
00100   def serialize(self, buff):
00101     """
00102     serialize message into buffer
00103     :param buff: buffer, ``StringIO``
00104     """
00105     try:
00106       _x = self
00107       buff.write(_struct_3I.pack(_x.clutter_labels.header.seq, _x.clutter_labels.header.stamp.secs, _x.clutter_labels.header.stamp.nsecs))
00108       _x = self.clutter_labels.header.frame_id
00109       length = len(_x)
00110       if python3 or type(_x) == unicode:
00111         _x = _x.encode('utf-8')
00112         length = len(_x)
00113       buff.write(struct.pack('<I%ss'%length, length, _x))
00114       _x = self
00115       buff.write(_struct_2I.pack(_x.clutter_labels.height, _x.clutter_labels.width))
00116       _x = self.clutter_labels.encoding
00117       length = len(_x)
00118       if python3 or type(_x) == unicode:
00119         _x = _x.encode('utf-8')
00120         length = len(_x)
00121       buff.write(struct.pack('<I%ss'%length, length, _x))
00122       _x = self
00123       buff.write(_struct_BI.pack(_x.clutter_labels.is_bigendian, _x.clutter_labels.step))
00124       _x = self.clutter_labels.data
00125       length = len(_x)
00126       # - if encoded as a list instead, serialize as bytes instead of string
00127       if type(_x) in [list, tuple]:
00128         buff.write(struct.pack('<I%sB'%length, length, *_x))
00129       else:
00130         buff.write(struct.pack('<I%ss'%length, length, _x))
00131       _x = self
00132       buff.write(_struct_3I.pack(_x.raw_img.header.seq, _x.raw_img.header.stamp.secs, _x.raw_img.header.stamp.nsecs))
00133       _x = self.raw_img.header.frame_id
00134       length = len(_x)
00135       if python3 or type(_x) == unicode:
00136         _x = _x.encode('utf-8')
00137         length = len(_x)
00138       buff.write(struct.pack('<I%ss'%length, length, _x))
00139       _x = self
00140       buff.write(_struct_2I.pack(_x.raw_img.height, _x.raw_img.width))
00141       _x = self.raw_img.encoding
00142       length = len(_x)
00143       if python3 or type(_x) == unicode:
00144         _x = _x.encode('utf-8')
00145         length = len(_x)
00146       buff.write(struct.pack('<I%ss'%length, length, _x))
00147       _x = self
00148       buff.write(_struct_BI.pack(_x.raw_img.is_bigendian, _x.raw_img.step))
00149       _x = self.raw_img.data
00150       length = len(_x)
00151       # - if encoded as a list instead, serialize as bytes instead of string
00152       if type(_x) in [list, tuple]:
00153         buff.write(struct.pack('<I%sB'%length, length, *_x))
00154       else:
00155         buff.write(struct.pack('<I%ss'%length, length, _x))
00156     except struct.error as se: self._check_types(se)
00157     except TypeError as te: self._check_types(te)
00158 
00159   def deserialize(self, str):
00160     """
00161     unpack serialized message in str into this message instance
00162     :param str: byte array of serialized message, ``str``
00163     """
00164     try:
00165       if self.clutter_labels is None:
00166         self.clutter_labels = sensor_msgs.msg.Image()
00167       if self.raw_img is None:
00168         self.raw_img = sensor_msgs.msg.Image()
00169       end = 0
00170       _x = self
00171       start = end
00172       end += 12
00173       (_x.clutter_labels.header.seq, _x.clutter_labels.header.stamp.secs, _x.clutter_labels.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00174       start = end
00175       end += 4
00176       (length,) = _struct_I.unpack(str[start:end])
00177       start = end
00178       end += length
00179       if python3:
00180         self.clutter_labels.header.frame_id = str[start:end].decode('utf-8')
00181       else:
00182         self.clutter_labels.header.frame_id = str[start:end]
00183       _x = self
00184       start = end
00185       end += 8
00186       (_x.clutter_labels.height, _x.clutter_labels.width,) = _struct_2I.unpack(str[start:end])
00187       start = end
00188       end += 4
00189       (length,) = _struct_I.unpack(str[start:end])
00190       start = end
00191       end += length
00192       if python3:
00193         self.clutter_labels.encoding = str[start:end].decode('utf-8')
00194       else:
00195         self.clutter_labels.encoding = str[start:end]
00196       _x = self
00197       start = end
00198       end += 5
00199       (_x.clutter_labels.is_bigendian, _x.clutter_labels.step,) = _struct_BI.unpack(str[start:end])
00200       start = end
00201       end += 4
00202       (length,) = _struct_I.unpack(str[start:end])
00203       start = end
00204       end += length
00205       if python3:
00206         self.clutter_labels.data = str[start:end].decode('utf-8')
00207       else:
00208         self.clutter_labels.data = str[start:end]
00209       _x = self
00210       start = end
00211       end += 12
00212       (_x.raw_img.header.seq, _x.raw_img.header.stamp.secs, _x.raw_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00213       start = end
00214       end += 4
00215       (length,) = _struct_I.unpack(str[start:end])
00216       start = end
00217       end += length
00218       if python3:
00219         self.raw_img.header.frame_id = str[start:end].decode('utf-8')
00220       else:
00221         self.raw_img.header.frame_id = str[start:end]
00222       _x = self
00223       start = end
00224       end += 8
00225       (_x.raw_img.height, _x.raw_img.width,) = _struct_2I.unpack(str[start:end])
00226       start = end
00227       end += 4
00228       (length,) = _struct_I.unpack(str[start:end])
00229       start = end
00230       end += length
00231       if python3:
00232         self.raw_img.encoding = str[start:end].decode('utf-8')
00233       else:
00234         self.raw_img.encoding = str[start:end]
00235       _x = self
00236       start = end
00237       end += 5
00238       (_x.raw_img.is_bigendian, _x.raw_img.step,) = _struct_BI.unpack(str[start:end])
00239       start = end
00240       end += 4
00241       (length,) = _struct_I.unpack(str[start:end])
00242       start = end
00243       end += length
00244       if python3:
00245         self.raw_img.data = str[start:end].decode('utf-8')
00246       else:
00247         self.raw_img.data = 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       _x = self
00261       buff.write(_struct_3I.pack(_x.clutter_labels.header.seq, _x.clutter_labels.header.stamp.secs, _x.clutter_labels.header.stamp.nsecs))
00262       _x = self.clutter_labels.header.frame_id
00263       length = len(_x)
00264       if python3 or type(_x) == unicode:
00265         _x = _x.encode('utf-8')
00266         length = len(_x)
00267       buff.write(struct.pack('<I%ss'%length, length, _x))
00268       _x = self
00269       buff.write(_struct_2I.pack(_x.clutter_labels.height, _x.clutter_labels.width))
00270       _x = self.clutter_labels.encoding
00271       length = len(_x)
00272       if python3 or type(_x) == unicode:
00273         _x = _x.encode('utf-8')
00274         length = len(_x)
00275       buff.write(struct.pack('<I%ss'%length, length, _x))
00276       _x = self
00277       buff.write(_struct_BI.pack(_x.clutter_labels.is_bigendian, _x.clutter_labels.step))
00278       _x = self.clutter_labels.data
00279       length = len(_x)
00280       # - if encoded as a list instead, serialize as bytes instead of string
00281       if type(_x) in [list, tuple]:
00282         buff.write(struct.pack('<I%sB'%length, length, *_x))
00283       else:
00284         buff.write(struct.pack('<I%ss'%length, length, _x))
00285       _x = self
00286       buff.write(_struct_3I.pack(_x.raw_img.header.seq, _x.raw_img.header.stamp.secs, _x.raw_img.header.stamp.nsecs))
00287       _x = self.raw_img.header.frame_id
00288       length = len(_x)
00289       if python3 or type(_x) == unicode:
00290         _x = _x.encode('utf-8')
00291         length = len(_x)
00292       buff.write(struct.pack('<I%ss'%length, length, _x))
00293       _x = self
00294       buff.write(_struct_2I.pack(_x.raw_img.height, _x.raw_img.width))
00295       _x = self.raw_img.encoding
00296       length = len(_x)
00297       if python3 or type(_x) == unicode:
00298         _x = _x.encode('utf-8')
00299         length = len(_x)
00300       buff.write(struct.pack('<I%ss'%length, length, _x))
00301       _x = self
00302       buff.write(_struct_BI.pack(_x.raw_img.is_bigendian, _x.raw_img.step))
00303       _x = self.raw_img.data
00304       length = len(_x)
00305       # - if encoded as a list instead, serialize as bytes instead of string
00306       if type(_x) in [list, tuple]:
00307         buff.write(struct.pack('<I%sB'%length, length, *_x))
00308       else:
00309         buff.write(struct.pack('<I%ss'%length, length, _x))
00310     except struct.error as se: self._check_types(se)
00311     except TypeError as te: self._check_types(te)
00312 
00313   def deserialize_numpy(self, str, numpy):
00314     """
00315     unpack serialized message in str into this message instance using numpy for array types
00316     :param str: byte array of serialized message, ``str``
00317     :param numpy: numpy python module
00318     """
00319     try:
00320       if self.clutter_labels is None:
00321         self.clutter_labels = sensor_msgs.msg.Image()
00322       if self.raw_img is None:
00323         self.raw_img = sensor_msgs.msg.Image()
00324       end = 0
00325       _x = self
00326       start = end
00327       end += 12
00328       (_x.clutter_labels.header.seq, _x.clutter_labels.header.stamp.secs, _x.clutter_labels.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00329       start = end
00330       end += 4
00331       (length,) = _struct_I.unpack(str[start:end])
00332       start = end
00333       end += length
00334       if python3:
00335         self.clutter_labels.header.frame_id = str[start:end].decode('utf-8')
00336       else:
00337         self.clutter_labels.header.frame_id = str[start:end]
00338       _x = self
00339       start = end
00340       end += 8
00341       (_x.clutter_labels.height, _x.clutter_labels.width,) = _struct_2I.unpack(str[start:end])
00342       start = end
00343       end += 4
00344       (length,) = _struct_I.unpack(str[start:end])
00345       start = end
00346       end += length
00347       if python3:
00348         self.clutter_labels.encoding = str[start:end].decode('utf-8')
00349       else:
00350         self.clutter_labels.encoding = str[start:end]
00351       _x = self
00352       start = end
00353       end += 5
00354       (_x.clutter_labels.is_bigendian, _x.clutter_labels.step,) = _struct_BI.unpack(str[start:end])
00355       start = end
00356       end += 4
00357       (length,) = _struct_I.unpack(str[start:end])
00358       start = end
00359       end += length
00360       if python3:
00361         self.clutter_labels.data = str[start:end].decode('utf-8')
00362       else:
00363         self.clutter_labels.data = str[start:end]
00364       _x = self
00365       start = end
00366       end += 12
00367       (_x.raw_img.header.seq, _x.raw_img.header.stamp.secs, _x.raw_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00368       start = end
00369       end += 4
00370       (length,) = _struct_I.unpack(str[start:end])
00371       start = end
00372       end += length
00373       if python3:
00374         self.raw_img.header.frame_id = str[start:end].decode('utf-8')
00375       else:
00376         self.raw_img.header.frame_id = str[start:end]
00377       _x = self
00378       start = end
00379       end += 8
00380       (_x.raw_img.height, _x.raw_img.width,) = _struct_2I.unpack(str[start:end])
00381       start = end
00382       end += 4
00383       (length,) = _struct_I.unpack(str[start:end])
00384       start = end
00385       end += length
00386       if python3:
00387         self.raw_img.encoding = str[start:end].decode('utf-8')
00388       else:
00389         self.raw_img.encoding = str[start:end]
00390       _x = self
00391       start = end
00392       end += 5
00393       (_x.raw_img.is_bigendian, _x.raw_img.step,) = _struct_BI.unpack(str[start:end])
00394       start = end
00395       end += 4
00396       (length,) = _struct_I.unpack(str[start:end])
00397       start = end
00398       end += length
00399       if python3:
00400         self.raw_img.data = str[start:end].decode('utf-8')
00401       else:
00402         self.raw_img.data = str[start:end]
00403       return self
00404     except struct.error as e:
00405       raise genpy.DeserializationError(e) #most likely buffer underfill
00406 
00407 _struct_I = genpy.struct_I
00408 _struct_3I = struct.Struct("<3I")
00409 _struct_2I = struct.Struct("<2I")
00410 _struct_BI = struct.Struct("<BI")
00411 """autogenerated by genpy from cpl_superpixels/SmoothClutterResponse.msg. Do not edit."""
00412 import sys
00413 python3 = True if sys.hexversion > 0x03000000 else False
00414 import genpy
00415 import struct
00416 
00417 import std_msgs.msg
00418 import sensor_msgs.msg
00419 
00420 class SmoothClutterResponse(genpy.Message):
00421   _md5sum = "b667ca4166e5af31917c7ccd58f1aa5b"
00422   _type = "cpl_superpixels/SmoothClutterResponse"
00423   _has_header = False #flag to mark the presence of a Header object
00424   _full_text = """sensor_msgs/Image smooth_clutter_labels
00425 
00426 ================================================================================
00427 MSG: sensor_msgs/Image
00428 # This message contains an uncompressed image
00429 # (0, 0) is at top-left corner of image
00430 #
00431 
00432 Header header        # Header timestamp should be acquisition time of image
00433                      # Header frame_id should be optical frame of camera
00434                      # origin of frame should be optical center of cameara
00435                      # +x should point to the right in the image
00436                      # +y should point down in the image
00437                      # +z should point into to plane of the image
00438                      # If the frame_id here and the frame_id of the CameraInfo
00439                      # message associated with the image conflict
00440                      # the behavior is undefined
00441 
00442 uint32 height         # image height, that is, number of rows
00443 uint32 width          # image width, that is, number of columns
00444 
00445 # The legal values for encoding are in file src/image_encodings.cpp
00446 # If you want to standardize a new string format, join
00447 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00448 
00449 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00450                       # taken from the list of strings in src/image_encodings.cpp
00451 
00452 uint8 is_bigendian    # is this data bigendian?
00453 uint32 step           # Full row length in bytes
00454 uint8[] data          # actual matrix data, size is (step * rows)
00455 
00456 ================================================================================
00457 MSG: std_msgs/Header
00458 # Standard metadata for higher-level stamped data types.
00459 # This is generally used to communicate timestamped data 
00460 # in a particular coordinate frame.
00461 # 
00462 # sequence ID: consecutively increasing ID 
00463 uint32 seq
00464 #Two-integer timestamp that is expressed as:
00465 # * stamp.secs: seconds (stamp_secs) since epoch
00466 # * stamp.nsecs: nanoseconds since stamp_secs
00467 # time-handling sugar is provided by the client library
00468 time stamp
00469 #Frame this data is associated with
00470 # 0: no frame
00471 # 1: global frame
00472 string frame_id
00473 
00474 """
00475   __slots__ = ['smooth_clutter_labels']
00476   _slot_types = ['sensor_msgs/Image']
00477 
00478   def __init__(self, *args, **kwds):
00479     """
00480     Constructor. Any message fields that are implicitly/explicitly
00481     set to None will be assigned a default value. The recommend
00482     use is keyword arguments as this is more robust to future message
00483     changes.  You cannot mix in-order arguments and keyword arguments.
00484 
00485     The available fields are:
00486        smooth_clutter_labels
00487 
00488     :param args: complete set of field values, in .msg order
00489     :param kwds: use keyword arguments corresponding to message field names
00490     to set specific fields.
00491     """
00492     if args or kwds:
00493       super(SmoothClutterResponse, self).__init__(*args, **kwds)
00494       #message fields cannot be None, assign default values for those that are
00495       if self.smooth_clutter_labels is None:
00496         self.smooth_clutter_labels = sensor_msgs.msg.Image()
00497     else:
00498       self.smooth_clutter_labels = sensor_msgs.msg.Image()
00499 
00500   def _get_types(self):
00501     """
00502     internal API method
00503     """
00504     return self._slot_types
00505 
00506   def serialize(self, buff):
00507     """
00508     serialize message into buffer
00509     :param buff: buffer, ``StringIO``
00510     """
00511     try:
00512       _x = self
00513       buff.write(_struct_3I.pack(_x.smooth_clutter_labels.header.seq, _x.smooth_clutter_labels.header.stamp.secs, _x.smooth_clutter_labels.header.stamp.nsecs))
00514       _x = self.smooth_clutter_labels.header.frame_id
00515       length = len(_x)
00516       if python3 or type(_x) == unicode:
00517         _x = _x.encode('utf-8')
00518         length = len(_x)
00519       buff.write(struct.pack('<I%ss'%length, length, _x))
00520       _x = self
00521       buff.write(_struct_2I.pack(_x.smooth_clutter_labels.height, _x.smooth_clutter_labels.width))
00522       _x = self.smooth_clutter_labels.encoding
00523       length = len(_x)
00524       if python3 or type(_x) == unicode:
00525         _x = _x.encode('utf-8')
00526         length = len(_x)
00527       buff.write(struct.pack('<I%ss'%length, length, _x))
00528       _x = self
00529       buff.write(_struct_BI.pack(_x.smooth_clutter_labels.is_bigendian, _x.smooth_clutter_labels.step))
00530       _x = self.smooth_clutter_labels.data
00531       length = len(_x)
00532       # - if encoded as a list instead, serialize as bytes instead of string
00533       if type(_x) in [list, tuple]:
00534         buff.write(struct.pack('<I%sB'%length, length, *_x))
00535       else:
00536         buff.write(struct.pack('<I%ss'%length, length, _x))
00537     except struct.error as se: self._check_types(se)
00538     except TypeError as te: self._check_types(te)
00539 
00540   def deserialize(self, str):
00541     """
00542     unpack serialized message in str into this message instance
00543     :param str: byte array of serialized message, ``str``
00544     """
00545     try:
00546       if self.smooth_clutter_labels is None:
00547         self.smooth_clutter_labels = sensor_msgs.msg.Image()
00548       end = 0
00549       _x = self
00550       start = end
00551       end += 12
00552       (_x.smooth_clutter_labels.header.seq, _x.smooth_clutter_labels.header.stamp.secs, _x.smooth_clutter_labels.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00553       start = end
00554       end += 4
00555       (length,) = _struct_I.unpack(str[start:end])
00556       start = end
00557       end += length
00558       if python3:
00559         self.smooth_clutter_labels.header.frame_id = str[start:end].decode('utf-8')
00560       else:
00561         self.smooth_clutter_labels.header.frame_id = str[start:end]
00562       _x = self
00563       start = end
00564       end += 8
00565       (_x.smooth_clutter_labels.height, _x.smooth_clutter_labels.width,) = _struct_2I.unpack(str[start:end])
00566       start = end
00567       end += 4
00568       (length,) = _struct_I.unpack(str[start:end])
00569       start = end
00570       end += length
00571       if python3:
00572         self.smooth_clutter_labels.encoding = str[start:end].decode('utf-8')
00573       else:
00574         self.smooth_clutter_labels.encoding = str[start:end]
00575       _x = self
00576       start = end
00577       end += 5
00578       (_x.smooth_clutter_labels.is_bigendian, _x.smooth_clutter_labels.step,) = _struct_BI.unpack(str[start:end])
00579       start = end
00580       end += 4
00581       (length,) = _struct_I.unpack(str[start:end])
00582       start = end
00583       end += length
00584       if python3:
00585         self.smooth_clutter_labels.data = str[start:end].decode('utf-8')
00586       else:
00587         self.smooth_clutter_labels.data = str[start:end]
00588       return self
00589     except struct.error as e:
00590       raise genpy.DeserializationError(e) #most likely buffer underfill
00591 
00592 
00593   def serialize_numpy(self, buff, numpy):
00594     """
00595     serialize message with numpy array types into buffer
00596     :param buff: buffer, ``StringIO``
00597     :param numpy: numpy python module
00598     """
00599     try:
00600       _x = self
00601       buff.write(_struct_3I.pack(_x.smooth_clutter_labels.header.seq, _x.smooth_clutter_labels.header.stamp.secs, _x.smooth_clutter_labels.header.stamp.nsecs))
00602       _x = self.smooth_clutter_labels.header.frame_id
00603       length = len(_x)
00604       if python3 or type(_x) == unicode:
00605         _x = _x.encode('utf-8')
00606         length = len(_x)
00607       buff.write(struct.pack('<I%ss'%length, length, _x))
00608       _x = self
00609       buff.write(_struct_2I.pack(_x.smooth_clutter_labels.height, _x.smooth_clutter_labels.width))
00610       _x = self.smooth_clutter_labels.encoding
00611       length = len(_x)
00612       if python3 or type(_x) == unicode:
00613         _x = _x.encode('utf-8')
00614         length = len(_x)
00615       buff.write(struct.pack('<I%ss'%length, length, _x))
00616       _x = self
00617       buff.write(_struct_BI.pack(_x.smooth_clutter_labels.is_bigendian, _x.smooth_clutter_labels.step))
00618       _x = self.smooth_clutter_labels.data
00619       length = len(_x)
00620       # - if encoded as a list instead, serialize as bytes instead of string
00621       if type(_x) in [list, tuple]:
00622         buff.write(struct.pack('<I%sB'%length, length, *_x))
00623       else:
00624         buff.write(struct.pack('<I%ss'%length, length, _x))
00625     except struct.error as se: self._check_types(se)
00626     except TypeError as te: self._check_types(te)
00627 
00628   def deserialize_numpy(self, str, numpy):
00629     """
00630     unpack serialized message in str into this message instance using numpy for array types
00631     :param str: byte array of serialized message, ``str``
00632     :param numpy: numpy python module
00633     """
00634     try:
00635       if self.smooth_clutter_labels is None:
00636         self.smooth_clutter_labels = sensor_msgs.msg.Image()
00637       end = 0
00638       _x = self
00639       start = end
00640       end += 12
00641       (_x.smooth_clutter_labels.header.seq, _x.smooth_clutter_labels.header.stamp.secs, _x.smooth_clutter_labels.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00642       start = end
00643       end += 4
00644       (length,) = _struct_I.unpack(str[start:end])
00645       start = end
00646       end += length
00647       if python3:
00648         self.smooth_clutter_labels.header.frame_id = str[start:end].decode('utf-8')
00649       else:
00650         self.smooth_clutter_labels.header.frame_id = str[start:end]
00651       _x = self
00652       start = end
00653       end += 8
00654       (_x.smooth_clutter_labels.height, _x.smooth_clutter_labels.width,) = _struct_2I.unpack(str[start:end])
00655       start = end
00656       end += 4
00657       (length,) = _struct_I.unpack(str[start:end])
00658       start = end
00659       end += length
00660       if python3:
00661         self.smooth_clutter_labels.encoding = str[start:end].decode('utf-8')
00662       else:
00663         self.smooth_clutter_labels.encoding = str[start:end]
00664       _x = self
00665       start = end
00666       end += 5
00667       (_x.smooth_clutter_labels.is_bigendian, _x.smooth_clutter_labels.step,) = _struct_BI.unpack(str[start:end])
00668       start = end
00669       end += 4
00670       (length,) = _struct_I.unpack(str[start:end])
00671       start = end
00672       end += length
00673       if python3:
00674         self.smooth_clutter_labels.data = str[start:end].decode('utf-8')
00675       else:
00676         self.smooth_clutter_labels.data = str[start:end]
00677       return self
00678     except struct.error as e:
00679       raise genpy.DeserializationError(e) #most likely buffer underfill
00680 
00681 _struct_I = genpy.struct_I
00682 _struct_3I = struct.Struct("<3I")
00683 _struct_2I = struct.Struct("<2I")
00684 _struct_BI = struct.Struct("<BI")
00685 class SmoothClutter(object):
00686   _type          = 'cpl_superpixels/SmoothClutter'
00687   _md5sum = '7384f2b516508263596cb837ff0c922b'
00688   _request_class  = SmoothClutterRequest
00689   _response_class = SmoothClutterResponse


cpl_superpixels
Author(s): Tucker Hermans
autogenerated on Wed Nov 27 2013 11:38:57