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


simple_move_base
Author(s): haidai
autogenerated on Wed Nov 27 2013 12:26:25