_DatabaseModelPose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from household_objects_database_msgs/DatabaseModelPose.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 DatabaseModelPose(genpy.Message):
00011   _md5sum = "b739e78b71454381fec36791b724ddfc"
00012   _type = "household_objects_database_msgs/DatabaseModelPose"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# Informs that a specific model from the Model Database has been 
00015 # identified at a certain location
00016 
00017 # the database id of the model
00018 int32 model_id
00019 
00020 # the pose that it can be found in
00021 geometry_msgs/PoseStamped pose
00022 
00023 # a measure of the confidence level in this detection result
00024 float32 confidence
00025 
00026 # the name of the object detector that generated this detection result
00027 string detector_name
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/PoseStamped
00031 # A Pose with reference coordinate frame and timestamp
00032 Header header
00033 Pose pose
00034 
00035 ================================================================================
00036 MSG: std_msgs/Header
00037 # Standard metadata for higher-level stamped data types.
00038 # This is generally used to communicate timestamped data 
00039 # in a particular coordinate frame.
00040 # 
00041 # sequence ID: consecutively increasing ID 
00042 uint32 seq
00043 #Two-integer timestamp that is expressed as:
00044 # * stamp.secs: seconds (stamp_secs) since epoch
00045 # * stamp.nsecs: nanoseconds since stamp_secs
00046 # time-handling sugar is provided by the client library
00047 time stamp
00048 #Frame this data is associated with
00049 # 0: no frame
00050 # 1: global frame
00051 string frame_id
00052 
00053 ================================================================================
00054 MSG: geometry_msgs/Pose
00055 # A representation of pose in free space, composed of postion and orientation. 
00056 Point position
00057 Quaternion orientation
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/Point
00061 # This contains the position of a point in free space
00062 float64 x
00063 float64 y
00064 float64 z
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/Quaternion
00068 # This represents an orientation in free space in quaternion form.
00069 
00070 float64 x
00071 float64 y
00072 float64 z
00073 float64 w
00074 
00075 """
00076   __slots__ = ['model_id','pose','confidence','detector_name']
00077   _slot_types = ['int32','geometry_msgs/PoseStamped','float32','string']
00078 
00079   def __init__(self, *args, **kwds):
00080     """
00081     Constructor. Any message fields that are implicitly/explicitly
00082     set to None will be assigned a default value. The recommend
00083     use is keyword arguments as this is more robust to future message
00084     changes.  You cannot mix in-order arguments and keyword arguments.
00085 
00086     The available fields are:
00087        model_id,pose,confidence,detector_name
00088 
00089     :param args: complete set of field values, in .msg order
00090     :param kwds: use keyword arguments corresponding to message field names
00091     to set specific fields.
00092     """
00093     if args or kwds:
00094       super(DatabaseModelPose, self).__init__(*args, **kwds)
00095       #message fields cannot be None, assign default values for those that are
00096       if self.model_id is None:
00097         self.model_id = 0
00098       if self.pose is None:
00099         self.pose = geometry_msgs.msg.PoseStamped()
00100       if self.confidence is None:
00101         self.confidence = 0.
00102       if self.detector_name is None:
00103         self.detector_name = ''
00104     else:
00105       self.model_id = 0
00106       self.pose = geometry_msgs.msg.PoseStamped()
00107       self.confidence = 0.
00108       self.detector_name = ''
00109 
00110   def _get_types(self):
00111     """
00112     internal API method
00113     """
00114     return self._slot_types
00115 
00116   def serialize(self, buff):
00117     """
00118     serialize message into buffer
00119     :param buff: buffer, ``StringIO``
00120     """
00121     try:
00122       _x = self
00123       buff.write(_struct_i3I.pack(_x.model_id, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00124       _x = self.pose.header.frame_id
00125       length = len(_x)
00126       if python3 or type(_x) == unicode:
00127         _x = _x.encode('utf-8')
00128         length = len(_x)
00129       buff.write(struct.pack('<I%ss'%length, length, _x))
00130       _x = self
00131       buff.write(_struct_7df.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, _x.confidence))
00132       _x = self.detector_name
00133       length = len(_x)
00134       if python3 or type(_x) == unicode:
00135         _x = _x.encode('utf-8')
00136         length = len(_x)
00137       buff.write(struct.pack('<I%ss'%length, length, _x))
00138     except struct.error as se: self._check_types(se)
00139     except TypeError as te: self._check_types(te)
00140 
00141   def deserialize(self, str):
00142     """
00143     unpack serialized message in str into this message instance
00144     :param str: byte array of serialized message, ``str``
00145     """
00146     try:
00147       if self.pose is None:
00148         self.pose = geometry_msgs.msg.PoseStamped()
00149       end = 0
00150       _x = self
00151       start = end
00152       end += 16
00153       (_x.model_id, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00154       start = end
00155       end += 4
00156       (length,) = _struct_I.unpack(str[start:end])
00157       start = end
00158       end += length
00159       if python3:
00160         self.pose.header.frame_id = str[start:end].decode('utf-8')
00161       else:
00162         self.pose.header.frame_id = str[start:end]
00163       _x = self
00164       start = end
00165       end += 60
00166       (_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, _x.confidence,) = _struct_7df.unpack(str[start:end])
00167       start = end
00168       end += 4
00169       (length,) = _struct_I.unpack(str[start:end])
00170       start = end
00171       end += length
00172       if python3:
00173         self.detector_name = str[start:end].decode('utf-8')
00174       else:
00175         self.detector_name = str[start:end]
00176       return self
00177     except struct.error as e:
00178       raise genpy.DeserializationError(e) #most likely buffer underfill
00179 
00180 
00181   def serialize_numpy(self, buff, numpy):
00182     """
00183     serialize message with numpy array types into buffer
00184     :param buff: buffer, ``StringIO``
00185     :param numpy: numpy python module
00186     """
00187     try:
00188       _x = self
00189       buff.write(_struct_i3I.pack(_x.model_id, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00190       _x = self.pose.header.frame_id
00191       length = len(_x)
00192       if python3 or type(_x) == unicode:
00193         _x = _x.encode('utf-8')
00194         length = len(_x)
00195       buff.write(struct.pack('<I%ss'%length, length, _x))
00196       _x = self
00197       buff.write(_struct_7df.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, _x.confidence))
00198       _x = self.detector_name
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204     except struct.error as se: self._check_types(se)
00205     except TypeError as te: self._check_types(te)
00206 
00207   def deserialize_numpy(self, str, numpy):
00208     """
00209     unpack serialized message in str into this message instance using numpy for array types
00210     :param str: byte array of serialized message, ``str``
00211     :param numpy: numpy python module
00212     """
00213     try:
00214       if self.pose is None:
00215         self.pose = geometry_msgs.msg.PoseStamped()
00216       end = 0
00217       _x = self
00218       start = end
00219       end += 16
00220       (_x.model_id, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00221       start = end
00222       end += 4
00223       (length,) = _struct_I.unpack(str[start:end])
00224       start = end
00225       end += length
00226       if python3:
00227         self.pose.header.frame_id = str[start:end].decode('utf-8')
00228       else:
00229         self.pose.header.frame_id = str[start:end]
00230       _x = self
00231       start = end
00232       end += 60
00233       (_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, _x.confidence,) = _struct_7df.unpack(str[start:end])
00234       start = end
00235       end += 4
00236       (length,) = _struct_I.unpack(str[start:end])
00237       start = end
00238       end += length
00239       if python3:
00240         self.detector_name = str[start:end].decode('utf-8')
00241       else:
00242         self.detector_name = str[start:end]
00243       return self
00244     except struct.error as e:
00245       raise genpy.DeserializationError(e) #most likely buffer underfill
00246 
00247 _struct_I = genpy.struct_I
00248 _struct_i3I = struct.Struct("<i3I")
00249 _struct_7df = struct.Struct("<7df")


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