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