00001 """autogenerated by genpy from sr_robot_msgs/ForceControllerRequest.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 ForceControllerRequest(genpy.Message):
00009 _md5sum = "8bb059ffa85c4df492f2694e40ee3541"
00010 _type = "sr_robot_msgs/ForceControllerRequest"
00011 _has_header = False
00012 _full_text = """int16 maxpwm
00013 int16 sgleftref
00014 int16 sgrightref
00015 int16 f
00016 int16 p
00017 int16 i
00018 int16 d
00019 int16 imax
00020 int16 deadband
00021 int16 sign
00022
00023 """
00024 __slots__ = ['maxpwm','sgleftref','sgrightref','f','p','i','d','imax','deadband','sign']
00025 _slot_types = ['int16','int16','int16','int16','int16','int16','int16','int16','int16','int16']
00026
00027 def __init__(self, *args, **kwds):
00028 """
00029 Constructor. Any message fields that are implicitly/explicitly
00030 set to None will be assigned a default value. The recommend
00031 use is keyword arguments as this is more robust to future message
00032 changes. You cannot mix in-order arguments and keyword arguments.
00033
00034 The available fields are:
00035 maxpwm,sgleftref,sgrightref,f,p,i,d,imax,deadband,sign
00036
00037 :param args: complete set of field values, in .msg order
00038 :param kwds: use keyword arguments corresponding to message field names
00039 to set specific fields.
00040 """
00041 if args or kwds:
00042 super(ForceControllerRequest, self).__init__(*args, **kwds)
00043
00044 if self.maxpwm is None:
00045 self.maxpwm = 0
00046 if self.sgleftref is None:
00047 self.sgleftref = 0
00048 if self.sgrightref is None:
00049 self.sgrightref = 0
00050 if self.f is None:
00051 self.f = 0
00052 if self.p is None:
00053 self.p = 0
00054 if self.i is None:
00055 self.i = 0
00056 if self.d is None:
00057 self.d = 0
00058 if self.imax is None:
00059 self.imax = 0
00060 if self.deadband is None:
00061 self.deadband = 0
00062 if self.sign is None:
00063 self.sign = 0
00064 else:
00065 self.maxpwm = 0
00066 self.sgleftref = 0
00067 self.sgrightref = 0
00068 self.f = 0
00069 self.p = 0
00070 self.i = 0
00071 self.d = 0
00072 self.imax = 0
00073 self.deadband = 0
00074 self.sign = 0
00075
00076 def _get_types(self):
00077 """
00078 internal API method
00079 """
00080 return self._slot_types
00081
00082 def serialize(self, buff):
00083 """
00084 serialize message into buffer
00085 :param buff: buffer, ``StringIO``
00086 """
00087 try:
00088 _x = self
00089 buff.write(_struct_10h.pack(_x.maxpwm, _x.sgleftref, _x.sgrightref, _x.f, _x.p, _x.i, _x.d, _x.imax, _x.deadband, _x.sign))
00090 except struct.error as se: self._check_types(se)
00091 except TypeError as te: self._check_types(te)
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 :param str: byte array of serialized message, ``str``
00097 """
00098 try:
00099 end = 0
00100 _x = self
00101 start = end
00102 end += 20
00103 (_x.maxpwm, _x.sgleftref, _x.sgrightref, _x.f, _x.p, _x.i, _x.d, _x.imax, _x.deadband, _x.sign,) = _struct_10h.unpack(str[start:end])
00104 return self
00105 except struct.error as e:
00106 raise genpy.DeserializationError(e)
00107
00108
00109 def serialize_numpy(self, buff, numpy):
00110 """
00111 serialize message with numpy array types into buffer
00112 :param buff: buffer, ``StringIO``
00113 :param numpy: numpy python module
00114 """
00115 try:
00116 _x = self
00117 buff.write(_struct_10h.pack(_x.maxpwm, _x.sgleftref, _x.sgrightref, _x.f, _x.p, _x.i, _x.d, _x.imax, _x.deadband, _x.sign))
00118 except struct.error as se: self._check_types(se)
00119 except TypeError as te: self._check_types(te)
00120
00121 def deserialize_numpy(self, str, numpy):
00122 """
00123 unpack serialized message in str into this message instance using numpy for array types
00124 :param str: byte array of serialized message, ``str``
00125 :param numpy: numpy python module
00126 """
00127 try:
00128 end = 0
00129 _x = self
00130 start = end
00131 end += 20
00132 (_x.maxpwm, _x.sgleftref, _x.sgrightref, _x.f, _x.p, _x.i, _x.d, _x.imax, _x.deadband, _x.sign,) = _struct_10h.unpack(str[start:end])
00133 return self
00134 except struct.error as e:
00135 raise genpy.DeserializationError(e)
00136
00137 _struct_I = genpy.struct_I
00138 _struct_10h = struct.Struct("<10h")
00139 """autogenerated by genpy from sr_robot_msgs/ForceControllerResponse.msg. Do not edit."""
00140 import sys
00141 python3 = True if sys.hexversion > 0x03000000 else False
00142 import genpy
00143 import struct
00144
00145
00146 class ForceControllerResponse(genpy.Message):
00147 _md5sum = "d3b1a74026985b10664594fe60a8c3eb"
00148 _type = "sr_robot_msgs/ForceControllerResponse"
00149 _has_header = False
00150 _full_text = """bool configured
00151
00152 """
00153 __slots__ = ['configured']
00154 _slot_types = ['bool']
00155
00156 def __init__(self, *args, **kwds):
00157 """
00158 Constructor. Any message fields that are implicitly/explicitly
00159 set to None will be assigned a default value. The recommend
00160 use is keyword arguments as this is more robust to future message
00161 changes. You cannot mix in-order arguments and keyword arguments.
00162
00163 The available fields are:
00164 configured
00165
00166 :param args: complete set of field values, in .msg order
00167 :param kwds: use keyword arguments corresponding to message field names
00168 to set specific fields.
00169 """
00170 if args or kwds:
00171 super(ForceControllerResponse, self).__init__(*args, **kwds)
00172
00173 if self.configured is None:
00174 self.configured = False
00175 else:
00176 self.configured = False
00177
00178 def _get_types(self):
00179 """
00180 internal API method
00181 """
00182 return self._slot_types
00183
00184 def serialize(self, buff):
00185 """
00186 serialize message into buffer
00187 :param buff: buffer, ``StringIO``
00188 """
00189 try:
00190 buff.write(_struct_B.pack(self.configured))
00191 except struct.error as se: self._check_types(se)
00192 except TypeError as te: self._check_types(te)
00193
00194 def deserialize(self, str):
00195 """
00196 unpack serialized message in str into this message instance
00197 :param str: byte array of serialized message, ``str``
00198 """
00199 try:
00200 end = 0
00201 start = end
00202 end += 1
00203 (self.configured,) = _struct_B.unpack(str[start:end])
00204 self.configured = bool(self.configured)
00205 return self
00206 except struct.error as e:
00207 raise genpy.DeserializationError(e)
00208
00209
00210 def serialize_numpy(self, buff, numpy):
00211 """
00212 serialize message with numpy array types into buffer
00213 :param buff: buffer, ``StringIO``
00214 :param numpy: numpy python module
00215 """
00216 try:
00217 buff.write(_struct_B.pack(self.configured))
00218 except struct.error as se: self._check_types(se)
00219 except TypeError as te: self._check_types(te)
00220
00221 def deserialize_numpy(self, str, numpy):
00222 """
00223 unpack serialized message in str into this message instance using numpy for array types
00224 :param str: byte array of serialized message, ``str``
00225 :param numpy: numpy python module
00226 """
00227 try:
00228 end = 0
00229 start = end
00230 end += 1
00231 (self.configured,) = _struct_B.unpack(str[start:end])
00232 self.configured = bool(self.configured)
00233 return self
00234 except struct.error as e:
00235 raise genpy.DeserializationError(e)
00236
00237 _struct_I = genpy.struct_I
00238 _struct_B = struct.Struct("<B")
00239 class ForceController(object):
00240 _type = 'sr_robot_msgs/ForceController'
00241 _md5sum = '708b72feb937eddb740362ef24ec3beb'
00242 _request_class = ForceControllerRequest
00243 _response_class = ForceControllerResponse