_GetModelScans.py
Go to the documentation of this file.
00001 """autogenerated by genpy from household_objects_database_msgs/GetModelScansRequest.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 GetModelScansRequest(genpy.Message):
00009   _md5sum = "4f31b0f27ba251f6d1f17eafced83cb7"
00010   _type = "household_objects_database_msgs/GetModelScansRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 int32 model_id
00016 
00017 
00018 string scan_source
00019 
00020 
00021 """
00022   __slots__ = ['model_id','scan_source']
00023   _slot_types = ['int32','string']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        model_id,scan_source
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(GetModelScansRequest, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.model_id is None:
00043         self.model_id = 0
00044       if self.scan_source is None:
00045         self.scan_source = ''
00046     else:
00047       self.model_id = 0
00048       self.scan_source = ''
00049 
00050   def _get_types(self):
00051     """
00052     internal API method
00053     """
00054     return self._slot_types
00055 
00056   def serialize(self, buff):
00057     """
00058     serialize message into buffer
00059     :param buff: buffer, ``StringIO``
00060     """
00061     try:
00062       buff.write(_struct_i.pack(self.model_id))
00063       _x = self.scan_source
00064       length = len(_x)
00065       if python3 or type(_x) == unicode:
00066         _x = _x.encode('utf-8')
00067         length = len(_x)
00068       buff.write(struct.pack('<I%ss'%length, length, _x))
00069     except struct.error as se: self._check_types(se)
00070     except TypeError as te: self._check_types(te)
00071 
00072   def deserialize(self, str):
00073     """
00074     unpack serialized message in str into this message instance
00075     :param str: byte array of serialized message, ``str``
00076     """
00077     try:
00078       end = 0
00079       start = end
00080       end += 4
00081       (self.model_id,) = _struct_i.unpack(str[start:end])
00082       start = end
00083       end += 4
00084       (length,) = _struct_I.unpack(str[start:end])
00085       start = end
00086       end += length
00087       if python3:
00088         self.scan_source = str[start:end].decode('utf-8')
00089       else:
00090         self.scan_source = str[start:end]
00091       return self
00092     except struct.error as e:
00093       raise genpy.DeserializationError(e) #most likely buffer underfill
00094 
00095 
00096   def serialize_numpy(self, buff, numpy):
00097     """
00098     serialize message with numpy array types into buffer
00099     :param buff: buffer, ``StringIO``
00100     :param numpy: numpy python module
00101     """
00102     try:
00103       buff.write(_struct_i.pack(self.model_id))
00104       _x = self.scan_source
00105       length = len(_x)
00106       if python3 or type(_x) == unicode:
00107         _x = _x.encode('utf-8')
00108         length = len(_x)
00109       buff.write(struct.pack('<I%ss'%length, length, _x))
00110     except struct.error as se: self._check_types(se)
00111     except TypeError as te: self._check_types(te)
00112 
00113   def deserialize_numpy(self, str, numpy):
00114     """
00115     unpack serialized message in str into this message instance using numpy for array types
00116     :param str: byte array of serialized message, ``str``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       end = 0
00121       start = end
00122       end += 4
00123       (self.model_id,) = _struct_i.unpack(str[start:end])
00124       start = end
00125       end += 4
00126       (length,) = _struct_I.unpack(str[start:end])
00127       start = end
00128       end += length
00129       if python3:
00130         self.scan_source = str[start:end].decode('utf-8')
00131       else:
00132         self.scan_source = str[start:end]
00133       return self
00134     except struct.error as e:
00135       raise genpy.DeserializationError(e) #most likely buffer underfill
00136 
00137 _struct_I = genpy.struct_I
00138 _struct_i = struct.Struct("<i")
00139 """autogenerated by genpy from household_objects_database_msgs/GetModelScansResponse.msg. Do not edit."""
00140 import sys
00141 python3 = True if sys.hexversion > 0x03000000 else False
00142 import genpy
00143 import struct
00144 
00145 import std_msgs.msg
00146 import geometry_msgs.msg
00147 import household_objects_database_msgs.msg
00148 
00149 class GetModelScansResponse(genpy.Message):
00150   _md5sum = "8d1bb6e95c26a5d891987d9d9195e958"
00151   _type = "household_objects_database_msgs/GetModelScansResponse"
00152   _has_header = False #flag to mark the presence of a Header object
00153   _full_text = """
00154 
00155 DatabaseReturnCode return_code
00156 
00157 
00158 DatabaseScan[] matching_scans
00159 
00160 ================================================================================
00161 MSG: household_objects_database_msgs/DatabaseReturnCode
00162 # return codes for database-related services
00163 
00164 int32 UNKNOWN_ERROR = 1
00165 int32 DATABASE_NOT_CONNECTED = 2
00166 int32 DATABASE_QUERY_ERROR = 3
00167 int32 SUCCESS = -1
00168 
00169 int32 code
00170 ================================================================================
00171 MSG: household_objects_database_msgs/DatabaseScan
00172 # Contains the location of a stored point cloud scan of an object, 
00173 # as well as additional metadata about that scan 
00174 
00175 # the database id of the model
00176 int32 model_id
00177 
00178 # the location of the bag file storing the scan
00179 string bagfile_location
00180 
00181 # the source of the scan (e.g. simulation)
00182 string scan_source
00183 
00184 # the ground truth pose of the object that was scanned
00185 geometry_msgs/PoseStamped pose
00186 
00187 # the topic that the points in the bag are published on
00188 string cloud_topic
00189 ================================================================================
00190 MSG: geometry_msgs/PoseStamped
00191 # A Pose with reference coordinate frame and timestamp
00192 Header header
00193 Pose pose
00194 
00195 ================================================================================
00196 MSG: std_msgs/Header
00197 # Standard metadata for higher-level stamped data types.
00198 # This is generally used to communicate timestamped data 
00199 # in a particular coordinate frame.
00200 # 
00201 # sequence ID: consecutively increasing ID 
00202 uint32 seq
00203 #Two-integer timestamp that is expressed as:
00204 # * stamp.secs: seconds (stamp_secs) since epoch
00205 # * stamp.nsecs: nanoseconds since stamp_secs
00206 # time-handling sugar is provided by the client library
00207 time stamp
00208 #Frame this data is associated with
00209 # 0: no frame
00210 # 1: global frame
00211 string frame_id
00212 
00213 ================================================================================
00214 MSG: geometry_msgs/Pose
00215 # A representation of pose in free space, composed of postion and orientation. 
00216 Point position
00217 Quaternion orientation
00218 
00219 ================================================================================
00220 MSG: geometry_msgs/Point
00221 # This contains the position of a point in free space
00222 float64 x
00223 float64 y
00224 float64 z
00225 
00226 ================================================================================
00227 MSG: geometry_msgs/Quaternion
00228 # This represents an orientation in free space in quaternion form.
00229 
00230 float64 x
00231 float64 y
00232 float64 z
00233 float64 w
00234 
00235 """
00236   __slots__ = ['return_code','matching_scans']
00237   _slot_types = ['household_objects_database_msgs/DatabaseReturnCode','household_objects_database_msgs/DatabaseScan[]']
00238 
00239   def __init__(self, *args, **kwds):
00240     """
00241     Constructor. Any message fields that are implicitly/explicitly
00242     set to None will be assigned a default value. The recommend
00243     use is keyword arguments as this is more robust to future message
00244     changes.  You cannot mix in-order arguments and keyword arguments.
00245 
00246     The available fields are:
00247        return_code,matching_scans
00248 
00249     :param args: complete set of field values, in .msg order
00250     :param kwds: use keyword arguments corresponding to message field names
00251     to set specific fields.
00252     """
00253     if args or kwds:
00254       super(GetModelScansResponse, self).__init__(*args, **kwds)
00255       #message fields cannot be None, assign default values for those that are
00256       if self.return_code is None:
00257         self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00258       if self.matching_scans is None:
00259         self.matching_scans = []
00260     else:
00261       self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00262       self.matching_scans = []
00263 
00264   def _get_types(self):
00265     """
00266     internal API method
00267     """
00268     return self._slot_types
00269 
00270   def serialize(self, buff):
00271     """
00272     serialize message into buffer
00273     :param buff: buffer, ``StringIO``
00274     """
00275     try:
00276       buff.write(_struct_i.pack(self.return_code.code))
00277       length = len(self.matching_scans)
00278       buff.write(_struct_I.pack(length))
00279       for val1 in self.matching_scans:
00280         buff.write(_struct_i.pack(val1.model_id))
00281         _x = val1.bagfile_location
00282         length = len(_x)
00283         if python3 or type(_x) == unicode:
00284           _x = _x.encode('utf-8')
00285           length = len(_x)
00286         buff.write(struct.pack('<I%ss'%length, length, _x))
00287         _x = val1.scan_source
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         _v1 = val1.pose
00294         _v2 = _v1.header
00295         buff.write(_struct_I.pack(_v2.seq))
00296         _v3 = _v2.stamp
00297         _x = _v3
00298         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00299         _x = _v2.frame_id
00300         length = len(_x)
00301         if python3 or type(_x) == unicode:
00302           _x = _x.encode('utf-8')
00303           length = len(_x)
00304         buff.write(struct.pack('<I%ss'%length, length, _x))
00305         _v4 = _v1.pose
00306         _v5 = _v4.position
00307         _x = _v5
00308         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00309         _v6 = _v4.orientation
00310         _x = _v6
00311         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00312         _x = val1.cloud_topic
00313         length = len(_x)
00314         if python3 or type(_x) == unicode:
00315           _x = _x.encode('utf-8')
00316           length = len(_x)
00317         buff.write(struct.pack('<I%ss'%length, length, _x))
00318     except struct.error as se: self._check_types(se)
00319     except TypeError as te: self._check_types(te)
00320 
00321   def deserialize(self, str):
00322     """
00323     unpack serialized message in str into this message instance
00324     :param str: byte array of serialized message, ``str``
00325     """
00326     try:
00327       if self.return_code is None:
00328         self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00329       if self.matching_scans is None:
00330         self.matching_scans = None
00331       end = 0
00332       start = end
00333       end += 4
00334       (self.return_code.code,) = _struct_i.unpack(str[start:end])
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       self.matching_scans = []
00339       for i in range(0, length):
00340         val1 = household_objects_database_msgs.msg.DatabaseScan()
00341         start = end
00342         end += 4
00343         (val1.model_id,) = _struct_i.unpack(str[start:end])
00344         start = end
00345         end += 4
00346         (length,) = _struct_I.unpack(str[start:end])
00347         start = end
00348         end += length
00349         if python3:
00350           val1.bagfile_location = str[start:end].decode('utf-8')
00351         else:
00352           val1.bagfile_location = str[start:end]
00353         start = end
00354         end += 4
00355         (length,) = _struct_I.unpack(str[start:end])
00356         start = end
00357         end += length
00358         if python3:
00359           val1.scan_source = str[start:end].decode('utf-8')
00360         else:
00361           val1.scan_source = str[start:end]
00362         _v7 = val1.pose
00363         _v8 = _v7.header
00364         start = end
00365         end += 4
00366         (_v8.seq,) = _struct_I.unpack(str[start:end])
00367         _v9 = _v8.stamp
00368         _x = _v9
00369         start = end
00370         end += 8
00371         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00372         start = end
00373         end += 4
00374         (length,) = _struct_I.unpack(str[start:end])
00375         start = end
00376         end += length
00377         if python3:
00378           _v8.frame_id = str[start:end].decode('utf-8')
00379         else:
00380           _v8.frame_id = str[start:end]
00381         _v10 = _v7.pose
00382         _v11 = _v10.position
00383         _x = _v11
00384         start = end
00385         end += 24
00386         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00387         _v12 = _v10.orientation
00388         _x = _v12
00389         start = end
00390         end += 32
00391         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00392         start = end
00393         end += 4
00394         (length,) = _struct_I.unpack(str[start:end])
00395         start = end
00396         end += length
00397         if python3:
00398           val1.cloud_topic = str[start:end].decode('utf-8')
00399         else:
00400           val1.cloud_topic = str[start:end]
00401         self.matching_scans.append(val1)
00402       return self
00403     except struct.error as e:
00404       raise genpy.DeserializationError(e) #most likely buffer underfill
00405 
00406 
00407   def serialize_numpy(self, buff, numpy):
00408     """
00409     serialize message with numpy array types into buffer
00410     :param buff: buffer, ``StringIO``
00411     :param numpy: numpy python module
00412     """
00413     try:
00414       buff.write(_struct_i.pack(self.return_code.code))
00415       length = len(self.matching_scans)
00416       buff.write(_struct_I.pack(length))
00417       for val1 in self.matching_scans:
00418         buff.write(_struct_i.pack(val1.model_id))
00419         _x = val1.bagfile_location
00420         length = len(_x)
00421         if python3 or type(_x) == unicode:
00422           _x = _x.encode('utf-8')
00423           length = len(_x)
00424         buff.write(struct.pack('<I%ss'%length, length, _x))
00425         _x = val1.scan_source
00426         length = len(_x)
00427         if python3 or type(_x) == unicode:
00428           _x = _x.encode('utf-8')
00429           length = len(_x)
00430         buff.write(struct.pack('<I%ss'%length, length, _x))
00431         _v13 = val1.pose
00432         _v14 = _v13.header
00433         buff.write(_struct_I.pack(_v14.seq))
00434         _v15 = _v14.stamp
00435         _x = _v15
00436         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00437         _x = _v14.frame_id
00438         length = len(_x)
00439         if python3 or type(_x) == unicode:
00440           _x = _x.encode('utf-8')
00441           length = len(_x)
00442         buff.write(struct.pack('<I%ss'%length, length, _x))
00443         _v16 = _v13.pose
00444         _v17 = _v16.position
00445         _x = _v17
00446         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00447         _v18 = _v16.orientation
00448         _x = _v18
00449         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00450         _x = val1.cloud_topic
00451         length = len(_x)
00452         if python3 or type(_x) == unicode:
00453           _x = _x.encode('utf-8')
00454           length = len(_x)
00455         buff.write(struct.pack('<I%ss'%length, length, _x))
00456     except struct.error as se: self._check_types(se)
00457     except TypeError as te: self._check_types(te)
00458 
00459   def deserialize_numpy(self, str, numpy):
00460     """
00461     unpack serialized message in str into this message instance using numpy for array types
00462     :param str: byte array of serialized message, ``str``
00463     :param numpy: numpy python module
00464     """
00465     try:
00466       if self.return_code is None:
00467         self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00468       if self.matching_scans is None:
00469         self.matching_scans = None
00470       end = 0
00471       start = end
00472       end += 4
00473       (self.return_code.code,) = _struct_i.unpack(str[start:end])
00474       start = end
00475       end += 4
00476       (length,) = _struct_I.unpack(str[start:end])
00477       self.matching_scans = []
00478       for i in range(0, length):
00479         val1 = household_objects_database_msgs.msg.DatabaseScan()
00480         start = end
00481         end += 4
00482         (val1.model_id,) = _struct_i.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           val1.bagfile_location = str[start:end].decode('utf-8')
00490         else:
00491           val1.bagfile_location = str[start:end]
00492         start = end
00493         end += 4
00494         (length,) = _struct_I.unpack(str[start:end])
00495         start = end
00496         end += length
00497         if python3:
00498           val1.scan_source = str[start:end].decode('utf-8')
00499         else:
00500           val1.scan_source = str[start:end]
00501         _v19 = val1.pose
00502         _v20 = _v19.header
00503         start = end
00504         end += 4
00505         (_v20.seq,) = _struct_I.unpack(str[start:end])
00506         _v21 = _v20.stamp
00507         _x = _v21
00508         start = end
00509         end += 8
00510         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00511         start = end
00512         end += 4
00513         (length,) = _struct_I.unpack(str[start:end])
00514         start = end
00515         end += length
00516         if python3:
00517           _v20.frame_id = str[start:end].decode('utf-8')
00518         else:
00519           _v20.frame_id = str[start:end]
00520         _v22 = _v19.pose
00521         _v23 = _v22.position
00522         _x = _v23
00523         start = end
00524         end += 24
00525         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00526         _v24 = _v22.orientation
00527         _x = _v24
00528         start = end
00529         end += 32
00530         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00531         start = end
00532         end += 4
00533         (length,) = _struct_I.unpack(str[start:end])
00534         start = end
00535         end += length
00536         if python3:
00537           val1.cloud_topic = str[start:end].decode('utf-8')
00538         else:
00539           val1.cloud_topic = str[start:end]
00540         self.matching_scans.append(val1)
00541       return self
00542     except struct.error as e:
00543       raise genpy.DeserializationError(e) #most likely buffer underfill
00544 
00545 _struct_I = genpy.struct_I
00546 _struct_i = struct.Struct("<i")
00547 _struct_4d = struct.Struct("<4d")
00548 _struct_2I = struct.Struct("<2I")
00549 _struct_3d = struct.Struct("<3d")
00550 class GetModelScans(object):
00551   _type          = 'household_objects_database_msgs/GetModelScans'
00552   _md5sum = '8e98ddfab8ff8e5fb3a60b1cd7645437'
00553   _request_class  = GetModelScansRequest
00554   _response_class = GetModelScansResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


household_objects_database_msgs
Author(s): Matei Ciocarlie
autogenerated on Fri Jan 25 2013 14:57:21