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


coverage_3d_tools
Author(s): Juergen Hess
autogenerated on Wed Dec 26 2012 15:25:37