00001 """autogenerated by genpy from navp_action/nav_actionAction.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import navp_action.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class nav_actionAction(genpy.Message):
00013 _md5sum = "bd8df2cd934a3bee1bec28a5cbe2c083"
00014 _type = "navp_action/nav_actionAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 nav_actionActionGoal action_goal
00019 nav_actionActionResult action_result
00020 nav_actionActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: navp_action/nav_actionActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 nav_actionGoal goal
00029
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data
00034 # in a particular coordinate frame.
00035 #
00036 # sequence ID: consecutively increasing ID
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047
00048 ================================================================================
00049 MSG: actionlib_msgs/GoalID
00050 # The stamp should store the time at which this goal was requested.
00051 # It is used by an action server when it tries to preempt all
00052 # goals that were requested before a certain time
00053 time stamp
00054
00055 # The id provides a way to associate feedback and
00056 # result message with specific goal requests. The id
00057 # specified must be unique.
00058 string id
00059
00060
00061 ================================================================================
00062 MSG: navp_action/nav_actionGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065 std_msgs/UInt64 target_lo
00066
00067 ================================================================================
00068 MSG: std_msgs/UInt64
00069 uint64 data
00070 ================================================================================
00071 MSG: navp_action/nav_actionActionResult
00072 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00073
00074 Header header
00075 actionlib_msgs/GoalStatus status
00076 nav_actionResult result
00077
00078 ================================================================================
00079 MSG: actionlib_msgs/GoalStatus
00080 GoalID goal_id
00081 uint8 status
00082 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00083 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00084 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00085 # and has since completed its execution (Terminal State)
00086 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00087 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00088 # to some failure (Terminal State)
00089 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00090 # because the goal was unattainable or invalid (Terminal State)
00091 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00092 # and has not yet completed execution
00093 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00094 # but the action server has not yet confirmed that the goal is canceled
00095 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00096 # and was successfully cancelled (Terminal State)
00097 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00098 # sent over the wire by an action server
00099
00100 #Allow for the user to associate a string with GoalStatus for debugging
00101 string text
00102
00103
00104 ================================================================================
00105 MSG: navp_action/nav_actionResult
00106 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00107 #result definition
00108 std_msgs/Float32 distance
00109
00110 ================================================================================
00111 MSG: std_msgs/Float32
00112 float32 data
00113 ================================================================================
00114 MSG: navp_action/nav_actionActionFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116
00117 Header header
00118 actionlib_msgs/GoalStatus status
00119 nav_actionFeedback feedback
00120
00121 ================================================================================
00122 MSG: navp_action/nav_actionFeedback
00123 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00124 #feedback
00125 std_msgs/Float32 speed
00126 std_msgs/Float32 distance
00127
00128
00129 """
00130 __slots__ = ['action_goal','action_result','action_feedback']
00131 _slot_types = ['navp_action/nav_actionActionGoal','navp_action/nav_actionActionResult','navp_action/nav_actionActionFeedback']
00132
00133 def __init__(self, *args, **kwds):
00134 """
00135 Constructor. Any message fields that are implicitly/explicitly
00136 set to None will be assigned a default value. The recommend
00137 use is keyword arguments as this is more robust to future message
00138 changes. You cannot mix in-order arguments and keyword arguments.
00139
00140 The available fields are:
00141 action_goal,action_result,action_feedback
00142
00143 :param args: complete set of field values, in .msg order
00144 :param kwds: use keyword arguments corresponding to message field names
00145 to set specific fields.
00146 """
00147 if args or kwds:
00148 super(nav_actionAction, self).__init__(*args, **kwds)
00149
00150 if self.action_goal is None:
00151 self.action_goal = navp_action.msg.nav_actionActionGoal()
00152 if self.action_result is None:
00153 self.action_result = navp_action.msg.nav_actionActionResult()
00154 if self.action_feedback is None:
00155 self.action_feedback = navp_action.msg.nav_actionActionFeedback()
00156 else:
00157 self.action_goal = navp_action.msg.nav_actionActionGoal()
00158 self.action_result = navp_action.msg.nav_actionActionResult()
00159 self.action_feedback = navp_action.msg.nav_actionActionFeedback()
00160
00161 def _get_types(self):
00162 """
00163 internal API method
00164 """
00165 return self._slot_types
00166
00167 def serialize(self, buff):
00168 """
00169 serialize message into buffer
00170 :param buff: buffer, ``StringIO``
00171 """
00172 try:
00173 _x = self
00174 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00175 _x = self.action_goal.header.frame_id
00176 length = len(_x)
00177 if python3 or type(_x) == unicode:
00178 _x = _x.encode('utf-8')
00179 length = len(_x)
00180 buff.write(struct.pack('<I%ss'%length, length, _x))
00181 _x = self
00182 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00183 _x = self.action_goal.goal_id.id
00184 length = len(_x)
00185 if python3 or type(_x) == unicode:
00186 _x = _x.encode('utf-8')
00187 length = len(_x)
00188 buff.write(struct.pack('<I%ss'%length, length, _x))
00189 _x = self
00190 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))
00191 _x = self.action_result.header.frame_id
00192 length = len(_x)
00193 if python3 or type(_x) == unicode:
00194 _x = _x.encode('utf-8')
00195 length = len(_x)
00196 buff.write(struct.pack('<I%ss'%length, length, _x))
00197 _x = self
00198 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00199 _x = self.action_result.status.goal_id.id
00200 length = len(_x)
00201 if python3 or type(_x) == unicode:
00202 _x = _x.encode('utf-8')
00203 length = len(_x)
00204 buff.write(struct.pack('<I%ss'%length, length, _x))
00205 buff.write(_struct_B.pack(self.action_result.status.status))
00206 _x = self.action_result.status.text
00207 length = len(_x)
00208 if python3 or type(_x) == unicode:
00209 _x = _x.encode('utf-8')
00210 length = len(_x)
00211 buff.write(struct.pack('<I%ss'%length, length, _x))
00212 _x = self
00213 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))
00214 _x = self.action_feedback.header.frame_id
00215 length = len(_x)
00216 if python3 or type(_x) == unicode:
00217 _x = _x.encode('utf-8')
00218 length = len(_x)
00219 buff.write(struct.pack('<I%ss'%length, length, _x))
00220 _x = self
00221 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00222 _x = self.action_feedback.status.goal_id.id
00223 length = len(_x)
00224 if python3 or type(_x) == unicode:
00225 _x = _x.encode('utf-8')
00226 length = len(_x)
00227 buff.write(struct.pack('<I%ss'%length, length, _x))
00228 buff.write(_struct_B.pack(self.action_feedback.status.status))
00229 _x = self.action_feedback.status.text
00230 length = len(_x)
00231 if python3 or type(_x) == unicode:
00232 _x = _x.encode('utf-8')
00233 length = len(_x)
00234 buff.write(struct.pack('<I%ss'%length, length, _x))
00235 _x = self
00236 buff.write(_struct_2f.pack(_x.action_feedback.feedback.speed.data, _x.action_feedback.feedback.distance.data))
00237 except struct.error as se: self._check_types(se)
00238 except TypeError as te: self._check_types(te)
00239
00240 def deserialize(self, str):
00241 """
00242 unpack serialized message in str into this message instance
00243 :param str: byte array of serialized message, ``str``
00244 """
00245 try:
00246 if self.action_goal is None:
00247 self.action_goal = navp_action.msg.nav_actionActionGoal()
00248 if self.action_result is None:
00249 self.action_result = navp_action.msg.nav_actionActionResult()
00250 if self.action_feedback is None:
00251 self.action_feedback = navp_action.msg.nav_actionActionFeedback()
00252 end = 0
00253 _x = self
00254 start = end
00255 end += 12
00256 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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 if python3:
00263 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00264 else:
00265 self.action_goal.header.frame_id = str[start:end]
00266 _x = self
00267 start = end
00268 end += 8
00269 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 if python3:
00276 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00277 else:
00278 self.action_goal.goal_id.id = str[start:end]
00279 _x = self
00280 start = end
00281 end += 20
00282 (_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])
00283 start = end
00284 end += 4
00285 (length,) = _struct_I.unpack(str[start:end])
00286 start = end
00287 end += length
00288 if python3:
00289 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00290 else:
00291 self.action_result.header.frame_id = str[start:end]
00292 _x = self
00293 start = end
00294 end += 8
00295 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 start = end
00300 end += length
00301 if python3:
00302 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00303 else:
00304 self.action_result.status.goal_id.id = str[start:end]
00305 start = end
00306 end += 1
00307 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00308 start = end
00309 end += 4
00310 (length,) = _struct_I.unpack(str[start:end])
00311 start = end
00312 end += length
00313 if python3:
00314 self.action_result.status.text = str[start:end].decode('utf-8')
00315 else:
00316 self.action_result.status.text = str[start:end]
00317 _x = self
00318 start = end
00319 end += 16
00320 (_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])
00321 start = end
00322 end += 4
00323 (length,) = _struct_I.unpack(str[start:end])
00324 start = end
00325 end += length
00326 if python3:
00327 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00328 else:
00329 self.action_feedback.header.frame_id = str[start:end]
00330 _x = self
00331 start = end
00332 end += 8
00333 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00334 start = end
00335 end += 4
00336 (length,) = _struct_I.unpack(str[start:end])
00337 start = end
00338 end += length
00339 if python3:
00340 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00341 else:
00342 self.action_feedback.status.goal_id.id = str[start:end]
00343 start = end
00344 end += 1
00345 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00346 start = end
00347 end += 4
00348 (length,) = _struct_I.unpack(str[start:end])
00349 start = end
00350 end += length
00351 if python3:
00352 self.action_feedback.status.text = str[start:end].decode('utf-8')
00353 else:
00354 self.action_feedback.status.text = str[start:end]
00355 _x = self
00356 start = end
00357 end += 8
00358 (_x.action_feedback.feedback.speed.data, _x.action_feedback.feedback.distance.data,) = _struct_2f.unpack(str[start:end])
00359 return self
00360 except struct.error as e:
00361 raise genpy.DeserializationError(e)
00362
00363
00364 def serialize_numpy(self, buff, numpy):
00365 """
00366 serialize message with numpy array types into buffer
00367 :param buff: buffer, ``StringIO``
00368 :param numpy: numpy python module
00369 """
00370 try:
00371 _x = self
00372 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00373 _x = self.action_goal.header.frame_id
00374 length = len(_x)
00375 if python3 or type(_x) == unicode:
00376 _x = _x.encode('utf-8')
00377 length = len(_x)
00378 buff.write(struct.pack('<I%ss'%length, length, _x))
00379 _x = self
00380 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00381 _x = self.action_goal.goal_id.id
00382 length = len(_x)
00383 if python3 or type(_x) == unicode:
00384 _x = _x.encode('utf-8')
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 _x = self
00388 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))
00389 _x = self.action_result.header.frame_id
00390 length = len(_x)
00391 if python3 or type(_x) == unicode:
00392 _x = _x.encode('utf-8')
00393 length = len(_x)
00394 buff.write(struct.pack('<I%ss'%length, length, _x))
00395 _x = self
00396 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00397 _x = self.action_result.status.goal_id.id
00398 length = len(_x)
00399 if python3 or type(_x) == unicode:
00400 _x = _x.encode('utf-8')
00401 length = len(_x)
00402 buff.write(struct.pack('<I%ss'%length, length, _x))
00403 buff.write(_struct_B.pack(self.action_result.status.status))
00404 _x = self.action_result.status.text
00405 length = len(_x)
00406 if python3 or type(_x) == unicode:
00407 _x = _x.encode('utf-8')
00408 length = len(_x)
00409 buff.write(struct.pack('<I%ss'%length, length, _x))
00410 _x = self
00411 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))
00412 _x = self.action_feedback.header.frame_id
00413 length = len(_x)
00414 if python3 or type(_x) == unicode:
00415 _x = _x.encode('utf-8')
00416 length = len(_x)
00417 buff.write(struct.pack('<I%ss'%length, length, _x))
00418 _x = self
00419 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00420 _x = self.action_feedback.status.goal_id.id
00421 length = len(_x)
00422 if python3 or type(_x) == unicode:
00423 _x = _x.encode('utf-8')
00424 length = len(_x)
00425 buff.write(struct.pack('<I%ss'%length, length, _x))
00426 buff.write(_struct_B.pack(self.action_feedback.status.status))
00427 _x = self.action_feedback.status.text
00428 length = len(_x)
00429 if python3 or type(_x) == unicode:
00430 _x = _x.encode('utf-8')
00431 length = len(_x)
00432 buff.write(struct.pack('<I%ss'%length, length, _x))
00433 _x = self
00434 buff.write(_struct_2f.pack(_x.action_feedback.feedback.speed.data, _x.action_feedback.feedback.distance.data))
00435 except struct.error as se: self._check_types(se)
00436 except TypeError as te: self._check_types(te)
00437
00438 def deserialize_numpy(self, str, numpy):
00439 """
00440 unpack serialized message in str into this message instance using numpy for array types
00441 :param str: byte array of serialized message, ``str``
00442 :param numpy: numpy python module
00443 """
00444 try:
00445 if self.action_goal is None:
00446 self.action_goal = navp_action.msg.nav_actionActionGoal()
00447 if self.action_result is None:
00448 self.action_result = navp_action.msg.nav_actionActionResult()
00449 if self.action_feedback is None:
00450 self.action_feedback = navp_action.msg.nav_actionActionFeedback()
00451 end = 0
00452 _x = self
00453 start = end
00454 end += 12
00455 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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 if python3:
00462 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00463 else:
00464 self.action_goal.header.frame_id = str[start:end]
00465 _x = self
00466 start = end
00467 end += 8
00468 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00469 start = end
00470 end += 4
00471 (length,) = _struct_I.unpack(str[start:end])
00472 start = end
00473 end += length
00474 if python3:
00475 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00476 else:
00477 self.action_goal.goal_id.id = str[start:end]
00478 _x = self
00479 start = end
00480 end += 20
00481 (_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])
00482 start = end
00483 end += 4
00484 (length,) = _struct_I.unpack(str[start:end])
00485 start = end
00486 end += length
00487 if python3:
00488 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00489 else:
00490 self.action_result.header.frame_id = str[start:end]
00491 _x = self
00492 start = end
00493 end += 8
00494 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00495 start = end
00496 end += 4
00497 (length,) = _struct_I.unpack(str[start:end])
00498 start = end
00499 end += length
00500 if python3:
00501 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00502 else:
00503 self.action_result.status.goal_id.id = str[start:end]
00504 start = end
00505 end += 1
00506 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00507 start = end
00508 end += 4
00509 (length,) = _struct_I.unpack(str[start:end])
00510 start = end
00511 end += length
00512 if python3:
00513 self.action_result.status.text = str[start:end].decode('utf-8')
00514 else:
00515 self.action_result.status.text = str[start:end]
00516 _x = self
00517 start = end
00518 end += 16
00519 (_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])
00520 start = end
00521 end += 4
00522 (length,) = _struct_I.unpack(str[start:end])
00523 start = end
00524 end += length
00525 if python3:
00526 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00527 else:
00528 self.action_feedback.header.frame_id = str[start:end]
00529 _x = self
00530 start = end
00531 end += 8
00532 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00533 start = end
00534 end += 4
00535 (length,) = _struct_I.unpack(str[start:end])
00536 start = end
00537 end += length
00538 if python3:
00539 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00540 else:
00541 self.action_feedback.status.goal_id.id = str[start:end]
00542 start = end
00543 end += 1
00544 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00545 start = end
00546 end += 4
00547 (length,) = _struct_I.unpack(str[start:end])
00548 start = end
00549 end += length
00550 if python3:
00551 self.action_feedback.status.text = str[start:end].decode('utf-8')
00552 else:
00553 self.action_feedback.status.text = str[start:end]
00554 _x = self
00555 start = end
00556 end += 8
00557 (_x.action_feedback.feedback.speed.data, _x.action_feedback.feedback.distance.data,) = _struct_2f.unpack(str[start:end])
00558 return self
00559 except struct.error as e:
00560 raise genpy.DeserializationError(e)
00561
00562 _struct_I = genpy.struct_I
00563 _struct_B = struct.Struct("<B")
00564 _struct_f3I = struct.Struct("<f3I")
00565 _struct_Q3I = struct.Struct("<Q3I")
00566 _struct_2f = struct.Struct("<2f")
00567 _struct_3I = struct.Struct("<3I")
00568 _struct_2I = struct.Struct("<2I")