_mav_state.py
Go to the documentation of this file.
00001 """autogenerated by genpy from asctec_hl_comm/mav_state.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 mav_state(genpy.Message):
00011   _md5sum = "e034f695cee32efa98d5cb7e960000e2"
00012   _type = "asctec_hl_comm/mav_state"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 geometry_msgs/Pose          pose
00016 geometry_msgs/Vector3       velocity
00017 ================================================================================
00018 MSG: std_msgs/Header
00019 # Standard metadata for higher-level stamped data types.
00020 # This is generally used to communicate timestamped data 
00021 # in a particular coordinate frame.
00022 # 
00023 # sequence ID: consecutively increasing ID 
00024 uint32 seq
00025 #Two-integer timestamp that is expressed as:
00026 # * stamp.secs: seconds (stamp_secs) since epoch
00027 # * stamp.nsecs: nanoseconds since stamp_secs
00028 # time-handling sugar is provided by the client library
00029 time stamp
00030 #Frame this data is associated with
00031 # 0: no frame
00032 # 1: global frame
00033 string frame_id
00034 
00035 ================================================================================
00036 MSG: geometry_msgs/Pose
00037 # A representation of pose in free space, composed of postion and orientation. 
00038 Point position
00039 Quaternion orientation
00040 
00041 ================================================================================
00042 MSG: geometry_msgs/Point
00043 # This contains the position of a point in free space
00044 float64 x
00045 float64 y
00046 float64 z
00047 
00048 ================================================================================
00049 MSG: geometry_msgs/Quaternion
00050 # This represents an orientation in free space in quaternion form.
00051 
00052 float64 x
00053 float64 y
00054 float64 z
00055 float64 w
00056 
00057 ================================================================================
00058 MSG: geometry_msgs/Vector3
00059 # This represents a vector in free space. 
00060 
00061 float64 x
00062 float64 y
00063 float64 z
00064 """
00065   __slots__ = ['header','pose','velocity']
00066   _slot_types = ['std_msgs/Header','geometry_msgs/Pose','geometry_msgs/Vector3']
00067 
00068   def __init__(self, *args, **kwds):
00069     """
00070     Constructor. Any message fields that are implicitly/explicitly
00071     set to None will be assigned a default value. The recommend
00072     use is keyword arguments as this is more robust to future message
00073     changes.  You cannot mix in-order arguments and keyword arguments.
00074 
00075     The available fields are:
00076        header,pose,velocity
00077 
00078     :param args: complete set of field values, in .msg order
00079     :param kwds: use keyword arguments corresponding to message field names
00080     to set specific fields.
00081     """
00082     if args or kwds:
00083       super(mav_state, self).__init__(*args, **kwds)
00084       #message fields cannot be None, assign default values for those that are
00085       if self.header is None:
00086         self.header = std_msgs.msg.Header()
00087       if self.pose is None:
00088         self.pose = geometry_msgs.msg.Pose()
00089       if self.velocity is None:
00090         self.velocity = geometry_msgs.msg.Vector3()
00091     else:
00092       self.header = std_msgs.msg.Header()
00093       self.pose = geometry_msgs.msg.Pose()
00094       self.velocity = geometry_msgs.msg.Vector3()
00095 
00096   def _get_types(self):
00097     """
00098     internal API method
00099     """
00100     return self._slot_types
00101 
00102   def serialize(self, buff):
00103     """
00104     serialize message into buffer
00105     :param buff: buffer, ``StringIO``
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00110       _x = self.header.frame_id
00111       length = len(_x)
00112       if python3 or type(_x) == unicode:
00113         _x = _x.encode('utf-8')
00114         length = len(_x)
00115       buff.write(struct.pack('<I%ss'%length, length, _x))
00116       _x = self
00117       buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.velocity.x, _x.velocity.y, _x.velocity.z))
00118     except struct.error as se: self._check_types(se)
00119     except TypeError as te: self._check_types(te)
00120 
00121   def deserialize(self, str):
00122     """
00123     unpack serialized message in str into this message instance
00124     :param str: byte array of serialized message, ``str``
00125     """
00126     try:
00127       if self.header is None:
00128         self.header = std_msgs.msg.Header()
00129       if self.pose is None:
00130         self.pose = geometry_msgs.msg.Pose()
00131       if self.velocity is None:
00132         self.velocity = geometry_msgs.msg.Vector3()
00133       end = 0
00134       _x = self
00135       start = end
00136       end += 12
00137       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00138       start = end
00139       end += 4
00140       (length,) = _struct_I.unpack(str[start:end])
00141       start = end
00142       end += length
00143       if python3:
00144         self.header.frame_id = str[start:end].decode('utf-8')
00145       else:
00146         self.header.frame_id = str[start:end]
00147       _x = self
00148       start = end
00149       end += 80
00150       (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.velocity.x, _x.velocity.y, _x.velocity.z,) = _struct_10d.unpack(str[start:end])
00151       return self
00152     except struct.error as e:
00153       raise genpy.DeserializationError(e) #most likely buffer underfill
00154 
00155 
00156   def serialize_numpy(self, buff, numpy):
00157     """
00158     serialize message with numpy array types into buffer
00159     :param buff: buffer, ``StringIO``
00160     :param numpy: numpy python module
00161     """
00162     try:
00163       _x = self
00164       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00165       _x = self.header.frame_id
00166       length = len(_x)
00167       if python3 or type(_x) == unicode:
00168         _x = _x.encode('utf-8')
00169         length = len(_x)
00170       buff.write(struct.pack('<I%ss'%length, length, _x))
00171       _x = self
00172       buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.velocity.x, _x.velocity.y, _x.velocity.z))
00173     except struct.error as se: self._check_types(se)
00174     except TypeError as te: self._check_types(te)
00175 
00176   def deserialize_numpy(self, str, numpy):
00177     """
00178     unpack serialized message in str into this message instance using numpy for array types
00179     :param str: byte array of serialized message, ``str``
00180     :param numpy: numpy python module
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.Pose()
00187       if self.velocity is None:
00188         self.velocity = geometry_msgs.msg.Vector3()
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 += 80
00206       (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.velocity.x, _x.velocity.y, _x.velocity.z,) = _struct_10d.unpack(str[start:end])
00207       return self
00208     except struct.error as e:
00209       raise genpy.DeserializationError(e) #most likely buffer underfill
00210 
00211 _struct_I = genpy.struct_I
00212 _struct_3I = struct.Struct("<3I")
00213 _struct_10d = struct.Struct("<10d")


asctec_hl_comm
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Jan 7 2014 11:05:05