_ExecFootstepsGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from humanoid_nav_msgs/ExecFootstepsGoal.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 ExecFootstepsGoal(genpy.Message):
00011   _md5sum = "40a3f8092ef3bb49c3253baa6eb94932"
00012   _type = "humanoid_nav_msgs/ExecFootstepsGoal"
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 the goal
00016 humanoid_nav_msgs/StepTarget[] footsteps
00017 float64 feedback_frequency
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__ = ['footsteps','feedback_frequency']
00038   _slot_types = ['humanoid_nav_msgs/StepTarget[]','float64']
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        footsteps,feedback_frequency
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(ExecFootstepsGoal, self).__init__(*args, **kwds)
00056       #message fields cannot be None, assign default values for those that are
00057       if self.footsteps is None:
00058         self.footsteps = []
00059       if self.feedback_frequency is None:
00060         self.feedback_frequency = 0.
00061     else:
00062       self.footsteps = []
00063       self.feedback_frequency = 0.
00064 
00065   def _get_types(self):
00066     """
00067     internal API method
00068     """
00069     return self._slot_types
00070 
00071   def serialize(self, buff):
00072     """
00073     serialize message into buffer
00074     :param buff: buffer, ``StringIO``
00075     """
00076     try:
00077       length = len(self.footsteps)
00078       buff.write(_struct_I.pack(length))
00079       for val1 in self.footsteps:
00080         _v1 = val1.pose
00081         _x = _v1
00082         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00083         buff.write(_struct_B.pack(val1.leg))
00084       buff.write(_struct_d.pack(self.feedback_frequency))
00085     except struct.error as se: self._check_types(se)
00086     except TypeError as te: self._check_types(te)
00087 
00088   def deserialize(self, str):
00089     """
00090     unpack serialized message in str into this message instance
00091     :param str: byte array of serialized message, ``str``
00092     """
00093     try:
00094       if self.footsteps is None:
00095         self.footsteps = None
00096       end = 0
00097       start = end
00098       end += 4
00099       (length,) = _struct_I.unpack(str[start:end])
00100       self.footsteps = []
00101       for i in range(0, length):
00102         val1 = humanoid_nav_msgs.msg.StepTarget()
00103         _v2 = val1.pose
00104         _x = _v2
00105         start = end
00106         end += 24
00107         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00108         start = end
00109         end += 1
00110         (val1.leg,) = _struct_B.unpack(str[start:end])
00111         self.footsteps.append(val1)
00112       start = end
00113       end += 8
00114       (self.feedback_frequency,) = _struct_d.unpack(str[start:end])
00115       return self
00116     except struct.error as e:
00117       raise genpy.DeserializationError(e) #most likely buffer underfill
00118 
00119 
00120   def serialize_numpy(self, buff, numpy):
00121     """
00122     serialize message with numpy array types into buffer
00123     :param buff: buffer, ``StringIO``
00124     :param numpy: numpy python module
00125     """
00126     try:
00127       length = len(self.footsteps)
00128       buff.write(_struct_I.pack(length))
00129       for val1 in self.footsteps:
00130         _v3 = val1.pose
00131         _x = _v3
00132         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00133         buff.write(_struct_B.pack(val1.leg))
00134       buff.write(_struct_d.pack(self.feedback_frequency))
00135     except struct.error as se: self._check_types(se)
00136     except TypeError as te: self._check_types(te)
00137 
00138   def deserialize_numpy(self, str, numpy):
00139     """
00140     unpack serialized message in str into this message instance using numpy for array types
00141     :param str: byte array of serialized message, ``str``
00142     :param numpy: numpy python module
00143     """
00144     try:
00145       if self.footsteps is None:
00146         self.footsteps = None
00147       end = 0
00148       start = end
00149       end += 4
00150       (length,) = _struct_I.unpack(str[start:end])
00151       self.footsteps = []
00152       for i in range(0, length):
00153         val1 = humanoid_nav_msgs.msg.StepTarget()
00154         _v4 = val1.pose
00155         _x = _v4
00156         start = end
00157         end += 24
00158         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00159         start = end
00160         end += 1
00161         (val1.leg,) = _struct_B.unpack(str[start:end])
00162         self.footsteps.append(val1)
00163       start = end
00164       end += 8
00165       (self.feedback_frequency,) = _struct_d.unpack(str[start:end])
00166       return self
00167     except struct.error as e:
00168       raise genpy.DeserializationError(e) #most likely buffer underfill
00169 
00170 _struct_I = genpy.struct_I
00171 _struct_B = struct.Struct("<B")
00172 _struct_d = struct.Struct("<d")
00173 _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