$search
00001 """autogenerated by genmsg_py from ScriptAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 import cob_script_server.msg 00008 import std_msgs.msg 00009 00010 class ScriptAction(roslib.message.Message): 00011 _md5sum = "d0148ee0b193e5f2d1a73ac54d961178" 00012 _type = "cob_script_server/ScriptAction" 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 ScriptActionGoal action_goal 00017 ScriptActionResult action_result 00018 ScriptActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: cob_script_server/ScriptActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 ScriptGoal 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: cob_script_server/ScriptGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 #goal definition 00063 string function_name 00064 string component_name 00065 string parameter_name 00066 string mode 00067 string service_name 00068 float32 duration 00069 bool planning 00070 00071 ================================================================================ 00072 MSG: cob_script_server/ScriptActionResult 00073 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00074 00075 Header header 00076 actionlib_msgs/GoalStatus status 00077 ScriptResult result 00078 00079 ================================================================================ 00080 MSG: actionlib_msgs/GoalStatus 00081 GoalID goal_id 00082 uint8 status 00083 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00084 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00085 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00086 # and has since completed its execution (Terminal State) 00087 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00088 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00089 # to some failure (Terminal State) 00090 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00091 # because the goal was unattainable or invalid (Terminal State) 00092 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00093 # and has not yet completed execution 00094 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00095 # but the action server has not yet confirmed that the goal is canceled 00096 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00097 # and was successfully cancelled (Terminal State) 00098 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00099 # sent over the wire by an action server 00100 00101 #Allow for the user to associate a string with GoalStatus for debugging 00102 string text 00103 00104 00105 ================================================================================ 00106 MSG: cob_script_server/ScriptResult 00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00108 #result definition 00109 int32 error_code 00110 00111 ================================================================================ 00112 MSG: cob_script_server/ScriptActionFeedback 00113 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00114 00115 Header header 00116 actionlib_msgs/GoalStatus status 00117 ScriptFeedback feedback 00118 00119 ================================================================================ 00120 MSG: cob_script_server/ScriptFeedback 00121 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00122 #feedback definition 00123 00124 00125 """ 00126 __slots__ = ['action_goal','action_result','action_feedback'] 00127 _slot_types = ['cob_script_server/ScriptActionGoal','cob_script_server/ScriptActionResult','cob_script_server/ScriptActionFeedback'] 00128 00129 def __init__(self, *args, **kwds): 00130 """ 00131 Constructor. Any message fields that are implicitly/explicitly 00132 set to None will be assigned a default value. The recommend 00133 use is keyword arguments as this is more robust to future message 00134 changes. You cannot mix in-order arguments and keyword arguments. 00135 00136 The available fields are: 00137 action_goal,action_result,action_feedback 00138 00139 @param args: complete set of field values, in .msg order 00140 @param kwds: use keyword arguments corresponding to message field names 00141 to set specific fields. 00142 """ 00143 if args or kwds: 00144 super(ScriptAction, self).__init__(*args, **kwds) 00145 #message fields cannot be None, assign default values for those that are 00146 if self.action_goal is None: 00147 self.action_goal = cob_script_server.msg.ScriptActionGoal() 00148 if self.action_result is None: 00149 self.action_result = cob_script_server.msg.ScriptActionResult() 00150 if self.action_feedback is None: 00151 self.action_feedback = cob_script_server.msg.ScriptActionFeedback() 00152 else: 00153 self.action_goal = cob_script_server.msg.ScriptActionGoal() 00154 self.action_result = cob_script_server.msg.ScriptActionResult() 00155 self.action_feedback = cob_script_server.msg.ScriptActionFeedback() 00156 00157 def _get_types(self): 00158 """ 00159 internal API method 00160 """ 00161 return self._slot_types 00162 00163 def serialize(self, buff): 00164 """ 00165 serialize message into buffer 00166 @param buff: buffer 00167 @type buff: StringIO 00168 """ 00169 try: 00170 _x = self 00171 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00172 _x = self.action_goal.header.frame_id 00173 length = len(_x) 00174 buff.write(struct.pack('<I%ss'%length, length, _x)) 00175 _x = self 00176 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00177 _x = self.action_goal.goal_id.id 00178 length = len(_x) 00179 buff.write(struct.pack('<I%ss'%length, length, _x)) 00180 _x = self.action_goal.goal.function_name 00181 length = len(_x) 00182 buff.write(struct.pack('<I%ss'%length, length, _x)) 00183 _x = self.action_goal.goal.component_name 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 _x = self.action_goal.goal.parameter_name 00187 length = len(_x) 00188 buff.write(struct.pack('<I%ss'%length, length, _x)) 00189 _x = self.action_goal.goal.mode 00190 length = len(_x) 00191 buff.write(struct.pack('<I%ss'%length, length, _x)) 00192 _x = self.action_goal.goal.service_name 00193 length = len(_x) 00194 buff.write(struct.pack('<I%ss'%length, length, _x)) 00195 _x = self 00196 buff.write(_struct_fB3I.pack(_x.action_goal.goal.duration, _x.action_goal.goal.planning, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00197 _x = self.action_result.header.frame_id 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 _x = self 00201 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00202 _x = self.action_result.status.goal_id.id 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 buff.write(_struct_B.pack(self.action_result.status.status)) 00206 _x = self.action_result.status.text 00207 length = len(_x) 00208 buff.write(struct.pack('<I%ss'%length, length, _x)) 00209 _x = self 00210 buff.write(_struct_i3I.pack(_x.action_result.result.error_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00211 _x = self.action_feedback.header.frame_id 00212 length = len(_x) 00213 buff.write(struct.pack('<I%ss'%length, length, _x)) 00214 _x = self 00215 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00216 _x = self.action_feedback.status.goal_id.id 00217 length = len(_x) 00218 buff.write(struct.pack('<I%ss'%length, length, _x)) 00219 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00220 _x = self.action_feedback.status.text 00221 length = len(_x) 00222 buff.write(struct.pack('<I%ss'%length, length, _x)) 00223 except struct.error as se: self._check_types(se) 00224 except TypeError as te: self._check_types(te) 00225 00226 def deserialize(self, str): 00227 """ 00228 unpack serialized message in str into this message instance 00229 @param str: byte array of serialized message 00230 @type str: str 00231 """ 00232 try: 00233 if self.action_goal is None: 00234 self.action_goal = cob_script_server.msg.ScriptActionGoal() 00235 if self.action_result is None: 00236 self.action_result = cob_script_server.msg.ScriptActionResult() 00237 if self.action_feedback is None: 00238 self.action_feedback = cob_script_server.msg.ScriptActionFeedback() 00239 end = 0 00240 _x = self 00241 start = end 00242 end += 12 00243 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00244 start = end 00245 end += 4 00246 (length,) = _struct_I.unpack(str[start:end]) 00247 start = end 00248 end += length 00249 self.action_goal.header.frame_id = str[start:end] 00250 _x = self 00251 start = end 00252 end += 8 00253 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.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.action_goal.goal_id.id = str[start:end] 00260 start = end 00261 end += 4 00262 (length,) = _struct_I.unpack(str[start:end]) 00263 start = end 00264 end += length 00265 self.action_goal.goal.function_name = str[start:end] 00266 start = end 00267 end += 4 00268 (length,) = _struct_I.unpack(str[start:end]) 00269 start = end 00270 end += length 00271 self.action_goal.goal.component_name = str[start:end] 00272 start = end 00273 end += 4 00274 (length,) = _struct_I.unpack(str[start:end]) 00275 start = end 00276 end += length 00277 self.action_goal.goal.parameter_name = str[start:end] 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 self.action_goal.goal.mode = str[start:end] 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 start = end 00288 end += length 00289 self.action_goal.goal.service_name = str[start:end] 00290 _x = self 00291 start = end 00292 end += 17 00293 (_x.action_goal.goal.duration, _x.action_goal.goal.planning, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_fB3I.unpack(str[start:end]) 00294 self.action_goal.goal.planning = bool(self.action_goal.goal.planning) 00295 start = end 00296 end += 4 00297 (length,) = _struct_I.unpack(str[start:end]) 00298 start = end 00299 end += length 00300 self.action_result.header.frame_id = str[start:end] 00301 _x = self 00302 start = end 00303 end += 8 00304 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00305 start = end 00306 end += 4 00307 (length,) = _struct_I.unpack(str[start:end]) 00308 start = end 00309 end += length 00310 self.action_result.status.goal_id.id = str[start:end] 00311 start = end 00312 end += 1 00313 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00314 start = end 00315 end += 4 00316 (length,) = _struct_I.unpack(str[start:end]) 00317 start = end 00318 end += length 00319 self.action_result.status.text = str[start:end] 00320 _x = self 00321 start = end 00322 end += 16 00323 (_x.action_result.result.error_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end]) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 start = end 00328 end += length 00329 self.action_feedback.header.frame_id = str[start:end] 00330 _x = self 00331 start = end 00332 end += 8 00333 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 start = end 00338 end += length 00339 self.action_feedback.status.goal_id.id = str[start:end] 00340 start = end 00341 end += 1 00342 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00343 start = end 00344 end += 4 00345 (length,) = _struct_I.unpack(str[start:end]) 00346 start = end 00347 end += length 00348 self.action_feedback.status.text = str[start:end] 00349 return self 00350 except struct.error as e: 00351 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00352 00353 00354 def serialize_numpy(self, buff, numpy): 00355 """ 00356 serialize message with numpy array types into buffer 00357 @param buff: buffer 00358 @type buff: StringIO 00359 @param numpy: numpy python module 00360 @type numpy module 00361 """ 00362 try: 00363 _x = self 00364 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00365 _x = self.action_goal.header.frame_id 00366 length = len(_x) 00367 buff.write(struct.pack('<I%ss'%length, length, _x)) 00368 _x = self 00369 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00370 _x = self.action_goal.goal_id.id 00371 length = len(_x) 00372 buff.write(struct.pack('<I%ss'%length, length, _x)) 00373 _x = self.action_goal.goal.function_name 00374 length = len(_x) 00375 buff.write(struct.pack('<I%ss'%length, length, _x)) 00376 _x = self.action_goal.goal.component_name 00377 length = len(_x) 00378 buff.write(struct.pack('<I%ss'%length, length, _x)) 00379 _x = self.action_goal.goal.parameter_name 00380 length = len(_x) 00381 buff.write(struct.pack('<I%ss'%length, length, _x)) 00382 _x = self.action_goal.goal.mode 00383 length = len(_x) 00384 buff.write(struct.pack('<I%ss'%length, length, _x)) 00385 _x = self.action_goal.goal.service_name 00386 length = len(_x) 00387 buff.write(struct.pack('<I%ss'%length, length, _x)) 00388 _x = self 00389 buff.write(_struct_fB3I.pack(_x.action_goal.goal.duration, _x.action_goal.goal.planning, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00390 _x = self.action_result.header.frame_id 00391 length = len(_x) 00392 buff.write(struct.pack('<I%ss'%length, length, _x)) 00393 _x = self 00394 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00395 _x = self.action_result.status.goal_id.id 00396 length = len(_x) 00397 buff.write(struct.pack('<I%ss'%length, length, _x)) 00398 buff.write(_struct_B.pack(self.action_result.status.status)) 00399 _x = self.action_result.status.text 00400 length = len(_x) 00401 buff.write(struct.pack('<I%ss'%length, length, _x)) 00402 _x = self 00403 buff.write(_struct_i3I.pack(_x.action_result.result.error_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00404 _x = self.action_feedback.header.frame_id 00405 length = len(_x) 00406 buff.write(struct.pack('<I%ss'%length, length, _x)) 00407 _x = self 00408 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00409 _x = self.action_feedback.status.goal_id.id 00410 length = len(_x) 00411 buff.write(struct.pack('<I%ss'%length, length, _x)) 00412 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00413 _x = self.action_feedback.status.text 00414 length = len(_x) 00415 buff.write(struct.pack('<I%ss'%length, length, _x)) 00416 except struct.error as se: self._check_types(se) 00417 except TypeError as te: self._check_types(te) 00418 00419 def deserialize_numpy(self, str, numpy): 00420 """ 00421 unpack serialized message in str into this message instance using numpy for array types 00422 @param str: byte array of serialized message 00423 @type str: str 00424 @param numpy: numpy python module 00425 @type numpy: module 00426 """ 00427 try: 00428 if self.action_goal is None: 00429 self.action_goal = cob_script_server.msg.ScriptActionGoal() 00430 if self.action_result is None: 00431 self.action_result = cob_script_server.msg.ScriptActionResult() 00432 if self.action_feedback is None: 00433 self.action_feedback = cob_script_server.msg.ScriptActionFeedback() 00434 end = 0 00435 _x = self 00436 start = end 00437 end += 12 00438 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00439 start = end 00440 end += 4 00441 (length,) = _struct_I.unpack(str[start:end]) 00442 start = end 00443 end += length 00444 self.action_goal.header.frame_id = str[start:end] 00445 _x = self 00446 start = end 00447 end += 8 00448 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00449 start = end 00450 end += 4 00451 (length,) = _struct_I.unpack(str[start:end]) 00452 start = end 00453 end += length 00454 self.action_goal.goal_id.id = str[start:end] 00455 start = end 00456 end += 4 00457 (length,) = _struct_I.unpack(str[start:end]) 00458 start = end 00459 end += length 00460 self.action_goal.goal.function_name = str[start:end] 00461 start = end 00462 end += 4 00463 (length,) = _struct_I.unpack(str[start:end]) 00464 start = end 00465 end += length 00466 self.action_goal.goal.component_name = str[start:end] 00467 start = end 00468 end += 4 00469 (length,) = _struct_I.unpack(str[start:end]) 00470 start = end 00471 end += length 00472 self.action_goal.goal.parameter_name = str[start:end] 00473 start = end 00474 end += 4 00475 (length,) = _struct_I.unpack(str[start:end]) 00476 start = end 00477 end += length 00478 self.action_goal.goal.mode = str[start:end] 00479 start = end 00480 end += 4 00481 (length,) = _struct_I.unpack(str[start:end]) 00482 start = end 00483 end += length 00484 self.action_goal.goal.service_name = str[start:end] 00485 _x = self 00486 start = end 00487 end += 17 00488 (_x.action_goal.goal.duration, _x.action_goal.goal.planning, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_fB3I.unpack(str[start:end]) 00489 self.action_goal.goal.planning = bool(self.action_goal.goal.planning) 00490 start = end 00491 end += 4 00492 (length,) = _struct_I.unpack(str[start:end]) 00493 start = end 00494 end += length 00495 self.action_result.header.frame_id = str[start:end] 00496 _x = self 00497 start = end 00498 end += 8 00499 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00500 start = end 00501 end += 4 00502 (length,) = _struct_I.unpack(str[start:end]) 00503 start = end 00504 end += length 00505 self.action_result.status.goal_id.id = str[start:end] 00506 start = end 00507 end += 1 00508 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00509 start = end 00510 end += 4 00511 (length,) = _struct_I.unpack(str[start:end]) 00512 start = end 00513 end += length 00514 self.action_result.status.text = str[start:end] 00515 _x = self 00516 start = end 00517 end += 16 00518 (_x.action_result.result.error_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end]) 00519 start = end 00520 end += 4 00521 (length,) = _struct_I.unpack(str[start:end]) 00522 start = end 00523 end += length 00524 self.action_feedback.header.frame_id = str[start:end] 00525 _x = self 00526 start = end 00527 end += 8 00528 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00529 start = end 00530 end += 4 00531 (length,) = _struct_I.unpack(str[start:end]) 00532 start = end 00533 end += length 00534 self.action_feedback.status.goal_id.id = str[start:end] 00535 start = end 00536 end += 1 00537 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00538 start = end 00539 end += 4 00540 (length,) = _struct_I.unpack(str[start:end]) 00541 start = end 00542 end += length 00543 self.action_feedback.status.text = str[start:end] 00544 return self 00545 except struct.error as e: 00546 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00547 00548 _struct_I = roslib.message.struct_I 00549 _struct_3I = struct.Struct("<3I") 00550 _struct_B = struct.Struct("<B") 00551 _struct_fB3I = struct.Struct("<fB3I") 00552 _struct_2I = struct.Struct("<2I") 00553 _struct_i3I = struct.Struct("<i3I")