_ExecFootstepsActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from humanoid_nav_msgs/ExecFootstepsActionResult.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 geometry_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import humanoid_nav_msgs.msg
00011 import std_msgs.msg
00012 
00013 class ExecFootstepsActionResult(genpy.Message):
00014   _md5sum = "66fa71246c6848e28e972f9031bbbddc"
00015   _type = "humanoid_nav_msgs/ExecFootstepsActionResult"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalStatus status
00021 ExecFootstepsResult result
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalStatus
00043 GoalID goal_id
00044 uint8 status
00045 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00046 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00047 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00048                             #   and has since completed its execution (Terminal State)
00049 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00050 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00051                             #    to some failure (Terminal State)
00052 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00053                             #    because the goal was unattainable or invalid (Terminal State)
00054 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00055                             #    and has not yet completed execution
00056 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00057                             #    but the action server has not yet confirmed that the goal is canceled
00058 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00059                             #    and was successfully cancelled (Terminal State)
00060 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00061                             #    sent over the wire by an action server
00062 
00063 #Allow for the user to associate a string with GoalStatus for debugging
00064 string text
00065 
00066 
00067 ================================================================================
00068 MSG: actionlib_msgs/GoalID
00069 # The stamp should store the time at which this goal was requested.
00070 # It is used by an action server when it tries to preempt all
00071 # goals that were requested before a certain time
00072 time stamp
00073 
00074 # The id provides a way to associate feedback and
00075 # result message with specific goal requests. The id
00076 # specified must be unique.
00077 string id
00078 
00079 
00080 ================================================================================
00081 MSG: humanoid_nav_msgs/ExecFootstepsResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 # Define the result
00084 humanoid_nav_msgs/StepTarget[] executed_footsteps
00085 
00086 ================================================================================
00087 MSG: humanoid_nav_msgs/StepTarget
00088 # Target for a single stepping motion of a humanoid's leg
00089 
00090 geometry_msgs/Pose2D pose   # step pose as relative offset to last leg
00091 uint8 leg                   # which leg to use (left/right, see below)
00092 
00093 uint8 right=0               # right leg constant
00094 uint8 left=1                # left leg constant
00095 
00096 ================================================================================
00097 MSG: geometry_msgs/Pose2D
00098 # This expresses a position and orientation on a 2D manifold.
00099 
00100 float64 x
00101 float64 y
00102 float64 theta
00103 """
00104   __slots__ = ['header','status','result']
00105   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','humanoid_nav_msgs/ExecFootstepsResult']
00106 
00107   def __init__(self, *args, **kwds):
00108     """
00109     Constructor. Any message fields that are implicitly/explicitly
00110     set to None will be assigned a default value. The recommend
00111     use is keyword arguments as this is more robust to future message
00112     changes.  You cannot mix in-order arguments and keyword arguments.
00113 
00114     The available fields are:
00115        header,status,result
00116 
00117     :param args: complete set of field values, in .msg order
00118     :param kwds: use keyword arguments corresponding to message field names
00119     to set specific fields.
00120     """
00121     if args or kwds:
00122       super(ExecFootstepsActionResult, self).__init__(*args, **kwds)
00123       #message fields cannot be None, assign default values for those that are
00124       if self.header is None:
00125         self.header = std_msgs.msg.Header()
00126       if self.status is None:
00127         self.status = actionlib_msgs.msg.GoalStatus()
00128       if self.result is None:
00129         self.result = humanoid_nav_msgs.msg.ExecFootstepsResult()
00130     else:
00131       self.header = std_msgs.msg.Header()
00132       self.status = actionlib_msgs.msg.GoalStatus()
00133       self.result = humanoid_nav_msgs.msg.ExecFootstepsResult()
00134 
00135   def _get_types(self):
00136     """
00137     internal API method
00138     """
00139     return self._slot_types
00140 
00141   def serialize(self, buff):
00142     """
00143     serialize message into buffer
00144     :param buff: buffer, ``StringIO``
00145     """
00146     try:
00147       _x = self
00148       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00149       _x = self.header.frame_id
00150       length = len(_x)
00151       if python3 or type(_x) == unicode:
00152         _x = _x.encode('utf-8')
00153         length = len(_x)
00154       buff.write(struct.pack('<I%ss'%length, length, _x))
00155       _x = self
00156       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00157       _x = self.status.goal_id.id
00158       length = len(_x)
00159       if python3 or type(_x) == unicode:
00160         _x = _x.encode('utf-8')
00161         length = len(_x)
00162       buff.write(struct.pack('<I%ss'%length, length, _x))
00163       buff.write(_struct_B.pack(self.status.status))
00164       _x = self.status.text
00165       length = len(_x)
00166       if python3 or type(_x) == unicode:
00167         _x = _x.encode('utf-8')
00168         length = len(_x)
00169       buff.write(struct.pack('<I%ss'%length, length, _x))
00170       length = len(self.result.executed_footsteps)
00171       buff.write(_struct_I.pack(length))
00172       for val1 in self.result.executed_footsteps:
00173         _v1 = val1.pose
00174         _x = _v1
00175         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00176         buff.write(_struct_B.pack(val1.leg))
00177     except struct.error as se: self._check_types(se)
00178     except TypeError as te: self._check_types(te)
00179 
00180   def deserialize(self, str):
00181     """
00182     unpack serialized message in str into this message instance
00183     :param str: byte array of serialized message, ``str``
00184     """
00185     try:
00186       if self.header is None:
00187         self.header = std_msgs.msg.Header()
00188       if self.status is None:
00189         self.status = actionlib_msgs.msg.GoalStatus()
00190       if self.result is None:
00191         self.result = humanoid_nav_msgs.msg.ExecFootstepsResult()
00192       end = 0
00193       _x = self
00194       start = end
00195       end += 12
00196       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00197       start = end
00198       end += 4
00199       (length,) = _struct_I.unpack(str[start:end])
00200       start = end
00201       end += length
00202       if python3:
00203         self.header.frame_id = str[start:end].decode('utf-8')
00204       else:
00205         self.header.frame_id = str[start:end]
00206       _x = self
00207       start = end
00208       end += 8
00209       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       start = end
00214       end += length
00215       if python3:
00216         self.status.goal_id.id = str[start:end].decode('utf-8')
00217       else:
00218         self.status.goal_id.id = str[start:end]
00219       start = end
00220       end += 1
00221       (self.status.status,) = _struct_B.unpack(str[start:end])
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       start = end
00226       end += length
00227       if python3:
00228         self.status.text = str[start:end].decode('utf-8')
00229       else:
00230         self.status.text = str[start:end]
00231       start = end
00232       end += 4
00233       (length,) = _struct_I.unpack(str[start:end])
00234       self.result.executed_footsteps = []
00235       for i in range(0, length):
00236         val1 = humanoid_nav_msgs.msg.StepTarget()
00237         _v2 = val1.pose
00238         _x = _v2
00239         start = end
00240         end += 24
00241         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00242         start = end
00243         end += 1
00244         (val1.leg,) = _struct_B.unpack(str[start:end])
00245         self.result.executed_footsteps.append(val1)
00246       return self
00247     except struct.error as e:
00248       raise genpy.DeserializationError(e) #most likely buffer underfill
00249 
00250 
00251   def serialize_numpy(self, buff, numpy):
00252     """
00253     serialize message with numpy array types into buffer
00254     :param buff: buffer, ``StringIO``
00255     :param numpy: numpy python module
00256     """
00257     try:
00258       _x = self
00259       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00260       _x = self.header.frame_id
00261       length = len(_x)
00262       if python3 or type(_x) == unicode:
00263         _x = _x.encode('utf-8')
00264         length = len(_x)
00265       buff.write(struct.pack('<I%ss'%length, length, _x))
00266       _x = self
00267       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00268       _x = self.status.goal_id.id
00269       length = len(_x)
00270       if python3 or type(_x) == unicode:
00271         _x = _x.encode('utf-8')
00272         length = len(_x)
00273       buff.write(struct.pack('<I%ss'%length, length, _x))
00274       buff.write(_struct_B.pack(self.status.status))
00275       _x = self.status.text
00276       length = len(_x)
00277       if python3 or type(_x) == unicode:
00278         _x = _x.encode('utf-8')
00279         length = len(_x)
00280       buff.write(struct.pack('<I%ss'%length, length, _x))
00281       length = len(self.result.executed_footsteps)
00282       buff.write(_struct_I.pack(length))
00283       for val1 in self.result.executed_footsteps:
00284         _v3 = val1.pose
00285         _x = _v3
00286         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00287         buff.write(_struct_B.pack(val1.leg))
00288     except struct.error as se: self._check_types(se)
00289     except TypeError as te: self._check_types(te)
00290 
00291   def deserialize_numpy(self, str, numpy):
00292     """
00293     unpack serialized message in str into this message instance using numpy for array types
00294     :param str: byte array of serialized message, ``str``
00295     :param numpy: numpy python module
00296     """
00297     try:
00298       if self.header is None:
00299         self.header = std_msgs.msg.Header()
00300       if self.status is None:
00301         self.status = actionlib_msgs.msg.GoalStatus()
00302       if self.result is None:
00303         self.result = humanoid_nav_msgs.msg.ExecFootstepsResult()
00304       end = 0
00305       _x = self
00306       start = end
00307       end += 12
00308       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00309       start = end
00310       end += 4
00311       (length,) = _struct_I.unpack(str[start:end])
00312       start = end
00313       end += length
00314       if python3:
00315         self.header.frame_id = str[start:end].decode('utf-8')
00316       else:
00317         self.header.frame_id = str[start:end]
00318       _x = self
00319       start = end
00320       end += 8
00321       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       start = end
00326       end += length
00327       if python3:
00328         self.status.goal_id.id = str[start:end].decode('utf-8')
00329       else:
00330         self.status.goal_id.id = str[start:end]
00331       start = end
00332       end += 1
00333       (self.status.status,) = _struct_B.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.status.text = str[start:end].decode('utf-8')
00341       else:
00342         self.status.text = str[start:end]
00343       start = end
00344       end += 4
00345       (length,) = _struct_I.unpack(str[start:end])
00346       self.result.executed_footsteps = []
00347       for i in range(0, length):
00348         val1 = humanoid_nav_msgs.msg.StepTarget()
00349         _v4 = val1.pose
00350         _x = _v4
00351         start = end
00352         end += 24
00353         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00354         start = end
00355         end += 1
00356         (val1.leg,) = _struct_B.unpack(str[start:end])
00357         self.result.executed_footsteps.append(val1)
00358       return self
00359     except struct.error as e:
00360       raise genpy.DeserializationError(e) #most likely buffer underfill
00361 
00362 _struct_I = genpy.struct_I
00363 _struct_3I = struct.Struct("<3I")
00364 _struct_B = struct.Struct("<B")
00365 _struct_2I = struct.Struct("<2I")
00366 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


humanoid_nav_msgs
Author(s): Armin Hornung
autogenerated on Tue Oct 15 2013 10:05:54