_StepTarget3D.py
Go to the documentation of this file.
00001 """autogenerated by genpy from bipedRobin_msgs/StepTarget3D.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 StepTarget3D(genpy.Message):
00010   _md5sum = "5f79e84756785e1c60a84156e3906aa0"
00011   _type = "bipedRobin_msgs/StepTarget3D"
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/Pose pose   # step pose absolute
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/Pose
00023 # A representation of pose in free space, composed of postion and orientation. 
00024 Point position
00025 Quaternion orientation
00026 
00027 ================================================================================
00028 MSG: geometry_msgs/Point
00029 # This contains the position of a point in free space
00030 float64 x
00031 float64 y
00032 float64 z
00033 
00034 ================================================================================
00035 MSG: geometry_msgs/Quaternion
00036 # This represents an orientation in free space in quaternion form.
00037 
00038 float64 x
00039 float64 y
00040 float64 z
00041 float64 w
00042 
00043 """
00044   # Pseudo-constants
00045   right = 0
00046   left = 1
00047 
00048   __slots__ = ['pose','leg']
00049   _slot_types = ['geometry_msgs/Pose','uint8']
00050 
00051   def __init__(self, *args, **kwds):
00052     """
00053     Constructor. Any message fields that are implicitly/explicitly
00054     set to None will be assigned a default value. The recommend
00055     use is keyword arguments as this is more robust to future message
00056     changes.  You cannot mix in-order arguments and keyword arguments.
00057 
00058     The available fields are:
00059        pose,leg
00060 
00061     :param args: complete set of field values, in .msg order
00062     :param kwds: use keyword arguments corresponding to message field names
00063     to set specific fields.
00064     """
00065     if args or kwds:
00066       super(StepTarget3D, self).__init__(*args, **kwds)
00067       #message fields cannot be None, assign default values for those that are
00068       if self.pose is None:
00069         self.pose = geometry_msgs.msg.Pose()
00070       if self.leg is None:
00071         self.leg = 0
00072     else:
00073       self.pose = geometry_msgs.msg.Pose()
00074       self.leg = 0
00075 
00076   def _get_types(self):
00077     """
00078     internal API method
00079     """
00080     return self._slot_types
00081 
00082   def serialize(self, buff):
00083     """
00084     serialize message into buffer
00085     :param buff: buffer, ``StringIO``
00086     """
00087     try:
00088       _x = self
00089       buff.write(_struct_7dB.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.leg))
00090     except struct.error as se: self._check_types(se)
00091     except TypeError as te: self._check_types(te)
00092 
00093   def deserialize(self, str):
00094     """
00095     unpack serialized message in str into this message instance
00096     :param str: byte array of serialized message, ``str``
00097     """
00098     try:
00099       if self.pose is None:
00100         self.pose = geometry_msgs.msg.Pose()
00101       end = 0
00102       _x = self
00103       start = end
00104       end += 57
00105       (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.leg,) = _struct_7dB.unpack(str[start:end])
00106       return self
00107     except struct.error as e:
00108       raise genpy.DeserializationError(e) #most likely buffer underfill
00109 
00110 
00111   def serialize_numpy(self, buff, numpy):
00112     """
00113     serialize message with numpy array types into buffer
00114     :param buff: buffer, ``StringIO``
00115     :param numpy: numpy python module
00116     """
00117     try:
00118       _x = self
00119       buff.write(_struct_7dB.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.leg))
00120     except struct.error as se: self._check_types(se)
00121     except TypeError as te: self._check_types(te)
00122 
00123   def deserialize_numpy(self, str, numpy):
00124     """
00125     unpack serialized message in str into this message instance using numpy for array types
00126     :param str: byte array of serialized message, ``str``
00127     :param numpy: numpy python module
00128     """
00129     try:
00130       if self.pose is None:
00131         self.pose = geometry_msgs.msg.Pose()
00132       end = 0
00133       _x = self
00134       start = end
00135       end += 57
00136       (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.leg,) = _struct_7dB.unpack(str[start:end])
00137       return self
00138     except struct.error as e:
00139       raise genpy.DeserializationError(e) #most likely buffer underfill
00140 
00141 _struct_I = genpy.struct_I
00142 _struct_7dB = struct.Struct("<7dB")


bipedRobin_msgs
Author(s): Studentenaccount
autogenerated on Fri Nov 15 2013 11:10:20