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