_PosePercept.py
Go to the documentation of this file.
00001 """autogenerated by genpy from worldmodel_msgs/PosePercept.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 worldmodel_msgs.msg
00009 import std_msgs.msg
00010 
00011 class PosePercept(genpy.Message):
00012   _md5sum = "3b0c987b9e39c7b12b9e71be97a0c021"
00013   _type = "worldmodel_msgs/PosePercept"
00014   _has_header = True #flag to mark the presence of a Header object
00015   _full_text = """# This message represents an observation of an object in a single image.
00016 
00017 # The header should equal the header of the corresponding image.
00018 Header header
00019 
00020 # The estimated pose of the object with its covariance
00021 geometry_msgs/PoseWithCovariance pose
00022 
00023 # Additional information about the percept
00024 worldmodel_msgs/PerceptInfo info
00025 
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data 
00030 # in a particular coordinate frame.
00031 # 
00032 # sequence ID: consecutively increasing ID 
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/PoseWithCovariance
00046 # This represents a pose in free space with uncertainty.
00047 
00048 Pose pose
00049 
00050 # Row-major representation of the 6x6 covariance matrix
00051 # The orientation parameters use a fixed-axis representation.
00052 # In order, the parameters are:
00053 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00054 float64[36] covariance
00055 
00056 ================================================================================
00057 MSG: geometry_msgs/Pose
00058 # A representation of pose in free space, composed of postion and orientation. 
00059 Point position
00060 Quaternion orientation
00061 
00062 ================================================================================
00063 MSG: geometry_msgs/Point
00064 # This contains the position of a point in free space
00065 float64 x
00066 float64 y
00067 float64 z
00068 
00069 ================================================================================
00070 MSG: geometry_msgs/Quaternion
00071 # This represents an orientation in free space in quaternion form.
00072 
00073 float64 x
00074 float64 y
00075 float64 z
00076 float64 w
00077 
00078 ================================================================================
00079 MSG: worldmodel_msgs/PerceptInfo
00080 # This message contains information about the estimated class and object identity 
00081 
00082 # A string identifying the object's class (all objects of a class look the same)
00083 string class_id
00084 
00085 # The class association support of the observation
00086 # The support is the log odd likelihood ratio given by log(p(y/observation y belongs to object of class class_id) / p(y/observation y is a false positive))
00087 float32 class_support
00088 
00089 # A string identifying a specific object
00090 string object_id
00091 
00092 # The object association support of the observation
00093 # The support is the log odd likelihood ratio given by log(p(observation belongs to object object_id) / p(observation is false positive or belongs to another object))
00094 float32 object_support
00095 
00096 # A string that contains the name or a description of the specific object
00097 string name
00098 
00099 """
00100   __slots__ = ['header','pose','info']
00101   _slot_types = ['std_msgs/Header','geometry_msgs/PoseWithCovariance','worldmodel_msgs/PerceptInfo']
00102 
00103   def __init__(self, *args, **kwds):
00104     """
00105     Constructor. Any message fields that are implicitly/explicitly
00106     set to None will be assigned a default value. The recommend
00107     use is keyword arguments as this is more robust to future message
00108     changes.  You cannot mix in-order arguments and keyword arguments.
00109 
00110     The available fields are:
00111        header,pose,info
00112 
00113     :param args: complete set of field values, in .msg order
00114     :param kwds: use keyword arguments corresponding to message field names
00115     to set specific fields.
00116     """
00117     if args or kwds:
00118       super(PosePercept, self).__init__(*args, **kwds)
00119       #message fields cannot be None, assign default values for those that are
00120       if self.header is None:
00121         self.header = std_msgs.msg.Header()
00122       if self.pose is None:
00123         self.pose = geometry_msgs.msg.PoseWithCovariance()
00124       if self.info is None:
00125         self.info = worldmodel_msgs.msg.PerceptInfo()
00126     else:
00127       self.header = std_msgs.msg.Header()
00128       self.pose = geometry_msgs.msg.PoseWithCovariance()
00129       self.info = worldmodel_msgs.msg.PerceptInfo()
00130 
00131   def _get_types(self):
00132     """
00133     internal API method
00134     """
00135     return self._slot_types
00136 
00137   def serialize(self, buff):
00138     """
00139     serialize message into buffer
00140     :param buff: buffer, ``StringIO``
00141     """
00142     try:
00143       _x = self
00144       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00145       _x = self.header.frame_id
00146       length = len(_x)
00147       if python3 or type(_x) == unicode:
00148         _x = _x.encode('utf-8')
00149         length = len(_x)
00150       buff.write(struct.pack('<I%ss'%length, length, _x))
00151       _x = self
00152       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))
00153       buff.write(_struct_36d.pack(*self.pose.covariance))
00154       _x = self.info.class_id
00155       length = len(_x)
00156       if python3 or type(_x) == unicode:
00157         _x = _x.encode('utf-8')
00158         length = len(_x)
00159       buff.write(struct.pack('<I%ss'%length, length, _x))
00160       buff.write(_struct_f.pack(self.info.class_support))
00161       _x = self.info.object_id
00162       length = len(_x)
00163       if python3 or type(_x) == unicode:
00164         _x = _x.encode('utf-8')
00165         length = len(_x)
00166       buff.write(struct.pack('<I%ss'%length, length, _x))
00167       buff.write(_struct_f.pack(self.info.object_support))
00168       _x = self.info.name
00169       length = len(_x)
00170       if python3 or type(_x) == unicode:
00171         _x = _x.encode('utf-8')
00172         length = len(_x)
00173       buff.write(struct.pack('<I%ss'%length, length, _x))
00174     except struct.error as se: self._check_types(se)
00175     except TypeError as te: self._check_types(te)
00176 
00177   def deserialize(self, str):
00178     """
00179     unpack serialized message in str into this message instance
00180     :param str: byte array of serialized message, ``str``
00181     """
00182     try:
00183       if self.header is None:
00184         self.header = std_msgs.msg.Header()
00185       if self.pose is None:
00186         self.pose = geometry_msgs.msg.PoseWithCovariance()
00187       if self.info is None:
00188         self.info = worldmodel_msgs.msg.PerceptInfo()
00189       end = 0
00190       _x = self
00191       start = end
00192       end += 12
00193       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00194       start = end
00195       end += 4
00196       (length,) = _struct_I.unpack(str[start:end])
00197       start = end
00198       end += length
00199       if python3:
00200         self.header.frame_id = str[start:end].decode('utf-8')
00201       else:
00202         self.header.frame_id = str[start:end]
00203       _x = self
00204       start = end
00205       end += 56
00206       (_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])
00207       start = end
00208       end += 288
00209       self.pose.covariance = _struct_36d.unpack(str[start:end])
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       start = end
00214       end += length
00215       if python3:
00216         self.info.class_id = str[start:end].decode('utf-8')
00217       else:
00218         self.info.class_id = str[start:end]
00219       start = end
00220       end += 4
00221       (self.info.class_support,) = _struct_f.unpack(str[start:end])
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       start = end
00226       end += length
00227       if python3:
00228         self.info.object_id = str[start:end].decode('utf-8')
00229       else:
00230         self.info.object_id = str[start:end]
00231       start = end
00232       end += 4
00233       (self.info.object_support,) = _struct_f.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.info.name = str[start:end].decode('utf-8')
00241       else:
00242         self.info.name = str[start:end]
00243       return self
00244     except struct.error as e:
00245       raise genpy.DeserializationError(e) #most likely buffer underfill
00246 
00247 
00248   def serialize_numpy(self, buff, numpy):
00249     """
00250     serialize message with numpy array types into buffer
00251     :param buff: buffer, ``StringIO``
00252     :param numpy: numpy python module
00253     """
00254     try:
00255       _x = self
00256       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00257       _x = self.header.frame_id
00258       length = len(_x)
00259       if python3 or type(_x) == unicode:
00260         _x = _x.encode('utf-8')
00261         length = len(_x)
00262       buff.write(struct.pack('<I%ss'%length, length, _x))
00263       _x = self
00264       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))
00265       buff.write(self.pose.covariance.tostring())
00266       _x = self.info.class_id
00267       length = len(_x)
00268       if python3 or type(_x) == unicode:
00269         _x = _x.encode('utf-8')
00270         length = len(_x)
00271       buff.write(struct.pack('<I%ss'%length, length, _x))
00272       buff.write(_struct_f.pack(self.info.class_support))
00273       _x = self.info.object_id
00274       length = len(_x)
00275       if python3 or type(_x) == unicode:
00276         _x = _x.encode('utf-8')
00277         length = len(_x)
00278       buff.write(struct.pack('<I%ss'%length, length, _x))
00279       buff.write(_struct_f.pack(self.info.object_support))
00280       _x = self.info.name
00281       length = len(_x)
00282       if python3 or type(_x) == unicode:
00283         _x = _x.encode('utf-8')
00284         length = len(_x)
00285       buff.write(struct.pack('<I%ss'%length, length, _x))
00286     except struct.error as se: self._check_types(se)
00287     except TypeError as te: self._check_types(te)
00288 
00289   def deserialize_numpy(self, str, numpy):
00290     """
00291     unpack serialized message in str into this message instance using numpy for array types
00292     :param str: byte array of serialized message, ``str``
00293     :param numpy: numpy python module
00294     """
00295     try:
00296       if self.header is None:
00297         self.header = std_msgs.msg.Header()
00298       if self.pose is None:
00299         self.pose = geometry_msgs.msg.PoseWithCovariance()
00300       if self.info is None:
00301         self.info = worldmodel_msgs.msg.PerceptInfo()
00302       end = 0
00303       _x = self
00304       start = end
00305       end += 12
00306       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end].decode('utf-8')
00314       else:
00315         self.header.frame_id = str[start:end]
00316       _x = self
00317       start = end
00318       end += 56
00319       (_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])
00320       start = end
00321       end += 288
00322       self.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00323       start = end
00324       end += 4
00325       (length,) = _struct_I.unpack(str[start:end])
00326       start = end
00327       end += length
00328       if python3:
00329         self.info.class_id = str[start:end].decode('utf-8')
00330       else:
00331         self.info.class_id = str[start:end]
00332       start = end
00333       end += 4
00334       (self.info.class_support,) = _struct_f.unpack(str[start:end])
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       start = end
00339       end += length
00340       if python3:
00341         self.info.object_id = str[start:end].decode('utf-8')
00342       else:
00343         self.info.object_id = str[start:end]
00344       start = end
00345       end += 4
00346       (self.info.object_support,) = _struct_f.unpack(str[start:end])
00347       start = end
00348       end += 4
00349       (length,) = _struct_I.unpack(str[start:end])
00350       start = end
00351       end += length
00352       if python3:
00353         self.info.name = str[start:end].decode('utf-8')
00354       else:
00355         self.info.name = str[start:end]
00356       return self
00357     except struct.error as e:
00358       raise genpy.DeserializationError(e) #most likely buffer underfill
00359 
00360 _struct_I = genpy.struct_I
00361 _struct_3I = struct.Struct("<3I")
00362 _struct_7d = struct.Struct("<7d")
00363 _struct_36d = struct.Struct("<36d")
00364 _struct_f = struct.Struct("<f")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:50:40