_GetPcl.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_object_database_msgs/GetPclRequest.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 GetPclRequest(genpy.Message):
00009   _md5sum = "80afe6caba30c992d2e7ff6ff0e0d51e"
00010   _type = "srs_object_database_msgs/GetPclRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 int32[] model_ids
00015 
00016 
00017 """
00018   __slots__ = ['model_ids']
00019   _slot_types = ['int32[]']
00020 
00021   def __init__(self, *args, **kwds):
00022     """
00023     Constructor. Any message fields that are implicitly/explicitly
00024     set to None will be assigned a default value. The recommend
00025     use is keyword arguments as this is more robust to future message
00026     changes.  You cannot mix in-order arguments and keyword arguments.
00027 
00028     The available fields are:
00029        model_ids
00030 
00031     :param args: complete set of field values, in .msg order
00032     :param kwds: use keyword arguments corresponding to message field names
00033     to set specific fields.
00034     """
00035     if args or kwds:
00036       super(GetPclRequest, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.model_ids is None:
00039         self.model_ids = []
00040     else:
00041       self.model_ids = []
00042 
00043   def _get_types(self):
00044     """
00045     internal API method
00046     """
00047     return self._slot_types
00048 
00049   def serialize(self, buff):
00050     """
00051     serialize message into buffer
00052     :param buff: buffer, ``StringIO``
00053     """
00054     try:
00055       length = len(self.model_ids)
00056       buff.write(_struct_I.pack(length))
00057       pattern = '<%si'%length
00058       buff.write(struct.pack(pattern, *self.model_ids))
00059     except struct.error as se: self._check_types(se)
00060     except TypeError as te: self._check_types(te)
00061 
00062   def deserialize(self, str):
00063     """
00064     unpack serialized message in str into this message instance
00065     :param str: byte array of serialized message, ``str``
00066     """
00067     try:
00068       end = 0
00069       start = end
00070       end += 4
00071       (length,) = _struct_I.unpack(str[start:end])
00072       pattern = '<%si'%length
00073       start = end
00074       end += struct.calcsize(pattern)
00075       self.model_ids = struct.unpack(pattern, str[start:end])
00076       return self
00077     except struct.error as e:
00078       raise genpy.DeserializationError(e) #most likely buffer underfill
00079 
00080 
00081   def serialize_numpy(self, buff, numpy):
00082     """
00083     serialize message with numpy array types into buffer
00084     :param buff: buffer, ``StringIO``
00085     :param numpy: numpy python module
00086     """
00087     try:
00088       length = len(self.model_ids)
00089       buff.write(_struct_I.pack(length))
00090       pattern = '<%si'%length
00091       buff.write(self.model_ids.tostring())
00092     except struct.error as se: self._check_types(se)
00093     except TypeError as te: self._check_types(te)
00094 
00095   def deserialize_numpy(self, str, numpy):
00096     """
00097     unpack serialized message in str into this message instance using numpy for array types
00098     :param str: byte array of serialized message, ``str``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       end = 0
00103       start = end
00104       end += 4
00105       (length,) = _struct_I.unpack(str[start:end])
00106       pattern = '<%si'%length
00107       start = end
00108       end += struct.calcsize(pattern)
00109       self.model_ids = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00110       return self
00111     except struct.error as e:
00112       raise genpy.DeserializationError(e) #most likely buffer underfill
00113 
00114 _struct_I = genpy.struct_I
00115 """autogenerated by genpy from srs_object_database_msgs/GetPclResponse.msg. Do not edit."""
00116 import sys
00117 python3 = True if sys.hexversion > 0x03000000 else False
00118 import genpy
00119 import struct
00120 
00121 import srs_object_database_msgs.msg
00122 import std_msgs.msg
00123 import sensor_msgs.msg
00124 
00125 class GetPclResponse(genpy.Message):
00126   _md5sum = "62e77027d0abe4e41f991a54bd0bcc09"
00127   _type = "srs_object_database_msgs/GetPclResponse"
00128   _has_header = False #flag to mark the presence of a Header object
00129   _full_text = """
00130 
00131 string return_response
00132 
00133 srs_object_database_msgs/pcl[] msg
00134 
00135 
00136 ================================================================================
00137 MSG: srs_object_database_msgs/pcl
00138 int32 objectId
00139 sensor_msgs/PointCloud2 pcl
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__ = ['return_response','msg']
00209   _slot_types = ['string','srs_object_database_msgs/pcl[]']
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        return_response,msg
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(GetPclResponse, self).__init__(*args, **kwds)
00227       #message fields cannot be None, assign default values for those that are
00228       if self.return_response is None:
00229         self.return_response = ''
00230       if self.msg is None:
00231         self.msg = []
00232     else:
00233       self.return_response = ''
00234       self.msg = []
00235 
00236   def _get_types(self):
00237     """
00238     internal API method
00239     """
00240     return self._slot_types
00241 
00242   def serialize(self, buff):
00243     """
00244     serialize message into buffer
00245     :param buff: buffer, ``StringIO``
00246     """
00247     try:
00248       _x = self.return_response
00249       length = len(_x)
00250       if python3 or type(_x) == unicode:
00251         _x = _x.encode('utf-8')
00252         length = len(_x)
00253       buff.write(struct.pack('<I%ss'%length, length, _x))
00254       length = len(self.msg)
00255       buff.write(_struct_I.pack(length))
00256       for val1 in self.msg:
00257         buff.write(_struct_i.pack(val1.objectId))
00258         _v1 = val1.pcl
00259         _v2 = _v1.header
00260         buff.write(_struct_I.pack(_v2.seq))
00261         _v3 = _v2.stamp
00262         _x = _v3
00263         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00264         _x = _v2.frame_id
00265         length = len(_x)
00266         if python3 or type(_x) == unicode:
00267           _x = _x.encode('utf-8')
00268           length = len(_x)
00269         buff.write(struct.pack('<I%ss'%length, length, _x))
00270         _x = _v1
00271         buff.write(_struct_2I.pack(_x.height, _x.width))
00272         length = len(_v1.fields)
00273         buff.write(_struct_I.pack(length))
00274         for val3 in _v1.fields:
00275           _x = val3.name
00276           length = len(_x)
00277           if python3 or type(_x) == unicode:
00278             _x = _x.encode('utf-8')
00279             length = len(_x)
00280           buff.write(struct.pack('<I%ss'%length, length, _x))
00281           _x = val3
00282           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00283         _x = _v1
00284         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00285         _x = _v1.data
00286         length = len(_x)
00287         # - if encoded as a list instead, serialize as bytes instead of string
00288         if type(_x) in [list, tuple]:
00289           buff.write(struct.pack('<I%sB'%length, length, *_x))
00290         else:
00291           buff.write(struct.pack('<I%ss'%length, length, _x))
00292         buff.write(_struct_B.pack(_v1.is_dense))
00293     except struct.error as se: self._check_types(se)
00294     except TypeError as te: self._check_types(te)
00295 
00296   def deserialize(self, str):
00297     """
00298     unpack serialized message in str into this message instance
00299     :param str: byte array of serialized message, ``str``
00300     """
00301     try:
00302       if self.msg is None:
00303         self.msg = None
00304       end = 0
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       start = end
00309       end += length
00310       if python3:
00311         self.return_response = str[start:end].decode('utf-8')
00312       else:
00313         self.return_response = str[start:end]
00314       start = end
00315       end += 4
00316       (length,) = _struct_I.unpack(str[start:end])
00317       self.msg = []
00318       for i in range(0, length):
00319         val1 = srs_object_database_msgs.msg.pcl()
00320         start = end
00321         end += 4
00322         (val1.objectId,) = _struct_i.unpack(str[start:end])
00323         _v4 = val1.pcl
00324         _v5 = _v4.header
00325         start = end
00326         end += 4
00327         (_v5.seq,) = _struct_I.unpack(str[start:end])
00328         _v6 = _v5.stamp
00329         _x = _v6
00330         start = end
00331         end += 8
00332         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00333         start = end
00334         end += 4
00335         (length,) = _struct_I.unpack(str[start:end])
00336         start = end
00337         end += length
00338         if python3:
00339           _v5.frame_id = str[start:end].decode('utf-8')
00340         else:
00341           _v5.frame_id = str[start:end]
00342         _x = _v4
00343         start = end
00344         end += 8
00345         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00346         start = end
00347         end += 4
00348         (length,) = _struct_I.unpack(str[start:end])
00349         _v4.fields = []
00350         for i in range(0, length):
00351           val3 = sensor_msgs.msg.PointField()
00352           start = end
00353           end += 4
00354           (length,) = _struct_I.unpack(str[start:end])
00355           start = end
00356           end += length
00357           if python3:
00358             val3.name = str[start:end].decode('utf-8')
00359           else:
00360             val3.name = str[start:end]
00361           _x = val3
00362           start = end
00363           end += 9
00364           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00365           _v4.fields.append(val3)
00366         _x = _v4
00367         start = end
00368         end += 9
00369         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00370         _v4.is_bigendian = bool(_v4.is_bigendian)
00371         start = end
00372         end += 4
00373         (length,) = _struct_I.unpack(str[start:end])
00374         start = end
00375         end += length
00376         _v4.data = str[start:end]
00377         start = end
00378         end += 1
00379         (_v4.is_dense,) = _struct_B.unpack(str[start:end])
00380         _v4.is_dense = bool(_v4.is_dense)
00381         self.msg.append(val1)
00382       return self
00383     except struct.error as e:
00384       raise genpy.DeserializationError(e) #most likely buffer underfill
00385 
00386 
00387   def serialize_numpy(self, buff, numpy):
00388     """
00389     serialize message with numpy array types into buffer
00390     :param buff: buffer, ``StringIO``
00391     :param numpy: numpy python module
00392     """
00393     try:
00394       _x = self.return_response
00395       length = len(_x)
00396       if python3 or type(_x) == unicode:
00397         _x = _x.encode('utf-8')
00398         length = len(_x)
00399       buff.write(struct.pack('<I%ss'%length, length, _x))
00400       length = len(self.msg)
00401       buff.write(_struct_I.pack(length))
00402       for val1 in self.msg:
00403         buff.write(_struct_i.pack(val1.objectId))
00404         _v7 = val1.pcl
00405         _v8 = _v7.header
00406         buff.write(_struct_I.pack(_v8.seq))
00407         _v9 = _v8.stamp
00408         _x = _v9
00409         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00410         _x = _v8.frame_id
00411         length = len(_x)
00412         if python3 or type(_x) == unicode:
00413           _x = _x.encode('utf-8')
00414           length = len(_x)
00415         buff.write(struct.pack('<I%ss'%length, length, _x))
00416         _x = _v7
00417         buff.write(_struct_2I.pack(_x.height, _x.width))
00418         length = len(_v7.fields)
00419         buff.write(_struct_I.pack(length))
00420         for val3 in _v7.fields:
00421           _x = val3.name
00422           length = len(_x)
00423           if python3 or type(_x) == unicode:
00424             _x = _x.encode('utf-8')
00425             length = len(_x)
00426           buff.write(struct.pack('<I%ss'%length, length, _x))
00427           _x = val3
00428           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00429         _x = _v7
00430         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00431         _x = _v7.data
00432         length = len(_x)
00433         # - if encoded as a list instead, serialize as bytes instead of string
00434         if type(_x) in [list, tuple]:
00435           buff.write(struct.pack('<I%sB'%length, length, *_x))
00436         else:
00437           buff.write(struct.pack('<I%ss'%length, length, _x))
00438         buff.write(_struct_B.pack(_v7.is_dense))
00439     except struct.error as se: self._check_types(se)
00440     except TypeError as te: self._check_types(te)
00441 
00442   def deserialize_numpy(self, str, numpy):
00443     """
00444     unpack serialized message in str into this message instance using numpy for array types
00445     :param str: byte array of serialized message, ``str``
00446     :param numpy: numpy python module
00447     """
00448     try:
00449       if self.msg is None:
00450         self.msg = None
00451       end = 0
00452       start = end
00453       end += 4
00454       (length,) = _struct_I.unpack(str[start:end])
00455       start = end
00456       end += length
00457       if python3:
00458         self.return_response = str[start:end].decode('utf-8')
00459       else:
00460         self.return_response = str[start:end]
00461       start = end
00462       end += 4
00463       (length,) = _struct_I.unpack(str[start:end])
00464       self.msg = []
00465       for i in range(0, length):
00466         val1 = srs_object_database_msgs.msg.pcl()
00467         start = end
00468         end += 4
00469         (val1.objectId,) = _struct_i.unpack(str[start:end])
00470         _v10 = val1.pcl
00471         _v11 = _v10.header
00472         start = end
00473         end += 4
00474         (_v11.seq,) = _struct_I.unpack(str[start:end])
00475         _v12 = _v11.stamp
00476         _x = _v12
00477         start = end
00478         end += 8
00479         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00480         start = end
00481         end += 4
00482         (length,) = _struct_I.unpack(str[start:end])
00483         start = end
00484         end += length
00485         if python3:
00486           _v11.frame_id = str[start:end].decode('utf-8')
00487         else:
00488           _v11.frame_id = str[start:end]
00489         _x = _v10
00490         start = end
00491         end += 8
00492         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00493         start = end
00494         end += 4
00495         (length,) = _struct_I.unpack(str[start:end])
00496         _v10.fields = []
00497         for i in range(0, length):
00498           val3 = sensor_msgs.msg.PointField()
00499           start = end
00500           end += 4
00501           (length,) = _struct_I.unpack(str[start:end])
00502           start = end
00503           end += length
00504           if python3:
00505             val3.name = str[start:end].decode('utf-8')
00506           else:
00507             val3.name = str[start:end]
00508           _x = val3
00509           start = end
00510           end += 9
00511           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00512           _v10.fields.append(val3)
00513         _x = _v10
00514         start = end
00515         end += 9
00516         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00517         _v10.is_bigendian = bool(_v10.is_bigendian)
00518         start = end
00519         end += 4
00520         (length,) = _struct_I.unpack(str[start:end])
00521         start = end
00522         end += length
00523         _v10.data = str[start:end]
00524         start = end
00525         end += 1
00526         (_v10.is_dense,) = _struct_B.unpack(str[start:end])
00527         _v10.is_dense = bool(_v10.is_dense)
00528         self.msg.append(val1)
00529       return self
00530     except struct.error as e:
00531       raise genpy.DeserializationError(e) #most likely buffer underfill
00532 
00533 _struct_I = genpy.struct_I
00534 _struct_IBI = struct.Struct("<IBI")
00535 _struct_B = struct.Struct("<B")
00536 _struct_i = struct.Struct("<i")
00537 _struct_B2I = struct.Struct("<B2I")
00538 _struct_2I = struct.Struct("<2I")
00539 class GetPcl(object):
00540   _type          = 'srs_object_database_msgs/GetPcl'
00541   _md5sum = '596db51a5c261da80fedfc7706fc8019'
00542   _request_class  = GetPclRequest
00543   _response_class = GetPclResponse


srs_object_database_msgs
Author(s): Georg Arbeiter
autogenerated on Wed Nov 27 2013 14:14:38