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