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