$search
00001 """autogenerated by genmsg_py from RotateInPlaceGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class RotateInPlaceGoal(roslib.message.Message): 00008 _md5sum = "a383378ce70ce523f38349d877baffb8" 00009 _type = "flirtlib_ros/RotateInPlaceGoal" 00010 _has_header = True #flag to mark the presence of a Header object 00011 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00012 # Goal is to get close to yaw angle target in frame header.frame_id 00013 Header header 00014 float32 target 00015 float32 tol 00016 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 __slots__ = ['header','target','tol'] 00037 _slot_types = ['Header','float32','float32'] 00038 00039 def __init__(self, *args, **kwds): 00040 """ 00041 Constructor. Any message fields that are implicitly/explicitly 00042 set to None will be assigned a default value. The recommend 00043 use is keyword arguments as this is more robust to future message 00044 changes. You cannot mix in-order arguments and keyword arguments. 00045 00046 The available fields are: 00047 header,target,tol 00048 00049 @param args: complete set of field values, in .msg order 00050 @param kwds: use keyword arguments corresponding to message field names 00051 to set specific fields. 00052 """ 00053 if args or kwds: 00054 super(RotateInPlaceGoal, self).__init__(*args, **kwds) 00055 #message fields cannot be None, assign default values for those that are 00056 if self.header is None: 00057 self.header = std_msgs.msg._Header.Header() 00058 if self.target is None: 00059 self.target = 0. 00060 if self.tol is None: 00061 self.tol = 0. 00062 else: 00063 self.header = std_msgs.msg._Header.Header() 00064 self.target = 0. 00065 self.tol = 0. 00066 00067 def _get_types(self): 00068 """ 00069 internal API method 00070 """ 00071 return self._slot_types 00072 00073 def serialize(self, buff): 00074 """ 00075 serialize message into buffer 00076 @param buff: buffer 00077 @type buff: StringIO 00078 """ 00079 try: 00080 _x = self 00081 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00082 _x = self.header.frame_id 00083 length = len(_x) 00084 buff.write(struct.pack('<I%ss'%length, length, _x)) 00085 _x = self 00086 buff.write(_struct_2f.pack(_x.target, _x.tol)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize(self, str): 00091 """ 00092 unpack serialized message in str into this message instance 00093 @param str: byte array of serialized message 00094 @type str: str 00095 """ 00096 try: 00097 if self.header is None: 00098 self.header = std_msgs.msg._Header.Header() 00099 end = 0 00100 _x = self 00101 start = end 00102 end += 12 00103 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00104 start = end 00105 end += 4 00106 (length,) = _struct_I.unpack(str[start:end]) 00107 start = end 00108 end += length 00109 self.header.frame_id = str[start:end] 00110 _x = self 00111 start = end 00112 end += 8 00113 (_x.target, _x.tol,) = _struct_2f.unpack(str[start:end]) 00114 return self 00115 except struct.error as e: 00116 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00117 00118 00119 def serialize_numpy(self, buff, numpy): 00120 """ 00121 serialize message with numpy array types into buffer 00122 @param buff: buffer 00123 @type buff: StringIO 00124 @param numpy: numpy python module 00125 @type numpy module 00126 """ 00127 try: 00128 _x = self 00129 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00130 _x = self.header.frame_id 00131 length = len(_x) 00132 buff.write(struct.pack('<I%ss'%length, length, _x)) 00133 _x = self 00134 buff.write(_struct_2f.pack(_x.target, _x.tol)) 00135 except struct.error as se: self._check_types(se) 00136 except TypeError as te: self._check_types(te) 00137 00138 def deserialize_numpy(self, str, numpy): 00139 """ 00140 unpack serialized message in str into this message instance using numpy for array types 00141 @param str: byte array of serialized message 00142 @type str: str 00143 @param numpy: numpy python module 00144 @type numpy: module 00145 """ 00146 try: 00147 if self.header is None: 00148 self.header = std_msgs.msg._Header.Header() 00149 end = 0 00150 _x = self 00151 start = end 00152 end += 12 00153 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00154 start = end 00155 end += 4 00156 (length,) = _struct_I.unpack(str[start:end]) 00157 start = end 00158 end += length 00159 self.header.frame_id = str[start:end] 00160 _x = self 00161 start = end 00162 end += 8 00163 (_x.target, _x.tol,) = _struct_2f.unpack(str[start:end]) 00164 return self 00165 except struct.error as e: 00166 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00167 00168 _struct_I = roslib.message.struct_I 00169 _struct_3I = struct.Struct("<3I") 00170 _struct_2f = struct.Struct("<2f")