$search
00001 """autogenerated by genmsg_py from ForceControllerRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ForceControllerRequest(roslib.message.Message): 00007 _md5sum = "8bb059ffa85c4df492f2694e40ee3541" 00008 _type = "sr_robot_msgs/ForceControllerRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """int16 maxpwm 00011 int16 sgleftref 00012 int16 sgrightref 00013 int16 f 00014 int16 p 00015 int16 i 00016 int16 d 00017 int16 imax 00018 int16 deadband 00019 int16 sign 00020 00021 """ 00022 __slots__ = ['maxpwm','sgleftref','sgrightref','f','p','i','d','imax','deadband','sign'] 00023 _slot_types = ['int16','int16','int16','int16','int16','int16','int16','int16','int16','int16'] 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 maxpwm,sgleftref,sgrightref,f,p,i,d,imax,deadband,sign 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(ForceControllerRequest, self).__init__(*args, **kwds) 00041 #message fields cannot be None, assign default values for those that are 00042 if self.maxpwm is None: 00043 self.maxpwm = 0 00044 if self.sgleftref is None: 00045 self.sgleftref = 0 00046 if self.sgrightref is None: 00047 self.sgrightref = 0 00048 if self.f is None: 00049 self.f = 0 00050 if self.p is None: 00051 self.p = 0 00052 if self.i is None: 00053 self.i = 0 00054 if self.d is None: 00055 self.d = 0 00056 if self.imax is None: 00057 self.imax = 0 00058 if self.deadband is None: 00059 self.deadband = 0 00060 if self.sign is None: 00061 self.sign = 0 00062 else: 00063 self.maxpwm = 0 00064 self.sgleftref = 0 00065 self.sgrightref = 0 00066 self.f = 0 00067 self.p = 0 00068 self.i = 0 00069 self.d = 0 00070 self.imax = 0 00071 self.deadband = 0 00072 self.sign = 0 00073 00074 def _get_types(self): 00075 """ 00076 internal API method 00077 """ 00078 return self._slot_types 00079 00080 def serialize(self, buff): 00081 """ 00082 serialize message into buffer 00083 @param buff: buffer 00084 @type buff: StringIO 00085 """ 00086 try: 00087 _x = self 00088 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)) 00089 except struct.error as se: self._check_types(se) 00090 except TypeError as te: self._check_types(te) 00091 00092 def deserialize(self, str): 00093 """ 00094 unpack serialized message in str into this message instance 00095 @param str: byte array of serialized message 00096 @type str: 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 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_10h.pack(_x.maxpwm, _x.sgleftref, _x.sgrightref, _x.f, _x.p, _x.i, _x.d, _x.imax, _x.deadband, _x.sign)) 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 end = 0 00133 _x = self 00134 start = end 00135 end += 20 00136 (_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]) 00137 return self 00138 except struct.error as e: 00139 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00140 00141 _struct_I = roslib.message.struct_I 00142 _struct_10h = struct.Struct("<10h") 00143 """autogenerated by genmsg_py from ForceControllerResponse.msg. Do not edit.""" 00144 import roslib.message 00145 import struct 00146 00147 00148 class ForceControllerResponse(roslib.message.Message): 00149 _md5sum = "d3b1a74026985b10664594fe60a8c3eb" 00150 _type = "sr_robot_msgs/ForceControllerResponse" 00151 _has_header = False #flag to mark the presence of a Header object 00152 _full_text = """bool configured 00153 00154 """ 00155 __slots__ = ['configured'] 00156 _slot_types = ['bool'] 00157 00158 def __init__(self, *args, **kwds): 00159 """ 00160 Constructor. Any message fields that are implicitly/explicitly 00161 set to None will be assigned a default value. The recommend 00162 use is keyword arguments as this is more robust to future message 00163 changes. You cannot mix in-order arguments and keyword arguments. 00164 00165 The available fields are: 00166 configured 00167 00168 @param args: complete set of field values, in .msg order 00169 @param kwds: use keyword arguments corresponding to message field names 00170 to set specific fields. 00171 """ 00172 if args or kwds: 00173 super(ForceControllerResponse, self).__init__(*args, **kwds) 00174 #message fields cannot be None, assign default values for those that are 00175 if self.configured is None: 00176 self.configured = False 00177 else: 00178 self.configured = False 00179 00180 def _get_types(self): 00181 """ 00182 internal API method 00183 """ 00184 return self._slot_types 00185 00186 def serialize(self, buff): 00187 """ 00188 serialize message into buffer 00189 @param buff: buffer 00190 @type buff: StringIO 00191 """ 00192 try: 00193 buff.write(_struct_B.pack(self.configured)) 00194 except struct.error as se: self._check_types(se) 00195 except TypeError as te: self._check_types(te) 00196 00197 def deserialize(self, str): 00198 """ 00199 unpack serialized message in str into this message instance 00200 @param str: byte array of serialized message 00201 @type str: str 00202 """ 00203 try: 00204 end = 0 00205 start = end 00206 end += 1 00207 (self.configured,) = _struct_B.unpack(str[start:end]) 00208 self.configured = bool(self.configured) 00209 return self 00210 except struct.error as e: 00211 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00212 00213 00214 def serialize_numpy(self, buff, numpy): 00215 """ 00216 serialize message with numpy array types into buffer 00217 @param buff: buffer 00218 @type buff: StringIO 00219 @param numpy: numpy python module 00220 @type numpy module 00221 """ 00222 try: 00223 buff.write(_struct_B.pack(self.configured)) 00224 except struct.error as se: self._check_types(se) 00225 except TypeError as te: self._check_types(te) 00226 00227 def deserialize_numpy(self, str, numpy): 00228 """ 00229 unpack serialized message in str into this message instance using numpy for array types 00230 @param str: byte array of serialized message 00231 @type str: str 00232 @param numpy: numpy python module 00233 @type numpy: module 00234 """ 00235 try: 00236 end = 0 00237 start = end 00238 end += 1 00239 (self.configured,) = _struct_B.unpack(str[start:end]) 00240 self.configured = bool(self.configured) 00241 return self 00242 except struct.error as e: 00243 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00244 00245 _struct_I = roslib.message.struct_I 00246 _struct_B = struct.Struct("<B") 00247 class ForceController(roslib.message.ServiceDefinition): 00248 _type = 'sr_robot_msgs/ForceController' 00249 _md5sum = '708b72feb937eddb740362ef24ec3beb' 00250 _request_class = ForceControllerRequest 00251 _response_class = ForceControllerResponse