_DatabaseScan.py
Go to the documentation of this file.
00001 """autogenerated by genpy from household_objects_database_msgs/DatabaseScan.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 
00010 class DatabaseScan(genpy.Message):
00011   _md5sum = "7edb7abec4973143a801c25c336b4bb1"
00012   _type = "household_objects_database_msgs/DatabaseScan"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# Contains the location of a stored point cloud scan of an object, 
00015 # as well as additional metadata about that scan 
00016 
00017 # the database id of the model
00018 int32 model_id
00019 
00020 # the location of the bag file storing the scan
00021 string bagfile_location
00022 
00023 # the source of the scan (e.g. simulation)
00024 string scan_source
00025 
00026 # the ground truth pose of the object that was scanned
00027 geometry_msgs/PoseStamped pose
00028 
00029 # the topic that the points in the bag are published on
00030 string cloud_topic
00031 ================================================================================
00032 MSG: geometry_msgs/PoseStamped
00033 # A Pose with reference coordinate frame and timestamp
00034 Header header
00035 Pose pose
00036 
00037 ================================================================================
00038 MSG: std_msgs/Header
00039 # Standard metadata for higher-level stamped data types.
00040 # This is generally used to communicate timestamped data 
00041 # in a particular coordinate frame.
00042 # 
00043 # sequence ID: consecutively increasing ID 
00044 uint32 seq
00045 #Two-integer timestamp that is expressed as:
00046 # * stamp.secs: seconds (stamp_secs) since epoch
00047 # * stamp.nsecs: nanoseconds since stamp_secs
00048 # time-handling sugar is provided by the client library
00049 time stamp
00050 #Frame this data is associated with
00051 # 0: no frame
00052 # 1: global frame
00053 string frame_id
00054 
00055 ================================================================================
00056 MSG: geometry_msgs/Pose
00057 # A representation of pose in free space, composed of postion and orientation. 
00058 Point position
00059 Quaternion orientation
00060 
00061 ================================================================================
00062 MSG: geometry_msgs/Point
00063 # This contains the position of a point in free space
00064 float64 x
00065 float64 y
00066 float64 z
00067 
00068 ================================================================================
00069 MSG: geometry_msgs/Quaternion
00070 # This represents an orientation in free space in quaternion form.
00071 
00072 float64 x
00073 float64 y
00074 float64 z
00075 float64 w
00076 
00077 """
00078   __slots__ = ['model_id','bagfile_location','scan_source','pose','cloud_topic']
00079   _slot_types = ['int32','string','string','geometry_msgs/PoseStamped','string']
00080 
00081   def __init__(self, *args, **kwds):
00082     """
00083     Constructor. Any message fields that are implicitly/explicitly
00084     set to None will be assigned a default value. The recommend
00085     use is keyword arguments as this is more robust to future message
00086     changes.  You cannot mix in-order arguments and keyword arguments.
00087 
00088     The available fields are:
00089        model_id,bagfile_location,scan_source,pose,cloud_topic
00090 
00091     :param args: complete set of field values, in .msg order
00092     :param kwds: use keyword arguments corresponding to message field names
00093     to set specific fields.
00094     """
00095     if args or kwds:
00096       super(DatabaseScan, self).__init__(*args, **kwds)
00097       #message fields cannot be None, assign default values for those that are
00098       if self.model_id is None:
00099         self.model_id = 0
00100       if self.bagfile_location is None:
00101         self.bagfile_location = ''
00102       if self.scan_source is None:
00103         self.scan_source = ''
00104       if self.pose is None:
00105         self.pose = geometry_msgs.msg.PoseStamped()
00106       if self.cloud_topic is None:
00107         self.cloud_topic = ''
00108     else:
00109       self.model_id = 0
00110       self.bagfile_location = ''
00111       self.scan_source = ''
00112       self.pose = geometry_msgs.msg.PoseStamped()
00113       self.cloud_topic = ''
00114 
00115   def _get_types(self):
00116     """
00117     internal API method
00118     """
00119     return self._slot_types
00120 
00121   def serialize(self, buff):
00122     """
00123     serialize message into buffer
00124     :param buff: buffer, ``StringIO``
00125     """
00126     try:
00127       buff.write(_struct_i.pack(self.model_id))
00128       _x = self.bagfile_location
00129       length = len(_x)
00130       if python3 or type(_x) == unicode:
00131         _x = _x.encode('utf-8')
00132         length = len(_x)
00133       buff.write(struct.pack('<I%ss'%length, length, _x))
00134       _x = self.scan_source
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       _x = self
00141       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00142       _x = self.pose.header.frame_id
00143       length = len(_x)
00144       if python3 or type(_x) == unicode:
00145         _x = _x.encode('utf-8')
00146         length = len(_x)
00147       buff.write(struct.pack('<I%ss'%length, length, _x))
00148       _x = self
00149       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00150       _x = self.cloud_topic
00151       length = len(_x)
00152       if python3 or type(_x) == unicode:
00153         _x = _x.encode('utf-8')
00154         length = len(_x)
00155       buff.write(struct.pack('<I%ss'%length, length, _x))
00156     except struct.error as se: self._check_types(se)
00157     except TypeError as te: self._check_types(te)
00158 
00159   def deserialize(self, str):
00160     """
00161     unpack serialized message in str into this message instance
00162     :param str: byte array of serialized message, ``str``
00163     """
00164     try:
00165       if self.pose is None:
00166         self.pose = geometry_msgs.msg.PoseStamped()
00167       end = 0
00168       start = end
00169       end += 4
00170       (self.model_id,) = _struct_i.unpack(str[start:end])
00171       start = end
00172       end += 4
00173       (length,) = _struct_I.unpack(str[start:end])
00174       start = end
00175       end += length
00176       if python3:
00177         self.bagfile_location = str[start:end].decode('utf-8')
00178       else:
00179         self.bagfile_location = str[start:end]
00180       start = end
00181       end += 4
00182       (length,) = _struct_I.unpack(str[start:end])
00183       start = end
00184       end += length
00185       if python3:
00186         self.scan_source = str[start:end].decode('utf-8')
00187       else:
00188         self.scan_source = str[start:end]
00189       _x = self
00190       start = end
00191       end += 12
00192       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00193       start = end
00194       end += 4
00195       (length,) = _struct_I.unpack(str[start:end])
00196       start = end
00197       end += length
00198       if python3:
00199         self.pose.header.frame_id = str[start:end].decode('utf-8')
00200       else:
00201         self.pose.header.frame_id = str[start:end]
00202       _x = self
00203       start = end
00204       end += 56
00205       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00206       start = end
00207       end += 4
00208       (length,) = _struct_I.unpack(str[start:end])
00209       start = end
00210       end += length
00211       if python3:
00212         self.cloud_topic = str[start:end].decode('utf-8')
00213       else:
00214         self.cloud_topic = str[start:end]
00215       return self
00216     except struct.error as e:
00217       raise genpy.DeserializationError(e) #most likely buffer underfill
00218 
00219 
00220   def serialize_numpy(self, buff, numpy):
00221     """
00222     serialize message with numpy array types into buffer
00223     :param buff: buffer, ``StringIO``
00224     :param numpy: numpy python module
00225     """
00226     try:
00227       buff.write(_struct_i.pack(self.model_id))
00228       _x = self.bagfile_location
00229       length = len(_x)
00230       if python3 or type(_x) == unicode:
00231         _x = _x.encode('utf-8')
00232         length = len(_x)
00233       buff.write(struct.pack('<I%ss'%length, length, _x))
00234       _x = self.scan_source
00235       length = len(_x)
00236       if python3 or type(_x) == unicode:
00237         _x = _x.encode('utf-8')
00238         length = len(_x)
00239       buff.write(struct.pack('<I%ss'%length, length, _x))
00240       _x = self
00241       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00242       _x = self.pose.header.frame_id
00243       length = len(_x)
00244       if python3 or type(_x) == unicode:
00245         _x = _x.encode('utf-8')
00246         length = len(_x)
00247       buff.write(struct.pack('<I%ss'%length, length, _x))
00248       _x = self
00249       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00250       _x = self.cloud_topic
00251       length = len(_x)
00252       if python3 or type(_x) == unicode:
00253         _x = _x.encode('utf-8')
00254         length = len(_x)
00255       buff.write(struct.pack('<I%ss'%length, length, _x))
00256     except struct.error as se: self._check_types(se)
00257     except TypeError as te: self._check_types(te)
00258 
00259   def deserialize_numpy(self, str, numpy):
00260     """
00261     unpack serialized message in str into this message instance using numpy for array types
00262     :param str: byte array of serialized message, ``str``
00263     :param numpy: numpy python module
00264     """
00265     try:
00266       if self.pose is None:
00267         self.pose = geometry_msgs.msg.PoseStamped()
00268       end = 0
00269       start = end
00270       end += 4
00271       (self.model_id,) = _struct_i.unpack(str[start:end])
00272       start = end
00273       end += 4
00274       (length,) = _struct_I.unpack(str[start:end])
00275       start = end
00276       end += length
00277       if python3:
00278         self.bagfile_location = str[start:end].decode('utf-8')
00279       else:
00280         self.bagfile_location = str[start:end]
00281       start = end
00282       end += 4
00283       (length,) = _struct_I.unpack(str[start:end])
00284       start = end
00285       end += length
00286       if python3:
00287         self.scan_source = str[start:end].decode('utf-8')
00288       else:
00289         self.scan_source = str[start:end]
00290       _x = self
00291       start = end
00292       end += 12
00293       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00294       start = end
00295       end += 4
00296       (length,) = _struct_I.unpack(str[start:end])
00297       start = end
00298       end += length
00299       if python3:
00300         self.pose.header.frame_id = str[start:end].decode('utf-8')
00301       else:
00302         self.pose.header.frame_id = str[start:end]
00303       _x = self
00304       start = end
00305       end += 56
00306       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00307       start = end
00308       end += 4
00309       (length,) = _struct_I.unpack(str[start:end])
00310       start = end
00311       end += length
00312       if python3:
00313         self.cloud_topic = str[start:end].decode('utf-8')
00314       else:
00315         self.cloud_topic = str[start:end]
00316       return self
00317     except struct.error as e:
00318       raise genpy.DeserializationError(e) #most likely buffer underfill
00319 
00320 _struct_I = genpy.struct_I
00321 _struct_i = struct.Struct("<i")
00322 _struct_3I = struct.Struct("<3I")
00323 _struct_7d = struct.Struct("<7d")


household_objects_database_msgs
Author(s): Matei Ciocarlie
autogenerated on Thu Jan 2 2014 11:37:20