00001 """autogenerated by genpy from halfsteps_pattern_generator/Footprint.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 walk_msgs.msg
00008 import genpy
00009
00010 class Footprint(genpy.Message):
00011 _md5sum = "c0e358fe89a17f434cfecaf36056143a"
00012 _type = "halfsteps_pattern_generator/Footprint"
00013 _has_header = False
00014 _full_text = """walk_msgs/Footprint2d footprint
00015 float64 slideUp
00016 float64 slideDown
00017 float64 horizontalDistance
00018 float64 stepHeight
00019
00020 ================================================================================
00021 MSG: walk_msgs/Footprint2d
00022 time beginTime
00023 duration duration
00024 float64 x
00025 float64 y
00026 float64 theta
00027
00028 """
00029 __slots__ = ['footprint','slideUp','slideDown','horizontalDistance','stepHeight']
00030 _slot_types = ['walk_msgs/Footprint2d','float64','float64','float64','float64']
00031
00032 def __init__(self, *args, **kwds):
00033 """
00034 Constructor. Any message fields that are implicitly/explicitly
00035 set to None will be assigned a default value. The recommend
00036 use is keyword arguments as this is more robust to future message
00037 changes. You cannot mix in-order arguments and keyword arguments.
00038
00039 The available fields are:
00040 footprint,slideUp,slideDown,horizontalDistance,stepHeight
00041
00042 :param args: complete set of field values, in .msg order
00043 :param kwds: use keyword arguments corresponding to message field names
00044 to set specific fields.
00045 """
00046 if args or kwds:
00047 super(Footprint, self).__init__(*args, **kwds)
00048
00049 if self.footprint is None:
00050 self.footprint = walk_msgs.msg.Footprint2d()
00051 if self.slideUp is None:
00052 self.slideUp = 0.
00053 if self.slideDown is None:
00054 self.slideDown = 0.
00055 if self.horizontalDistance is None:
00056 self.horizontalDistance = 0.
00057 if self.stepHeight is None:
00058 self.stepHeight = 0.
00059 else:
00060 self.footprint = walk_msgs.msg.Footprint2d()
00061 self.slideUp = 0.
00062 self.slideDown = 0.
00063 self.horizontalDistance = 0.
00064 self.stepHeight = 0.
00065
00066 def _get_types(self):
00067 """
00068 internal API method
00069 """
00070 return self._slot_types
00071
00072 def serialize(self, buff):
00073 """
00074 serialize message into buffer
00075 :param buff: buffer, ``StringIO``
00076 """
00077 try:
00078 _x = self
00079 buff.write(_struct_2I2i7d.pack(_x.footprint.beginTime.secs, _x.footprint.beginTime.nsecs, _x.footprint.duration.secs, _x.footprint.duration.nsecs, _x.footprint.x, _x.footprint.y, _x.footprint.theta, _x.slideUp, _x.slideDown, _x.horizontalDistance, _x.stepHeight))
00080 except struct.error as se: self._check_types(se)
00081 except TypeError as te: self._check_types(te)
00082
00083 def deserialize(self, str):
00084 """
00085 unpack serialized message in str into this message instance
00086 :param str: byte array of serialized message, ``str``
00087 """
00088 try:
00089 if self.footprint is None:
00090 self.footprint = walk_msgs.msg.Footprint2d()
00091 end = 0
00092 _x = self
00093 start = end
00094 end += 72
00095 (_x.footprint.beginTime.secs, _x.footprint.beginTime.nsecs, _x.footprint.duration.secs, _x.footprint.duration.nsecs, _x.footprint.x, _x.footprint.y, _x.footprint.theta, _x.slideUp, _x.slideDown, _x.horizontalDistance, _x.stepHeight,) = _struct_2I2i7d.unpack(str[start:end])
00096 return self
00097 except struct.error as e:
00098 raise genpy.DeserializationError(e)
00099
00100
00101 def serialize_numpy(self, buff, numpy):
00102 """
00103 serialize message with numpy array types into buffer
00104 :param buff: buffer, ``StringIO``
00105 :param numpy: numpy python module
00106 """
00107 try:
00108 _x = self
00109 buff.write(_struct_2I2i7d.pack(_x.footprint.beginTime.secs, _x.footprint.beginTime.nsecs, _x.footprint.duration.secs, _x.footprint.duration.nsecs, _x.footprint.x, _x.footprint.y, _x.footprint.theta, _x.slideUp, _x.slideDown, _x.horizontalDistance, _x.stepHeight))
00110 except struct.error as se: self._check_types(se)
00111 except TypeError as te: self._check_types(te)
00112
00113 def deserialize_numpy(self, str, numpy):
00114 """
00115 unpack serialized message in str into this message instance using numpy for array types
00116 :param str: byte array of serialized message, ``str``
00117 :param numpy: numpy python module
00118 """
00119 try:
00120 if self.footprint is None:
00121 self.footprint = walk_msgs.msg.Footprint2d()
00122 end = 0
00123 _x = self
00124 start = end
00125 end += 72
00126 (_x.footprint.beginTime.secs, _x.footprint.beginTime.nsecs, _x.footprint.duration.secs, _x.footprint.duration.nsecs, _x.footprint.x, _x.footprint.y, _x.footprint.theta, _x.slideUp, _x.slideDown, _x.horizontalDistance, _x.stepHeight,) = _struct_2I2i7d.unpack(str[start:end])
00127 return self
00128 except struct.error as e:
00129 raise genpy.DeserializationError(e)
00130
00131 _struct_I = genpy.struct_I
00132 _struct_2I2i7d = struct.Struct("<2I2i7d")