$search
00001 """autogenerated by genmsg_py from BlinkActionFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import nao_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class BlinkActionFeedback(roslib.message.Message): 00011 _md5sum = "b4761017d2f70a859c914a9306034255" 00012 _type = "nao_msgs/BlinkActionFeedback" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalStatus status 00018 BlinkFeedback feedback 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalStatus 00040 GoalID goal_id 00041 uint8 status 00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00045 # and has since completed its execution (Terminal State) 00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00048 # to some failure (Terminal State) 00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00050 # because the goal was unattainable or invalid (Terminal State) 00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00052 # and has not yet completed execution 00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00054 # but the action server has not yet confirmed that the goal is canceled 00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00056 # and was successfully cancelled (Terminal State) 00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00058 # sent over the wire by an action server 00059 00060 #Allow for the user to associate a string with GoalStatus for debugging 00061 string text 00062 00063 00064 ================================================================================ 00065 MSG: actionlib_msgs/GoalID 00066 # The stamp should store the time at which this goal was requested. 00067 # It is used by an action server when it tries to preempt all 00068 # goals that were requested before a certain time 00069 time stamp 00070 00071 # The id provides a way to associate feedback and 00072 # result message with specific goal requests. The id 00073 # specified must be unique. 00074 string id 00075 00076 00077 ================================================================================ 00078 MSG: nao_msgs/BlinkFeedback 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 std_msgs/ColorRGBA last_color 00081 00082 00083 ================================================================================ 00084 MSG: std_msgs/ColorRGBA 00085 float32 r 00086 float32 g 00087 float32 b 00088 float32 a 00089 00090 """ 00091 __slots__ = ['header','status','feedback'] 00092 _slot_types = ['Header','actionlib_msgs/GoalStatus','nao_msgs/BlinkFeedback'] 00093 00094 def __init__(self, *args, **kwds): 00095 """ 00096 Constructor. Any message fields that are implicitly/explicitly 00097 set to None will be assigned a default value. The recommend 00098 use is keyword arguments as this is more robust to future message 00099 changes. You cannot mix in-order arguments and keyword arguments. 00100 00101 The available fields are: 00102 header,status,feedback 00103 00104 @param args: complete set of field values, in .msg order 00105 @param kwds: use keyword arguments corresponding to message field names 00106 to set specific fields. 00107 """ 00108 if args or kwds: 00109 super(BlinkActionFeedback, self).__init__(*args, **kwds) 00110 #message fields cannot be None, assign default values for those that are 00111 if self.header is None: 00112 self.header = std_msgs.msg._Header.Header() 00113 if self.status is None: 00114 self.status = actionlib_msgs.msg.GoalStatus() 00115 if self.feedback is None: 00116 self.feedback = nao_msgs.msg.BlinkFeedback() 00117 else: 00118 self.header = std_msgs.msg._Header.Header() 00119 self.status = actionlib_msgs.msg.GoalStatus() 00120 self.feedback = nao_msgs.msg.BlinkFeedback() 00121 00122 def _get_types(self): 00123 """ 00124 internal API method 00125 """ 00126 return self._slot_types 00127 00128 def serialize(self, buff): 00129 """ 00130 serialize message into buffer 00131 @param buff: buffer 00132 @type buff: StringIO 00133 """ 00134 try: 00135 _x = self 00136 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00137 _x = self.header.frame_id 00138 length = len(_x) 00139 buff.write(struct.pack('<I%ss'%length, length, _x)) 00140 _x = self 00141 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00142 _x = self.status.goal_id.id 00143 length = len(_x) 00144 buff.write(struct.pack('<I%ss'%length, length, _x)) 00145 buff.write(_struct_B.pack(self.status.status)) 00146 _x = self.status.text 00147 length = len(_x) 00148 buff.write(struct.pack('<I%ss'%length, length, _x)) 00149 _x = self 00150 buff.write(_struct_4f.pack(_x.feedback.last_color.r, _x.feedback.last_color.g, _x.feedback.last_color.b, _x.feedback.last_color.a)) 00151 except struct.error as se: self._check_types(se) 00152 except TypeError as te: self._check_types(te) 00153 00154 def deserialize(self, str): 00155 """ 00156 unpack serialized message in str into this message instance 00157 @param str: byte array of serialized message 00158 @type str: str 00159 """ 00160 try: 00161 if self.header is None: 00162 self.header = std_msgs.msg._Header.Header() 00163 if self.status is None: 00164 self.status = actionlib_msgs.msg.GoalStatus() 00165 if self.feedback is None: 00166 self.feedback = nao_msgs.msg.BlinkFeedback() 00167 end = 0 00168 _x = self 00169 start = end 00170 end += 12 00171 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00172 start = end 00173 end += 4 00174 (length,) = _struct_I.unpack(str[start:end]) 00175 start = end 00176 end += length 00177 self.header.frame_id = str[start:end] 00178 _x = self 00179 start = end 00180 end += 8 00181 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00182 start = end 00183 end += 4 00184 (length,) = _struct_I.unpack(str[start:end]) 00185 start = end 00186 end += length 00187 self.status.goal_id.id = str[start:end] 00188 start = end 00189 end += 1 00190 (self.status.status,) = _struct_B.unpack(str[start:end]) 00191 start = end 00192 end += 4 00193 (length,) = _struct_I.unpack(str[start:end]) 00194 start = end 00195 end += length 00196 self.status.text = str[start:end] 00197 _x = self 00198 start = end 00199 end += 16 00200 (_x.feedback.last_color.r, _x.feedback.last_color.g, _x.feedback.last_color.b, _x.feedback.last_color.a,) = _struct_4f.unpack(str[start:end]) 00201 return self 00202 except struct.error as e: 00203 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00204 00205 00206 def serialize_numpy(self, buff, numpy): 00207 """ 00208 serialize message with numpy array types into buffer 00209 @param buff: buffer 00210 @type buff: StringIO 00211 @param numpy: numpy python module 00212 @type numpy module 00213 """ 00214 try: 00215 _x = self 00216 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00217 _x = self.header.frame_id 00218 length = len(_x) 00219 buff.write(struct.pack('<I%ss'%length, length, _x)) 00220 _x = self 00221 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00222 _x = self.status.goal_id.id 00223 length = len(_x) 00224 buff.write(struct.pack('<I%ss'%length, length, _x)) 00225 buff.write(_struct_B.pack(self.status.status)) 00226 _x = self.status.text 00227 length = len(_x) 00228 buff.write(struct.pack('<I%ss'%length, length, _x)) 00229 _x = self 00230 buff.write(_struct_4f.pack(_x.feedback.last_color.r, _x.feedback.last_color.g, _x.feedback.last_color.b, _x.feedback.last_color.a)) 00231 except struct.error as se: self._check_types(se) 00232 except TypeError as te: self._check_types(te) 00233 00234 def deserialize_numpy(self, str, numpy): 00235 """ 00236 unpack serialized message in str into this message instance using numpy for array types 00237 @param str: byte array of serialized message 00238 @type str: str 00239 @param numpy: numpy python module 00240 @type numpy: module 00241 """ 00242 try: 00243 if self.header is None: 00244 self.header = std_msgs.msg._Header.Header() 00245 if self.status is None: 00246 self.status = actionlib_msgs.msg.GoalStatus() 00247 if self.feedback is None: 00248 self.feedback = nao_msgs.msg.BlinkFeedback() 00249 end = 0 00250 _x = self 00251 start = end 00252 end += 12 00253 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00254 start = end 00255 end += 4 00256 (length,) = _struct_I.unpack(str[start:end]) 00257 start = end 00258 end += length 00259 self.header.frame_id = str[start:end] 00260 _x = self 00261 start = end 00262 end += 8 00263 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00264 start = end 00265 end += 4 00266 (length,) = _struct_I.unpack(str[start:end]) 00267 start = end 00268 end += length 00269 self.status.goal_id.id = str[start:end] 00270 start = end 00271 end += 1 00272 (self.status.status,) = _struct_B.unpack(str[start:end]) 00273 start = end 00274 end += 4 00275 (length,) = _struct_I.unpack(str[start:end]) 00276 start = end 00277 end += length 00278 self.status.text = str[start:end] 00279 _x = self 00280 start = end 00281 end += 16 00282 (_x.feedback.last_color.r, _x.feedback.last_color.g, _x.feedback.last_color.b, _x.feedback.last_color.a,) = _struct_4f.unpack(str[start:end]) 00283 return self 00284 except struct.error as e: 00285 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00286 00287 _struct_I = roslib.message.struct_I 00288 _struct_4f = struct.Struct("<4f") 00289 _struct_3I = struct.Struct("<3I") 00290 _struct_B = struct.Struct("<B") 00291 _struct_2I = struct.Struct("<2I")