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