$search
00001 """autogenerated by genmsg_py from SetPidGainsRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class SetPidGainsRequest(roslib.message.Message): 00007 _md5sum = "f9c5176e998bba30344c4892f975be3a" 00008 _type = "sr_robot_msgs/SetPidGainsRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """float64 p 00011 float64 i 00012 float64 d 00013 float64 i_clamp 00014 float64 max_force 00015 float64 deadband 00016 int32 friction_deadband 00017 00018 """ 00019 __slots__ = ['p','i','d','i_clamp','max_force','deadband','friction_deadband'] 00020 _slot_types = ['float64','float64','float64','float64','float64','float64','int32'] 00021 00022 def __init__(self, *args, **kwds): 00023 """ 00024 Constructor. Any message fields that are implicitly/explicitly 00025 set to None will be assigned a default value. The recommend 00026 use is keyword arguments as this is more robust to future message 00027 changes. You cannot mix in-order arguments and keyword arguments. 00028 00029 The available fields are: 00030 p,i,d,i_clamp,max_force,deadband,friction_deadband 00031 00032 @param args: complete set of field values, in .msg order 00033 @param kwds: use keyword arguments corresponding to message field names 00034 to set specific fields. 00035 """ 00036 if args or kwds: 00037 super(SetPidGainsRequest, self).__init__(*args, **kwds) 00038 #message fields cannot be None, assign default values for those that are 00039 if self.p is None: 00040 self.p = 0. 00041 if self.i is None: 00042 self.i = 0. 00043 if self.d is None: 00044 self.d = 0. 00045 if self.i_clamp is None: 00046 self.i_clamp = 0. 00047 if self.max_force is None: 00048 self.max_force = 0. 00049 if self.deadband is None: 00050 self.deadband = 0. 00051 if self.friction_deadband is None: 00052 self.friction_deadband = 0 00053 else: 00054 self.p = 0. 00055 self.i = 0. 00056 self.d = 0. 00057 self.i_clamp = 0. 00058 self.max_force = 0. 00059 self.deadband = 0. 00060 self.friction_deadband = 0 00061 00062 def _get_types(self): 00063 """ 00064 internal API method 00065 """ 00066 return self._slot_types 00067 00068 def serialize(self, buff): 00069 """ 00070 serialize message into buffer 00071 @param buff: buffer 00072 @type buff: StringIO 00073 """ 00074 try: 00075 _x = self 00076 buff.write(_struct_6di.pack(_x.p, _x.i, _x.d, _x.i_clamp, _x.max_force, _x.deadband, _x.friction_deadband)) 00077 except struct.error as se: self._check_types(se) 00078 except TypeError as te: self._check_types(te) 00079 00080 def deserialize(self, str): 00081 """ 00082 unpack serialized message in str into this message instance 00083 @param str: byte array of serialized message 00084 @type str: str 00085 """ 00086 try: 00087 end = 0 00088 _x = self 00089 start = end 00090 end += 52 00091 (_x.p, _x.i, _x.d, _x.i_clamp, _x.max_force, _x.deadband, _x.friction_deadband,) = _struct_6di.unpack(str[start:end]) 00092 return self 00093 except struct.error as e: 00094 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00095 00096 00097 def serialize_numpy(self, buff, numpy): 00098 """ 00099 serialize message with numpy array types into buffer 00100 @param buff: buffer 00101 @type buff: StringIO 00102 @param numpy: numpy python module 00103 @type numpy module 00104 """ 00105 try: 00106 _x = self 00107 buff.write(_struct_6di.pack(_x.p, _x.i, _x.d, _x.i_clamp, _x.max_force, _x.deadband, _x.friction_deadband)) 00108 except struct.error as se: self._check_types(se) 00109 except TypeError as te: self._check_types(te) 00110 00111 def deserialize_numpy(self, str, numpy): 00112 """ 00113 unpack serialized message in str into this message instance using numpy for array types 00114 @param str: byte array of serialized message 00115 @type str: str 00116 @param numpy: numpy python module 00117 @type numpy: module 00118 """ 00119 try: 00120 end = 0 00121 _x = self 00122 start = end 00123 end += 52 00124 (_x.p, _x.i, _x.d, _x.i_clamp, _x.max_force, _x.deadband, _x.friction_deadband,) = _struct_6di.unpack(str[start:end]) 00125 return self 00126 except struct.error as e: 00127 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00128 00129 _struct_I = roslib.message.struct_I 00130 _struct_6di = struct.Struct("<6di") 00131 """autogenerated by genmsg_py from SetPidGainsResponse.msg. Do not edit.""" 00132 import roslib.message 00133 import struct 00134 00135 00136 class SetPidGainsResponse(roslib.message.Message): 00137 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00138 _type = "sr_robot_msgs/SetPidGainsResponse" 00139 _has_header = False #flag to mark the presence of a Header object 00140 _full_text = """ 00141 00142 """ 00143 __slots__ = [] 00144 _slot_types = [] 00145 00146 def __init__(self, *args, **kwds): 00147 """ 00148 Constructor. Any message fields that are implicitly/explicitly 00149 set to None will be assigned a default value. The recommend 00150 use is keyword arguments as this is more robust to future message 00151 changes. You cannot mix in-order arguments and keyword arguments. 00152 00153 The available fields are: 00154 00155 00156 @param args: complete set of field values, in .msg order 00157 @param kwds: use keyword arguments corresponding to message field names 00158 to set specific fields. 00159 """ 00160 if args or kwds: 00161 super(SetPidGainsResponse, self).__init__(*args, **kwds) 00162 00163 def _get_types(self): 00164 """ 00165 internal API method 00166 """ 00167 return self._slot_types 00168 00169 def serialize(self, buff): 00170 """ 00171 serialize message into buffer 00172 @param buff: buffer 00173 @type buff: StringIO 00174 """ 00175 try: 00176 pass 00177 except struct.error as se: self._check_types(se) 00178 except TypeError as te: self._check_types(te) 00179 00180 def deserialize(self, str): 00181 """ 00182 unpack serialized message in str into this message instance 00183 @param str: byte array of serialized message 00184 @type str: str 00185 """ 00186 try: 00187 end = 0 00188 return self 00189 except struct.error as e: 00190 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00191 00192 00193 def serialize_numpy(self, buff, numpy): 00194 """ 00195 serialize message with numpy array types into buffer 00196 @param buff: buffer 00197 @type buff: StringIO 00198 @param numpy: numpy python module 00199 @type numpy module 00200 """ 00201 try: 00202 pass 00203 except struct.error as se: self._check_types(se) 00204 except TypeError as te: self._check_types(te) 00205 00206 def deserialize_numpy(self, str, numpy): 00207 """ 00208 unpack serialized message in str into this message instance using numpy for array types 00209 @param str: byte array of serialized message 00210 @type str: str 00211 @param numpy: numpy python module 00212 @type numpy: module 00213 """ 00214 try: 00215 end = 0 00216 return self 00217 except struct.error as e: 00218 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00219 00220 _struct_I = roslib.message.struct_I 00221 class SetPidGains(roslib.message.ServiceDefinition): 00222 _type = 'sr_robot_msgs/SetPidGains' 00223 _md5sum = 'f9c5176e998bba30344c4892f975be3a' 00224 _request_class = SetPidGainsRequest 00225 _response_class = SetPidGainsResponse