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