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


flirtlib_ros
Author(s): Bhaskara Marthi
autogenerated on Thu Nov 28 2013 11:21:50