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


nao_msgs
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Tue Oct 15 2013 10:05:22