_ExecFootstepsFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from humanoid_nav_msgs/ExecFootstepsFeedback.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 humanoid_nav_msgs.msg
00009 
00010 class ExecFootstepsFeedback(genpy.Message):
00011   _md5sum = "5dfde2cb244d6c76567d3c52c40a988c"
00012   _type = "humanoid_nav_msgs/ExecFootstepsFeedback"
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 # Define a feedback message
00016 humanoid_nav_msgs/StepTarget[] executed_footsteps
00017 
00018 
00019 ================================================================================
00020 MSG: humanoid_nav_msgs/StepTarget
00021 # Target for a single stepping motion of a humanoid's leg
00022 
00023 geometry_msgs/Pose2D pose   # step pose as relative offset to last leg
00024 uint8 leg                   # which leg to use (left/right, see below)
00025 
00026 uint8 right=0               # right leg constant
00027 uint8 left=1                # left leg constant
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Pose2D
00031 # This expresses a position and orientation on a 2D manifold.
00032 
00033 float64 x
00034 float64 y
00035 float64 theta
00036 """
00037   __slots__ = ['executed_footsteps']
00038   _slot_types = ['humanoid_nav_msgs/StepTarget[]']
00039 
00040   def __init__(self, *args, **kwds):
00041     """
00042     Constructor. Any message fields that are implicitly/explicitly
00043     set to None will be assigned a default value. The recommend
00044     use is keyword arguments as this is more robust to future message
00045     changes.  You cannot mix in-order arguments and keyword arguments.
00046 
00047     The available fields are:
00048        executed_footsteps
00049 
00050     :param args: complete set of field values, in .msg order
00051     :param kwds: use keyword arguments corresponding to message field names
00052     to set specific fields.
00053     """
00054     if args or kwds:
00055       super(ExecFootstepsFeedback, self).__init__(*args, **kwds)
00056       #message fields cannot be None, assign default values for those that are
00057       if self.executed_footsteps is None:
00058         self.executed_footsteps = []
00059     else:
00060       self.executed_footsteps = []
00061 
00062   def _get_types(self):
00063     """
00064     internal API method
00065     """
00066     return self._slot_types
00067 
00068   def serialize(self, buff):
00069     """
00070     serialize message into buffer
00071     :param buff: buffer, ``StringIO``
00072     """
00073     try:
00074       length = len(self.executed_footsteps)
00075       buff.write(_struct_I.pack(length))
00076       for val1 in self.executed_footsteps:
00077         _v1 = val1.pose
00078         _x = _v1
00079         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00080         buff.write(_struct_B.pack(val1.leg))
00081     except struct.error as se: self._check_types(se)
00082     except TypeError as te: self._check_types(te)
00083 
00084   def deserialize(self, str):
00085     """
00086     unpack serialized message in str into this message instance
00087     :param str: byte array of serialized message, ``str``
00088     """
00089     try:
00090       if self.executed_footsteps is None:
00091         self.executed_footsteps = None
00092       end = 0
00093       start = end
00094       end += 4
00095       (length,) = _struct_I.unpack(str[start:end])
00096       self.executed_footsteps = []
00097       for i in range(0, length):
00098         val1 = humanoid_nav_msgs.msg.StepTarget()
00099         _v2 = val1.pose
00100         _x = _v2
00101         start = end
00102         end += 24
00103         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00104         start = end
00105         end += 1
00106         (val1.leg,) = _struct_B.unpack(str[start:end])
00107         self.executed_footsteps.append(val1)
00108       return self
00109     except struct.error as e:
00110       raise genpy.DeserializationError(e) #most likely buffer underfill
00111 
00112 
00113   def serialize_numpy(self, buff, numpy):
00114     """
00115     serialize message with numpy array types into buffer
00116     :param buff: buffer, ``StringIO``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       length = len(self.executed_footsteps)
00121       buff.write(_struct_I.pack(length))
00122       for val1 in self.executed_footsteps:
00123         _v3 = val1.pose
00124         _x = _v3
00125         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00126         buff.write(_struct_B.pack(val1.leg))
00127     except struct.error as se: self._check_types(se)
00128     except TypeError as te: self._check_types(te)
00129 
00130   def deserialize_numpy(self, str, numpy):
00131     """
00132     unpack serialized message in str into this message instance using numpy for array types
00133     :param str: byte array of serialized message, ``str``
00134     :param numpy: numpy python module
00135     """
00136     try:
00137       if self.executed_footsteps is None:
00138         self.executed_footsteps = None
00139       end = 0
00140       start = end
00141       end += 4
00142       (length,) = _struct_I.unpack(str[start:end])
00143       self.executed_footsteps = []
00144       for i in range(0, length):
00145         val1 = humanoid_nav_msgs.msg.StepTarget()
00146         _v4 = val1.pose
00147         _x = _v4
00148         start = end
00149         end += 24
00150         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00151         start = end
00152         end += 1
00153         (val1.leg,) = _struct_B.unpack(str[start:end])
00154         self.executed_footsteps.append(val1)
00155       return self
00156     except struct.error as e:
00157       raise genpy.DeserializationError(e) #most likely buffer underfill
00158 
00159 _struct_I = genpy.struct_I
00160 _struct_B = struct.Struct("<B")
00161 _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