_followTargetAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_nav_msgs/followTargetAction.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 genpy
00008 import actionlib_msgs.msg
00009 import iri_nav_msgs.msg
00010 import std_msgs.msg
00011 
00012 class followTargetAction(genpy.Message):
00013   _md5sum = "9172d5c251510957b3f391e73338686c"
00014   _type = "iri_nav_msgs/followTargetAction"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 followTargetActionGoal action_goal
00019 followTargetActionResult action_result
00020 followTargetActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: iri_nav_msgs/followTargetActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 followTargetGoal 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: iri_nav_msgs/followTargetGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065 
00066 ================================================================================
00067 MSG: iri_nav_msgs/followTargetActionResult
00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00069 
00070 Header header
00071 actionlib_msgs/GoalStatus status
00072 followTargetResult result
00073 
00074 ================================================================================
00075 MSG: actionlib_msgs/GoalStatus
00076 GoalID goal_id
00077 uint8 status
00078 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00079 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00080 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00081                             #   and has since completed its execution (Terminal State)
00082 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00083 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00084                             #    to some failure (Terminal State)
00085 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00086                             #    because the goal was unattainable or invalid (Terminal State)
00087 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00088                             #    and has not yet completed execution
00089 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00090                             #    but the action server has not yet confirmed that the goal is canceled
00091 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00092                             #    and was successfully cancelled (Terminal State)
00093 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00094                             #    sent over the wire by an action server
00095 
00096 #Allow for the user to associate a string with GoalStatus for debugging
00097 string text
00098 
00099 
00100 ================================================================================
00101 MSG: iri_nav_msgs/followTargetResult
00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00103 #result definition
00104 bool    successful
00105 
00106 ================================================================================
00107 MSG: iri_nav_msgs/followTargetActionFeedback
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109 
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 followTargetFeedback feedback
00113 
00114 ================================================================================
00115 MSG: iri_nav_msgs/followTargetFeedback
00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00117 #feedback
00118 float32 current_dist
00119 
00120 
00121 """
00122   __slots__ = ['action_goal','action_result','action_feedback']
00123   _slot_types = ['iri_nav_msgs/followTargetActionGoal','iri_nav_msgs/followTargetActionResult','iri_nav_msgs/followTargetActionFeedback']
00124 
00125   def __init__(self, *args, **kwds):
00126     """
00127     Constructor. Any message fields that are implicitly/explicitly
00128     set to None will be assigned a default value. The recommend
00129     use is keyword arguments as this is more robust to future message
00130     changes.  You cannot mix in-order arguments and keyword arguments.
00131 
00132     The available fields are:
00133        action_goal,action_result,action_feedback
00134 
00135     :param args: complete set of field values, in .msg order
00136     :param kwds: use keyword arguments corresponding to message field names
00137     to set specific fields.
00138     """
00139     if args or kwds:
00140       super(followTargetAction, self).__init__(*args, **kwds)
00141       #message fields cannot be None, assign default values for those that are
00142       if self.action_goal is None:
00143         self.action_goal = iri_nav_msgs.msg.followTargetActionGoal()
00144       if self.action_result is None:
00145         self.action_result = iri_nav_msgs.msg.followTargetActionResult()
00146       if self.action_feedback is None:
00147         self.action_feedback = iri_nav_msgs.msg.followTargetActionFeedback()
00148     else:
00149       self.action_goal = iri_nav_msgs.msg.followTargetActionGoal()
00150       self.action_result = iri_nav_msgs.msg.followTargetActionResult()
00151       self.action_feedback = iri_nav_msgs.msg.followTargetActionFeedback()
00152 
00153   def _get_types(self):
00154     """
00155     internal API method
00156     """
00157     return self._slot_types
00158 
00159   def serialize(self, buff):
00160     """
00161     serialize message into buffer
00162     :param buff: buffer, ``StringIO``
00163     """
00164     try:
00165       _x = self
00166       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00167       _x = self.action_goal.header.frame_id
00168       length = len(_x)
00169       if python3 or type(_x) == unicode:
00170         _x = _x.encode('utf-8')
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_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00175       _x = self.action_goal.goal_id.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_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00183       _x = self.action_result.header.frame_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_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00191       _x = self.action_result.status.goal_id.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       buff.write(_struct_B.pack(self.action_result.status.status))
00198       _x = self.action_result.status.text
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204       _x = self
00205       buff.write(_struct_B3I.pack(_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00206       _x = self.action_feedback.header.frame_id
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_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00214       _x = self.action_feedback.status.goal_id.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       buff.write(_struct_B.pack(self.action_feedback.status.status))
00221       _x = self.action_feedback.status.text
00222       length = len(_x)
00223       if python3 or type(_x) == unicode:
00224         _x = _x.encode('utf-8')
00225         length = len(_x)
00226       buff.write(struct.pack('<I%ss'%length, length, _x))
00227       buff.write(_struct_f.pack(self.action_feedback.feedback.current_dist))
00228     except struct.error as se: self._check_types(se)
00229     except TypeError as te: self._check_types(te)
00230 
00231   def deserialize(self, str):
00232     """
00233     unpack serialized message in str into this message instance
00234     :param str: byte array of serialized message, ``str``
00235     """
00236     try:
00237       if self.action_goal is None:
00238         self.action_goal = iri_nav_msgs.msg.followTargetActionGoal()
00239       if self.action_result is None:
00240         self.action_result = iri_nav_msgs.msg.followTargetActionResult()
00241       if self.action_feedback is None:
00242         self.action_feedback = iri_nav_msgs.msg.followTargetActionFeedback()
00243       end = 0
00244       _x = self
00245       start = end
00246       end += 12
00247       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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       if python3:
00254         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00255       else:
00256         self.action_goal.header.frame_id = str[start:end]
00257       _x = self
00258       start = end
00259       end += 8
00260       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00261       start = end
00262       end += 4
00263       (length,) = _struct_I.unpack(str[start:end])
00264       start = end
00265       end += length
00266       if python3:
00267         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00268       else:
00269         self.action_goal.goal_id.id = str[start:end]
00270       _x = self
00271       start = end
00272       end += 12
00273       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00274       start = end
00275       end += 4
00276       (length,) = _struct_I.unpack(str[start:end])
00277       start = end
00278       end += length
00279       if python3:
00280         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00281       else:
00282         self.action_result.header.frame_id = str[start:end]
00283       _x = self
00284       start = end
00285       end += 8
00286       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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       if python3:
00293         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00294       else:
00295         self.action_result.status.goal_id.id = str[start:end]
00296       start = end
00297       end += 1
00298       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       start = end
00303       end += length
00304       if python3:
00305         self.action_result.status.text = str[start:end].decode('utf-8')
00306       else:
00307         self.action_result.status.text = str[start:end]
00308       _x = self
00309       start = end
00310       end += 13
00311       (_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00312       self.action_result.result.successful = bool(self.action_result.result.successful)
00313       start = end
00314       end += 4
00315       (length,) = _struct_I.unpack(str[start:end])
00316       start = end
00317       end += length
00318       if python3:
00319         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00320       else:
00321         self.action_feedback.header.frame_id = str[start:end]
00322       _x = self
00323       start = end
00324       end += 8
00325       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00326       start = end
00327       end += 4
00328       (length,) = _struct_I.unpack(str[start:end])
00329       start = end
00330       end += length
00331       if python3:
00332         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00333       else:
00334         self.action_feedback.status.goal_id.id = str[start:end]
00335       start = end
00336       end += 1
00337       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00338       start = end
00339       end += 4
00340       (length,) = _struct_I.unpack(str[start:end])
00341       start = end
00342       end += length
00343       if python3:
00344         self.action_feedback.status.text = str[start:end].decode('utf-8')
00345       else:
00346         self.action_feedback.status.text = str[start:end]
00347       start = end
00348       end += 4
00349       (self.action_feedback.feedback.current_dist,) = _struct_f.unpack(str[start:end])
00350       return self
00351     except struct.error as e:
00352       raise genpy.DeserializationError(e) #most likely buffer underfill
00353 
00354 
00355   def serialize_numpy(self, buff, numpy):
00356     """
00357     serialize message with numpy array types into buffer
00358     :param buff: buffer, ``StringIO``
00359     :param numpy: numpy python module
00360     """
00361     try:
00362       _x = self
00363       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00364       _x = self.action_goal.header.frame_id
00365       length = len(_x)
00366       if python3 or type(_x) == unicode:
00367         _x = _x.encode('utf-8')
00368         length = len(_x)
00369       buff.write(struct.pack('<I%ss'%length, length, _x))
00370       _x = self
00371       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00372       _x = self.action_goal.goal_id.id
00373       length = len(_x)
00374       if python3 or type(_x) == unicode:
00375         _x = _x.encode('utf-8')
00376         length = len(_x)
00377       buff.write(struct.pack('<I%ss'%length, length, _x))
00378       _x = self
00379       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00380       _x = self.action_result.header.frame_id
00381       length = len(_x)
00382       if python3 or type(_x) == unicode:
00383         _x = _x.encode('utf-8')
00384         length = len(_x)
00385       buff.write(struct.pack('<I%ss'%length, length, _x))
00386       _x = self
00387       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00388       _x = self.action_result.status.goal_id.id
00389       length = len(_x)
00390       if python3 or type(_x) == unicode:
00391         _x = _x.encode('utf-8')
00392         length = len(_x)
00393       buff.write(struct.pack('<I%ss'%length, length, _x))
00394       buff.write(_struct_B.pack(self.action_result.status.status))
00395       _x = self.action_result.status.text
00396       length = len(_x)
00397       if python3 or type(_x) == unicode:
00398         _x = _x.encode('utf-8')
00399         length = len(_x)
00400       buff.write(struct.pack('<I%ss'%length, length, _x))
00401       _x = self
00402       buff.write(_struct_B3I.pack(_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00403       _x = self.action_feedback.header.frame_id
00404       length = len(_x)
00405       if python3 or type(_x) == unicode:
00406         _x = _x.encode('utf-8')
00407         length = len(_x)
00408       buff.write(struct.pack('<I%ss'%length, length, _x))
00409       _x = self
00410       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00411       _x = self.action_feedback.status.goal_id.id
00412       length = len(_x)
00413       if python3 or type(_x) == unicode:
00414         _x = _x.encode('utf-8')
00415         length = len(_x)
00416       buff.write(struct.pack('<I%ss'%length, length, _x))
00417       buff.write(_struct_B.pack(self.action_feedback.status.status))
00418       _x = self.action_feedback.status.text
00419       length = len(_x)
00420       if python3 or type(_x) == unicode:
00421         _x = _x.encode('utf-8')
00422         length = len(_x)
00423       buff.write(struct.pack('<I%ss'%length, length, _x))
00424       buff.write(_struct_f.pack(self.action_feedback.feedback.current_dist))
00425     except struct.error as se: self._check_types(se)
00426     except TypeError as te: self._check_types(te)
00427 
00428   def deserialize_numpy(self, str, numpy):
00429     """
00430     unpack serialized message in str into this message instance using numpy for array types
00431     :param str: byte array of serialized message, ``str``
00432     :param numpy: numpy python module
00433     """
00434     try:
00435       if self.action_goal is None:
00436         self.action_goal = iri_nav_msgs.msg.followTargetActionGoal()
00437       if self.action_result is None:
00438         self.action_result = iri_nav_msgs.msg.followTargetActionResult()
00439       if self.action_feedback is None:
00440         self.action_feedback = iri_nav_msgs.msg.followTargetActionFeedback()
00441       end = 0
00442       _x = self
00443       start = end
00444       end += 12
00445       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00446       start = end
00447       end += 4
00448       (length,) = _struct_I.unpack(str[start:end])
00449       start = end
00450       end += length
00451       if python3:
00452         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00453       else:
00454         self.action_goal.header.frame_id = str[start:end]
00455       _x = self
00456       start = end
00457       end += 8
00458       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00459       start = end
00460       end += 4
00461       (length,) = _struct_I.unpack(str[start:end])
00462       start = end
00463       end += length
00464       if python3:
00465         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00466       else:
00467         self.action_goal.goal_id.id = str[start:end]
00468       _x = self
00469       start = end
00470       end += 12
00471       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00472       start = end
00473       end += 4
00474       (length,) = _struct_I.unpack(str[start:end])
00475       start = end
00476       end += length
00477       if python3:
00478         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00479       else:
00480         self.action_result.header.frame_id = str[start:end]
00481       _x = self
00482       start = end
00483       end += 8
00484       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00485       start = end
00486       end += 4
00487       (length,) = _struct_I.unpack(str[start:end])
00488       start = end
00489       end += length
00490       if python3:
00491         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00492       else:
00493         self.action_result.status.goal_id.id = str[start:end]
00494       start = end
00495       end += 1
00496       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00497       start = end
00498       end += 4
00499       (length,) = _struct_I.unpack(str[start:end])
00500       start = end
00501       end += length
00502       if python3:
00503         self.action_result.status.text = str[start:end].decode('utf-8')
00504       else:
00505         self.action_result.status.text = str[start:end]
00506       _x = self
00507       start = end
00508       end += 13
00509       (_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00510       self.action_result.result.successful = bool(self.action_result.result.successful)
00511       start = end
00512       end += 4
00513       (length,) = _struct_I.unpack(str[start:end])
00514       start = end
00515       end += length
00516       if python3:
00517         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00518       else:
00519         self.action_feedback.header.frame_id = str[start:end]
00520       _x = self
00521       start = end
00522       end += 8
00523       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00524       start = end
00525       end += 4
00526       (length,) = _struct_I.unpack(str[start:end])
00527       start = end
00528       end += length
00529       if python3:
00530         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00531       else:
00532         self.action_feedback.status.goal_id.id = str[start:end]
00533       start = end
00534       end += 1
00535       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00536       start = end
00537       end += 4
00538       (length,) = _struct_I.unpack(str[start:end])
00539       start = end
00540       end += length
00541       if python3:
00542         self.action_feedback.status.text = str[start:end].decode('utf-8')
00543       else:
00544         self.action_feedback.status.text = str[start:end]
00545       start = end
00546       end += 4
00547       (self.action_feedback.feedback.current_dist,) = _struct_f.unpack(str[start:end])
00548       return self
00549     except struct.error as e:
00550       raise genpy.DeserializationError(e) #most likely buffer underfill
00551 
00552 _struct_I = genpy.struct_I
00553 _struct_3I = struct.Struct("<3I")
00554 _struct_B = struct.Struct("<B")
00555 _struct_2I = struct.Struct("<2I")
00556 _struct_f = struct.Struct("<f")
00557 _struct_B3I = struct.Struct("<B3I")


iri_nav_msgs
Author(s):
autogenerated on Fri Dec 6 2013 21:01:36