$search
00001 """autogenerated by genmsg_py from footsens_state_message.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 00007 class footsens_state_message(roslib.message.Message): 00008 _md5sum = "637cc52f29ad57805d41857293269bf3" 00009 _type = "tulip_gazebo/footsens_state_message" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """time time 00012 float64 left_heel_inner 00013 float64 left_heel_outer 00014 float64 left_toe_inner 00015 float64 left_toe_outer 00016 float64 right_heel_inner 00017 float64 right_heel_outer 00018 float64 right_toe_inner 00019 float64 right_toe_outer 00020 00021 """ 00022 __slots__ = ['time','left_heel_inner','left_heel_outer','left_toe_inner','left_toe_outer','right_heel_inner','right_heel_outer','right_toe_inner','right_toe_outer'] 00023 _slot_types = ['time','float64','float64','float64','float64','float64','float64','float64','float64'] 00024 00025 def __init__(self, *args, **kwds): 00026 """ 00027 Constructor. Any message fields that are implicitly/explicitly 00028 set to None will be assigned a default value. The recommend 00029 use is keyword arguments as this is more robust to future message 00030 changes. You cannot mix in-order arguments and keyword arguments. 00031 00032 The available fields are: 00033 time,left_heel_inner,left_heel_outer,left_toe_inner,left_toe_outer,right_heel_inner,right_heel_outer,right_toe_inner,right_toe_outer 00034 00035 @param args: complete set of field values, in .msg order 00036 @param kwds: use keyword arguments corresponding to message field names 00037 to set specific fields. 00038 """ 00039 if args or kwds: 00040 super(footsens_state_message, self).__init__(*args, **kwds) 00041 #message fields cannot be None, assign default values for those that are 00042 if self.time is None: 00043 self.time = roslib.rostime.Time() 00044 if self.left_heel_inner is None: 00045 self.left_heel_inner = 0. 00046 if self.left_heel_outer is None: 00047 self.left_heel_outer = 0. 00048 if self.left_toe_inner is None: 00049 self.left_toe_inner = 0. 00050 if self.left_toe_outer is None: 00051 self.left_toe_outer = 0. 00052 if self.right_heel_inner is None: 00053 self.right_heel_inner = 0. 00054 if self.right_heel_outer is None: 00055 self.right_heel_outer = 0. 00056 if self.right_toe_inner is None: 00057 self.right_toe_inner = 0. 00058 if self.right_toe_outer is None: 00059 self.right_toe_outer = 0. 00060 else: 00061 self.time = roslib.rostime.Time() 00062 self.left_heel_inner = 0. 00063 self.left_heel_outer = 0. 00064 self.left_toe_inner = 0. 00065 self.left_toe_outer = 0. 00066 self.right_heel_inner = 0. 00067 self.right_heel_outer = 0. 00068 self.right_toe_inner = 0. 00069 self.right_toe_outer = 0. 00070 00071 def _get_types(self): 00072 """ 00073 internal API method 00074 """ 00075 return self._slot_types 00076 00077 def serialize(self, buff): 00078 """ 00079 serialize message into buffer 00080 @param buff: buffer 00081 @type buff: StringIO 00082 """ 00083 try: 00084 _x = self 00085 buff.write(_struct_2I8d.pack(_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer)) 00086 except struct.error as se: self._check_types(se) 00087 except TypeError as te: self._check_types(te) 00088 00089 def deserialize(self, str): 00090 """ 00091 unpack serialized message in str into this message instance 00092 @param str: byte array of serialized message 00093 @type str: str 00094 """ 00095 try: 00096 if self.time is None: 00097 self.time = roslib.rostime.Time() 00098 end = 0 00099 _x = self 00100 start = end 00101 end += 72 00102 (_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer,) = _struct_2I8d.unpack(str[start:end]) 00103 self.time.canon() 00104 return self 00105 except struct.error as e: 00106 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00107 00108 00109 def serialize_numpy(self, buff, numpy): 00110 """ 00111 serialize message with numpy array types into buffer 00112 @param buff: buffer 00113 @type buff: StringIO 00114 @param numpy: numpy python module 00115 @type numpy module 00116 """ 00117 try: 00118 _x = self 00119 buff.write(_struct_2I8d.pack(_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer)) 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 00127 @type str: str 00128 @param numpy: numpy python module 00129 @type numpy: module 00130 """ 00131 try: 00132 if self.time is None: 00133 self.time = roslib.rostime.Time() 00134 end = 0 00135 _x = self 00136 start = end 00137 end += 72 00138 (_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer,) = _struct_2I8d.unpack(str[start:end]) 00139 self.time.canon() 00140 return self 00141 except struct.error as e: 00142 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00143 00144 _struct_I = roslib.message.struct_I 00145 _struct_2I8d = struct.Struct("<2I8d")