_StepTarget.py
Go to the documentation of this file.
00001 """autogenerated by genpy from humanoid_nav_msgs/StepTarget.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 
00009 class StepTarget(genpy.Message):
00010   _md5sum = "8ccf34ddb67039fbda0d9b2515ebb1ea"
00011   _type = "humanoid_nav_msgs/StepTarget"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# Target for a single stepping motion of a humanoid's leg
00014 
00015 geometry_msgs/Pose2D pose   # step pose as relative offset to last leg
00016 uint8 leg                   # which leg to use (left/right, see below)
00017 
00018 uint8 right=0               # right leg constant
00019 uint8 left=1                # left leg constant
00020 
00021 ================================================================================
00022 MSG: geometry_msgs/Pose2D
00023 # This expresses a position and orientation on a 2D manifold.
00024 
00025 float64 x
00026 float64 y
00027 float64 theta
00028 """
00029   # Pseudo-constants
00030   right = 0
00031   left = 1
00032 
00033   __slots__ = ['pose','leg']
00034   _slot_types = ['geometry_msgs/Pose2D','uint8']
00035 
00036   def __init__(self, *args, **kwds):
00037     """
00038     Constructor. Any message fields that are implicitly/explicitly
00039     set to None will be assigned a default value. The recommend
00040     use is keyword arguments as this is more robust to future message
00041     changes.  You cannot mix in-order arguments and keyword arguments.
00042 
00043     The available fields are:
00044        pose,leg
00045 
00046     :param args: complete set of field values, in .msg order
00047     :param kwds: use keyword arguments corresponding to message field names
00048     to set specific fields.
00049     """
00050     if args or kwds:
00051       super(StepTarget, self).__init__(*args, **kwds)
00052       #message fields cannot be None, assign default values for those that are
00053       if self.pose is None:
00054         self.pose = geometry_msgs.msg.Pose2D()
00055       if self.leg is None:
00056         self.leg = 0
00057     else:
00058       self.pose = geometry_msgs.msg.Pose2D()
00059       self.leg = 0
00060 
00061   def _get_types(self):
00062     """
00063     internal API method
00064     """
00065     return self._slot_types
00066 
00067   def serialize(self, buff):
00068     """
00069     serialize message into buffer
00070     :param buff: buffer, ``StringIO``
00071     """
00072     try:
00073       _x = self
00074       buff.write(_struct_3dB.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg))
00075     except struct.error as se: self._check_types(se)
00076     except TypeError as te: self._check_types(te)
00077 
00078   def deserialize(self, str):
00079     """
00080     unpack serialized message in str into this message instance
00081     :param str: byte array of serialized message, ``str``
00082     """
00083     try:
00084       if self.pose is None:
00085         self.pose = geometry_msgs.msg.Pose2D()
00086       end = 0
00087       _x = self
00088       start = end
00089       end += 25
00090       (_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg,) = _struct_3dB.unpack(str[start:end])
00091       return self
00092     except struct.error as e:
00093       raise genpy.DeserializationError(e) #most likely buffer underfill
00094 
00095 
00096   def serialize_numpy(self, buff, numpy):
00097     """
00098     serialize message with numpy array types into buffer
00099     :param buff: buffer, ``StringIO``
00100     :param numpy: numpy python module
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_3dB.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
00107 
00108   def deserialize_numpy(self, str, numpy):
00109     """
00110     unpack serialized message in str into this message instance using numpy for array types
00111     :param str: byte array of serialized message, ``str``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       if self.pose is None:
00116         self.pose = geometry_msgs.msg.Pose2D()
00117       end = 0
00118       _x = self
00119       start = end
00120       end += 25
00121       (_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg,) = _struct_3dB.unpack(str[start:end])
00122       return self
00123     except struct.error as e:
00124       raise genpy.DeserializationError(e) #most likely buffer underfill
00125 
00126 _struct_I = genpy.struct_I
00127 _struct_3dB = struct.Struct("<3dB")
 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