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


hector_worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Oct 6 2014 00:36:27