_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         if python3:
00377           _v4.data = str[start:end].decode('utf-8')
00378         else:
00379           _v4.data = str[start:end]
00380         start = end
00381         end += 1
00382         (_v4.is_dense,) = _struct_B.unpack(str[start:end])
00383         _v4.is_dense = bool(_v4.is_dense)
00384         self.msg.append(val1)
00385       return self
00386     except struct.error as e:
00387       raise genpy.DeserializationError(e) #most likely buffer underfill
00388 
00389 
00390   def serialize_numpy(self, buff, numpy):
00391     """
00392     serialize message with numpy array types into buffer
00393     :param buff: buffer, ``StringIO``
00394     :param numpy: numpy python module
00395     """
00396     try:
00397       _x = self.return_response
00398       length = len(_x)
00399       if python3 or type(_x) == unicode:
00400         _x = _x.encode('utf-8')
00401         length = len(_x)
00402       buff.write(struct.pack('<I%ss'%length, length, _x))
00403       length = len(self.msg)
00404       buff.write(_struct_I.pack(length))
00405       for val1 in self.msg:
00406         buff.write(_struct_i.pack(val1.objectId))
00407         _v7 = val1.pcl
00408         _v8 = _v7.header
00409         buff.write(_struct_I.pack(_v8.seq))
00410         _v9 = _v8.stamp
00411         _x = _v9
00412         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00413         _x = _v8.frame_id
00414         length = len(_x)
00415         if python3 or type(_x) == unicode:
00416           _x = _x.encode('utf-8')
00417           length = len(_x)
00418         buff.write(struct.pack('<I%ss'%length, length, _x))
00419         _x = _v7
00420         buff.write(_struct_2I.pack(_x.height, _x.width))
00421         length = len(_v7.fields)
00422         buff.write(_struct_I.pack(length))
00423         for val3 in _v7.fields:
00424           _x = val3.name
00425           length = len(_x)
00426           if python3 or type(_x) == unicode:
00427             _x = _x.encode('utf-8')
00428             length = len(_x)
00429           buff.write(struct.pack('<I%ss'%length, length, _x))
00430           _x = val3
00431           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00432         _x = _v7
00433         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00434         _x = _v7.data
00435         length = len(_x)
00436         # - if encoded as a list instead, serialize as bytes instead of string
00437         if type(_x) in [list, tuple]:
00438           buff.write(struct.pack('<I%sB'%length, length, *_x))
00439         else:
00440           buff.write(struct.pack('<I%ss'%length, length, _x))
00441         buff.write(_struct_B.pack(_v7.is_dense))
00442     except struct.error as se: self._check_types(se)
00443     except TypeError as te: self._check_types(te)
00444 
00445   def deserialize_numpy(self, str, numpy):
00446     """
00447     unpack serialized message in str into this message instance using numpy for array types
00448     :param str: byte array of serialized message, ``str``
00449     :param numpy: numpy python module
00450     """
00451     try:
00452       if self.msg is None:
00453         self.msg = None
00454       end = 0
00455       start = end
00456       end += 4
00457       (length,) = _struct_I.unpack(str[start:end])
00458       start = end
00459       end += length
00460       if python3:
00461         self.return_response = str[start:end].decode('utf-8')
00462       else:
00463         self.return_response = str[start:end]
00464       start = end
00465       end += 4
00466       (length,) = _struct_I.unpack(str[start:end])
00467       self.msg = []
00468       for i in range(0, length):
00469         val1 = srs_object_database_msgs.msg.pcl()
00470         start = end
00471         end += 4
00472         (val1.objectId,) = _struct_i.unpack(str[start:end])
00473         _v10 = val1.pcl
00474         _v11 = _v10.header
00475         start = end
00476         end += 4
00477         (_v11.seq,) = _struct_I.unpack(str[start:end])
00478         _v12 = _v11.stamp
00479         _x = _v12
00480         start = end
00481         end += 8
00482         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00483         start = end
00484         end += 4
00485         (length,) = _struct_I.unpack(str[start:end])
00486         start = end
00487         end += length
00488         if python3:
00489           _v11.frame_id = str[start:end].decode('utf-8')
00490         else:
00491           _v11.frame_id = str[start:end]
00492         _x = _v10
00493         start = end
00494         end += 8
00495         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00496         start = end
00497         end += 4
00498         (length,) = _struct_I.unpack(str[start:end])
00499         _v10.fields = []
00500         for i in range(0, length):
00501           val3 = sensor_msgs.msg.PointField()
00502           start = end
00503           end += 4
00504           (length,) = _struct_I.unpack(str[start:end])
00505           start = end
00506           end += length
00507           if python3:
00508             val3.name = str[start:end].decode('utf-8')
00509           else:
00510             val3.name = str[start:end]
00511           _x = val3
00512           start = end
00513           end += 9
00514           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00515           _v10.fields.append(val3)
00516         _x = _v10
00517         start = end
00518         end += 9
00519         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00520         _v10.is_bigendian = bool(_v10.is_bigendian)
00521         start = end
00522         end += 4
00523         (length,) = _struct_I.unpack(str[start:end])
00524         start = end
00525         end += length
00526         if python3:
00527           _v10.data = str[start:end].decode('utf-8')
00528         else:
00529           _v10.data = str[start:end]
00530         start = end
00531         end += 1
00532         (_v10.is_dense,) = _struct_B.unpack(str[start:end])
00533         _v10.is_dense = bool(_v10.is_dense)
00534         self.msg.append(val1)
00535       return self
00536     except struct.error as e:
00537       raise genpy.DeserializationError(e) #most likely buffer underfill
00538 
00539 _struct_I = genpy.struct_I
00540 _struct_IBI = struct.Struct("<IBI")
00541 _struct_B = struct.Struct("<B")
00542 _struct_i = struct.Struct("<i")
00543 _struct_B2I = struct.Struct("<B2I")
00544 _struct_2I = struct.Struct("<2I")
00545 class GetPcl(object):
00546   _type          = 'srs_object_database_msgs/GetPcl'
00547   _md5sum = '596db51a5c261da80fedfc7706fc8019'
00548   _request_class  = GetPclRequest
00549   _response_class = GetPclResponse


srs_object_database_msgs
Author(s): Georg Arbeiter
autogenerated on Sun Jan 5 2014 11:36:25