$search
00001 """autogenerated by genmsg_py from RunBehaviorAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import nao_msgs.msg 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class RunBehaviorAction(roslib.message.Message): 00011 _md5sum = "64cb2517d54c9bedd661f6394f463f24" 00012 _type = "nao_msgs/RunBehaviorAction" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 RunBehaviorActionGoal action_goal 00017 RunBehaviorActionResult action_result 00018 RunBehaviorActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: nao_msgs/RunBehaviorActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 RunBehaviorGoal goal 00027 00028 ================================================================================ 00029 MSG: std_msgs/Header 00030 # Standard metadata for higher-level stamped data types. 00031 # This is generally used to communicate timestamped data 00032 # in a particular coordinate frame. 00033 # 00034 # sequence ID: consecutively increasing ID 00035 uint32 seq 00036 #Two-integer timestamp that is expressed as: 00037 # * stamp.secs: seconds (stamp_secs) since epoch 00038 # * stamp.nsecs: nanoseconds since stamp_secs 00039 # time-handling sugar is provided by the client library 00040 time stamp 00041 #Frame this data is associated with 00042 # 0: no frame 00043 # 1: global frame 00044 string frame_id 00045 00046 ================================================================================ 00047 MSG: actionlib_msgs/GoalID 00048 # The stamp should store the time at which this goal was requested. 00049 # It is used by an action server when it tries to preempt all 00050 # goals that were requested before a certain time 00051 time stamp 00052 00053 # The id provides a way to associate feedback and 00054 # result message with specific goal requests. The id 00055 # specified must be unique. 00056 string id 00057 00058 00059 ================================================================================ 00060 MSG: nao_msgs/RunBehaviorGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 # Goal [behavior]: name of the behavior to be executed 00063 # Result [noErrors]: true if behavior finished executing correctly, false otherwise 00064 # Feedback: none as NaoQI API cannot be queried in this respect 00065 string behavior 00066 00067 ================================================================================ 00068 MSG: nao_msgs/RunBehaviorActionResult 00069 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00070 00071 Header header 00072 actionlib_msgs/GoalStatus status 00073 RunBehaviorResult result 00074 00075 ================================================================================ 00076 MSG: actionlib_msgs/GoalStatus 00077 GoalID goal_id 00078 uint8 status 00079 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00080 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00081 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00082 # and has since completed its execution (Terminal State) 00083 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00084 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00085 # to some failure (Terminal State) 00086 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00087 # because the goal was unattainable or invalid (Terminal State) 00088 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00089 # and has not yet completed execution 00090 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00091 # but the action server has not yet confirmed that the goal is canceled 00092 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00093 # and was successfully cancelled (Terminal State) 00094 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00095 # sent over the wire by an action server 00096 00097 #Allow for the user to associate a string with GoalStatus for debugging 00098 string text 00099 00100 00101 ================================================================================ 00102 MSG: nao_msgs/RunBehaviorResult 00103 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00104 bool noErrors 00105 00106 ================================================================================ 00107 MSG: nao_msgs/RunBehaviorActionFeedback 00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00109 00110 Header header 00111 actionlib_msgs/GoalStatus status 00112 RunBehaviorFeedback feedback 00113 00114 ================================================================================ 00115 MSG: nao_msgs/RunBehaviorFeedback 00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00117 00118 00119 """ 00120 __slots__ = ['action_goal','action_result','action_feedback'] 00121 _slot_types = ['nao_msgs/RunBehaviorActionGoal','nao_msgs/RunBehaviorActionResult','nao_msgs/RunBehaviorActionFeedback'] 00122 00123 def __init__(self, *args, **kwds): 00124 """ 00125 Constructor. Any message fields that are implicitly/explicitly 00126 set to None will be assigned a default value. The recommend 00127 use is keyword arguments as this is more robust to future message 00128 changes. You cannot mix in-order arguments and keyword arguments. 00129 00130 The available fields are: 00131 action_goal,action_result,action_feedback 00132 00133 @param args: complete set of field values, in .msg order 00134 @param kwds: use keyword arguments corresponding to message field names 00135 to set specific fields. 00136 """ 00137 if args or kwds: 00138 super(RunBehaviorAction, self).__init__(*args, **kwds) 00139 #message fields cannot be None, assign default values for those that are 00140 if self.action_goal is None: 00141 self.action_goal = nao_msgs.msg.RunBehaviorActionGoal() 00142 if self.action_result is None: 00143 self.action_result = nao_msgs.msg.RunBehaviorActionResult() 00144 if self.action_feedback is None: 00145 self.action_feedback = nao_msgs.msg.RunBehaviorActionFeedback() 00146 else: 00147 self.action_goal = nao_msgs.msg.RunBehaviorActionGoal() 00148 self.action_result = nao_msgs.msg.RunBehaviorActionResult() 00149 self.action_feedback = nao_msgs.msg.RunBehaviorActionFeedback() 00150 00151 def _get_types(self): 00152 """ 00153 internal API method 00154 """ 00155 return self._slot_types 00156 00157 def serialize(self, buff): 00158 """ 00159 serialize message into buffer 00160 @param buff: buffer 00161 @type buff: StringIO 00162 """ 00163 try: 00164 _x = self 00165 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00166 _x = self.action_goal.header.frame_id 00167 length = len(_x) 00168 buff.write(struct.pack('<I%ss'%length, length, _x)) 00169 _x = self 00170 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00171 _x = self.action_goal.goal_id.id 00172 length = len(_x) 00173 buff.write(struct.pack('<I%ss'%length, length, _x)) 00174 _x = self.action_goal.goal.behavior 00175 length = len(_x) 00176 buff.write(struct.pack('<I%ss'%length, length, _x)) 00177 _x = self 00178 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00179 _x = self.action_result.header.frame_id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 _x = self 00183 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00184 _x = self.action_result.status.goal_id.id 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 buff.write(_struct_B.pack(self.action_result.status.status)) 00188 _x = self.action_result.status.text 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 _x = self 00192 buff.write(_struct_B3I.pack(_x.action_result.result.noErrors, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00193 _x = self.action_feedback.header.frame_id 00194 length = len(_x) 00195 buff.write(struct.pack('<I%ss'%length, length, _x)) 00196 _x = self 00197 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00198 _x = self.action_feedback.status.goal_id.id 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00202 _x = self.action_feedback.status.text 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 except struct.error as se: self._check_types(se) 00206 except TypeError as te: self._check_types(te) 00207 00208 def deserialize(self, str): 00209 """ 00210 unpack serialized message in str into this message instance 00211 @param str: byte array of serialized message 00212 @type str: str 00213 """ 00214 try: 00215 if self.action_goal is None: 00216 self.action_goal = nao_msgs.msg.RunBehaviorActionGoal() 00217 if self.action_result is None: 00218 self.action_result = nao_msgs.msg.RunBehaviorActionResult() 00219 if self.action_feedback is None: 00220 self.action_feedback = nao_msgs.msg.RunBehaviorActionFeedback() 00221 end = 0 00222 _x = self 00223 start = end 00224 end += 12 00225 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.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 self.action_goal.header.frame_id = str[start:end] 00232 _x = self 00233 start = end 00234 end += 8 00235 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00236 start = end 00237 end += 4 00238 (length,) = _struct_I.unpack(str[start:end]) 00239 start = end 00240 end += length 00241 self.action_goal.goal_id.id = str[start:end] 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.action_goal.goal.behavior = str[start:end] 00248 _x = self 00249 start = end 00250 end += 12 00251 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.action_result.header.frame_id = str[start:end] 00258 _x = self 00259 start = end 00260 end += 8 00261 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 start = end 00266 end += length 00267 self.action_result.status.goal_id.id = str[start:end] 00268 start = end 00269 end += 1 00270 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 start = end 00275 end += length 00276 self.action_result.status.text = str[start:end] 00277 _x = self 00278 start = end 00279 end += 13 00280 (_x.action_result.result.noErrors, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00281 self.action_result.result.noErrors = bool(self.action_result.result.noErrors) 00282 start = end 00283 end += 4 00284 (length,) = _struct_I.unpack(str[start:end]) 00285 start = end 00286 end += length 00287 self.action_feedback.header.frame_id = str[start:end] 00288 _x = self 00289 start = end 00290 end += 8 00291 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00292 start = end 00293 end += 4 00294 (length,) = _struct_I.unpack(str[start:end]) 00295 start = end 00296 end += length 00297 self.action_feedback.status.goal_id.id = str[start:end] 00298 start = end 00299 end += 1 00300 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00301 start = end 00302 end += 4 00303 (length,) = _struct_I.unpack(str[start:end]) 00304 start = end 00305 end += length 00306 self.action_feedback.status.text = str[start:end] 00307 return self 00308 except struct.error as e: 00309 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00310 00311 00312 def serialize_numpy(self, buff, numpy): 00313 """ 00314 serialize message with numpy array types into buffer 00315 @param buff: buffer 00316 @type buff: StringIO 00317 @param numpy: numpy python module 00318 @type numpy module 00319 """ 00320 try: 00321 _x = self 00322 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00323 _x = self.action_goal.header.frame_id 00324 length = len(_x) 00325 buff.write(struct.pack('<I%ss'%length, length, _x)) 00326 _x = self 00327 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00328 _x = self.action_goal.goal_id.id 00329 length = len(_x) 00330 buff.write(struct.pack('<I%ss'%length, length, _x)) 00331 _x = self.action_goal.goal.behavior 00332 length = len(_x) 00333 buff.write(struct.pack('<I%ss'%length, length, _x)) 00334 _x = self 00335 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00336 _x = self.action_result.header.frame_id 00337 length = len(_x) 00338 buff.write(struct.pack('<I%ss'%length, length, _x)) 00339 _x = self 00340 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00341 _x = self.action_result.status.goal_id.id 00342 length = len(_x) 00343 buff.write(struct.pack('<I%ss'%length, length, _x)) 00344 buff.write(_struct_B.pack(self.action_result.status.status)) 00345 _x = self.action_result.status.text 00346 length = len(_x) 00347 buff.write(struct.pack('<I%ss'%length, length, _x)) 00348 _x = self 00349 buff.write(_struct_B3I.pack(_x.action_result.result.noErrors, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00350 _x = self.action_feedback.header.frame_id 00351 length = len(_x) 00352 buff.write(struct.pack('<I%ss'%length, length, _x)) 00353 _x = self 00354 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00355 _x = self.action_feedback.status.goal_id.id 00356 length = len(_x) 00357 buff.write(struct.pack('<I%ss'%length, length, _x)) 00358 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00359 _x = self.action_feedback.status.text 00360 length = len(_x) 00361 buff.write(struct.pack('<I%ss'%length, length, _x)) 00362 except struct.error as se: self._check_types(se) 00363 except TypeError as te: self._check_types(te) 00364 00365 def deserialize_numpy(self, str, numpy): 00366 """ 00367 unpack serialized message in str into this message instance using numpy for array types 00368 @param str: byte array of serialized message 00369 @type str: str 00370 @param numpy: numpy python module 00371 @type numpy: module 00372 """ 00373 try: 00374 if self.action_goal is None: 00375 self.action_goal = nao_msgs.msg.RunBehaviorActionGoal() 00376 if self.action_result is None: 00377 self.action_result = nao_msgs.msg.RunBehaviorActionResult() 00378 if self.action_feedback is None: 00379 self.action_feedback = nao_msgs.msg.RunBehaviorActionFeedback() 00380 end = 0 00381 _x = self 00382 start = end 00383 end += 12 00384 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00385 start = end 00386 end += 4 00387 (length,) = _struct_I.unpack(str[start:end]) 00388 start = end 00389 end += length 00390 self.action_goal.header.frame_id = str[start:end] 00391 _x = self 00392 start = end 00393 end += 8 00394 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00395 start = end 00396 end += 4 00397 (length,) = _struct_I.unpack(str[start:end]) 00398 start = end 00399 end += length 00400 self.action_goal.goal_id.id = str[start:end] 00401 start = end 00402 end += 4 00403 (length,) = _struct_I.unpack(str[start:end]) 00404 start = end 00405 end += length 00406 self.action_goal.goal.behavior = str[start:end] 00407 _x = self 00408 start = end 00409 end += 12 00410 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00411 start = end 00412 end += 4 00413 (length,) = _struct_I.unpack(str[start:end]) 00414 start = end 00415 end += length 00416 self.action_result.header.frame_id = str[start:end] 00417 _x = self 00418 start = end 00419 end += 8 00420 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00421 start = end 00422 end += 4 00423 (length,) = _struct_I.unpack(str[start:end]) 00424 start = end 00425 end += length 00426 self.action_result.status.goal_id.id = str[start:end] 00427 start = end 00428 end += 1 00429 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00430 start = end 00431 end += 4 00432 (length,) = _struct_I.unpack(str[start:end]) 00433 start = end 00434 end += length 00435 self.action_result.status.text = str[start:end] 00436 _x = self 00437 start = end 00438 end += 13 00439 (_x.action_result.result.noErrors, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00440 self.action_result.result.noErrors = bool(self.action_result.result.noErrors) 00441 start = end 00442 end += 4 00443 (length,) = _struct_I.unpack(str[start:end]) 00444 start = end 00445 end += length 00446 self.action_feedback.header.frame_id = str[start:end] 00447 _x = self 00448 start = end 00449 end += 8 00450 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00451 start = end 00452 end += 4 00453 (length,) = _struct_I.unpack(str[start:end]) 00454 start = end 00455 end += length 00456 self.action_feedback.status.goal_id.id = str[start:end] 00457 start = end 00458 end += 1 00459 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00460 start = end 00461 end += 4 00462 (length,) = _struct_I.unpack(str[start:end]) 00463 start = end 00464 end += length 00465 self.action_feedback.status.text = str[start:end] 00466 return self 00467 except struct.error as e: 00468 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00469 00470 _struct_I = roslib.message.struct_I 00471 _struct_3I = struct.Struct("<3I") 00472 _struct_B = struct.Struct("<B") 00473 _struct_2I = struct.Struct("<2I") 00474 _struct_B3I = struct.Struct("<B3I")