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


laser_assembler
Author(s): Vijay Pradeep
autogenerated on Mon Oct 6 2014 01:43:03