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