$search
00001 """autogenerated by genmsg_py from SetJointPropertiesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import gazebo.msg 00006 00007 class SetJointPropertiesRequest(roslib.message.Message): 00008 _md5sum = "331fd8f35fd27e3c1421175590258e26" 00009 _type = "gazebo/SetJointPropertiesRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """ 00012 00013 string joint_name 00014 gazebo/ODEJointProperties ode_joint_config 00015 00016 ================================================================================ 00017 MSG: gazebo/ODEJointProperties 00018 #This message is deprecated. Please use the version in gazebo_msgs instead. 00019 00020 # access to low level joint properties, change these at your own risk 00021 float64[] damping # joint damping 00022 float64[] hiStop # joint limit 00023 float64[] loStop # joint limit 00024 float64[] erp # set joint erp 00025 float64[] cfm # set joint cfm 00026 float64[] stop_erp # set joint erp for joint limit "contact" joint 00027 float64[] stop_cfm # set joint cfm for joint limit "contact" joint 00028 float64[] fudge_factor # joint fudge_factor applied at limits, see ODE manual for info. 00029 float64[] fmax # ode joint param fmax 00030 float64[] vel # ode joint param vel 00031 00032 """ 00033 __slots__ = ['joint_name','ode_joint_config'] 00034 _slot_types = ['string','gazebo/ODEJointProperties'] 00035 00036 def __init__(self, *args, **kwds): 00037 """ 00038 Constructor. Any message fields that are implicitly/explicitly 00039 set to None will be assigned a default value. The recommend 00040 use is keyword arguments as this is more robust to future message 00041 changes. You cannot mix in-order arguments and keyword arguments. 00042 00043 The available fields are: 00044 joint_name,ode_joint_config 00045 00046 @param args: complete set of field values, in .msg order 00047 @param kwds: use keyword arguments corresponding to message field names 00048 to set specific fields. 00049 """ 00050 if args or kwds: 00051 super(SetJointPropertiesRequest, self).__init__(*args, **kwds) 00052 #message fields cannot be None, assign default values for those that are 00053 if self.joint_name is None: 00054 self.joint_name = '' 00055 if self.ode_joint_config is None: 00056 self.ode_joint_config = gazebo.msg.ODEJointProperties() 00057 else: 00058 self.joint_name = '' 00059 self.ode_joint_config = gazebo.msg.ODEJointProperties() 00060 00061 def _get_types(self): 00062 """ 00063 internal API method 00064 """ 00065 return self._slot_types 00066 00067 def serialize(self, buff): 00068 """ 00069 serialize message into buffer 00070 @param buff: buffer 00071 @type buff: StringIO 00072 """ 00073 try: 00074 _x = self.joint_name 00075 length = len(_x) 00076 buff.write(struct.pack('<I%ss'%length, length, _x)) 00077 length = len(self.ode_joint_config.damping) 00078 buff.write(_struct_I.pack(length)) 00079 pattern = '<%sd'%length 00080 buff.write(struct.pack(pattern, *self.ode_joint_config.damping)) 00081 length = len(self.ode_joint_config.hiStop) 00082 buff.write(_struct_I.pack(length)) 00083 pattern = '<%sd'%length 00084 buff.write(struct.pack(pattern, *self.ode_joint_config.hiStop)) 00085 length = len(self.ode_joint_config.loStop) 00086 buff.write(_struct_I.pack(length)) 00087 pattern = '<%sd'%length 00088 buff.write(struct.pack(pattern, *self.ode_joint_config.loStop)) 00089 length = len(self.ode_joint_config.erp) 00090 buff.write(_struct_I.pack(length)) 00091 pattern = '<%sd'%length 00092 buff.write(struct.pack(pattern, *self.ode_joint_config.erp)) 00093 length = len(self.ode_joint_config.cfm) 00094 buff.write(_struct_I.pack(length)) 00095 pattern = '<%sd'%length 00096 buff.write(struct.pack(pattern, *self.ode_joint_config.cfm)) 00097 length = len(self.ode_joint_config.stop_erp) 00098 buff.write(_struct_I.pack(length)) 00099 pattern = '<%sd'%length 00100 buff.write(struct.pack(pattern, *self.ode_joint_config.stop_erp)) 00101 length = len(self.ode_joint_config.stop_cfm) 00102 buff.write(_struct_I.pack(length)) 00103 pattern = '<%sd'%length 00104 buff.write(struct.pack(pattern, *self.ode_joint_config.stop_cfm)) 00105 length = len(self.ode_joint_config.fudge_factor) 00106 buff.write(_struct_I.pack(length)) 00107 pattern = '<%sd'%length 00108 buff.write(struct.pack(pattern, *self.ode_joint_config.fudge_factor)) 00109 length = len(self.ode_joint_config.fmax) 00110 buff.write(_struct_I.pack(length)) 00111 pattern = '<%sd'%length 00112 buff.write(struct.pack(pattern, *self.ode_joint_config.fmax)) 00113 length = len(self.ode_joint_config.vel) 00114 buff.write(_struct_I.pack(length)) 00115 pattern = '<%sd'%length 00116 buff.write(struct.pack(pattern, *self.ode_joint_config.vel)) 00117 except struct.error as se: self._check_types(se) 00118 except TypeError as te: self._check_types(te) 00119 00120 def deserialize(self, str): 00121 """ 00122 unpack serialized message in str into this message instance 00123 @param str: byte array of serialized message 00124 @type str: str 00125 """ 00126 try: 00127 if self.ode_joint_config is None: 00128 self.ode_joint_config = gazebo.msg.ODEJointProperties() 00129 end = 0 00130 start = end 00131 end += 4 00132 (length,) = _struct_I.unpack(str[start:end]) 00133 start = end 00134 end += length 00135 self.joint_name = str[start:end] 00136 start = end 00137 end += 4 00138 (length,) = _struct_I.unpack(str[start:end]) 00139 pattern = '<%sd'%length 00140 start = end 00141 end += struct.calcsize(pattern) 00142 self.ode_joint_config.damping = struct.unpack(pattern, str[start:end]) 00143 start = end 00144 end += 4 00145 (length,) = _struct_I.unpack(str[start:end]) 00146 pattern = '<%sd'%length 00147 start = end 00148 end += struct.calcsize(pattern) 00149 self.ode_joint_config.hiStop = struct.unpack(pattern, str[start:end]) 00150 start = end 00151 end += 4 00152 (length,) = _struct_I.unpack(str[start:end]) 00153 pattern = '<%sd'%length 00154 start = end 00155 end += struct.calcsize(pattern) 00156 self.ode_joint_config.loStop = struct.unpack(pattern, str[start:end]) 00157 start = end 00158 end += 4 00159 (length,) = _struct_I.unpack(str[start:end]) 00160 pattern = '<%sd'%length 00161 start = end 00162 end += struct.calcsize(pattern) 00163 self.ode_joint_config.erp = struct.unpack(pattern, str[start:end]) 00164 start = end 00165 end += 4 00166 (length,) = _struct_I.unpack(str[start:end]) 00167 pattern = '<%sd'%length 00168 start = end 00169 end += struct.calcsize(pattern) 00170 self.ode_joint_config.cfm = struct.unpack(pattern, str[start:end]) 00171 start = end 00172 end += 4 00173 (length,) = _struct_I.unpack(str[start:end]) 00174 pattern = '<%sd'%length 00175 start = end 00176 end += struct.calcsize(pattern) 00177 self.ode_joint_config.stop_erp = struct.unpack(pattern, str[start:end]) 00178 start = end 00179 end += 4 00180 (length,) = _struct_I.unpack(str[start:end]) 00181 pattern = '<%sd'%length 00182 start = end 00183 end += struct.calcsize(pattern) 00184 self.ode_joint_config.stop_cfm = struct.unpack(pattern, str[start:end]) 00185 start = end 00186 end += 4 00187 (length,) = _struct_I.unpack(str[start:end]) 00188 pattern = '<%sd'%length 00189 start = end 00190 end += struct.calcsize(pattern) 00191 self.ode_joint_config.fudge_factor = struct.unpack(pattern, str[start:end]) 00192 start = end 00193 end += 4 00194 (length,) = _struct_I.unpack(str[start:end]) 00195 pattern = '<%sd'%length 00196 start = end 00197 end += struct.calcsize(pattern) 00198 self.ode_joint_config.fmax = struct.unpack(pattern, str[start:end]) 00199 start = end 00200 end += 4 00201 (length,) = _struct_I.unpack(str[start:end]) 00202 pattern = '<%sd'%length 00203 start = end 00204 end += struct.calcsize(pattern) 00205 self.ode_joint_config.vel = struct.unpack(pattern, str[start:end]) 00206 return self 00207 except struct.error as e: 00208 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00209 00210 00211 def serialize_numpy(self, buff, numpy): 00212 """ 00213 serialize message with numpy array types into buffer 00214 @param buff: buffer 00215 @type buff: StringIO 00216 @param numpy: numpy python module 00217 @type numpy module 00218 """ 00219 try: 00220 _x = self.joint_name 00221 length = len(_x) 00222 buff.write(struct.pack('<I%ss'%length, length, _x)) 00223 length = len(self.ode_joint_config.damping) 00224 buff.write(_struct_I.pack(length)) 00225 pattern = '<%sd'%length 00226 buff.write(self.ode_joint_config.damping.tostring()) 00227 length = len(self.ode_joint_config.hiStop) 00228 buff.write(_struct_I.pack(length)) 00229 pattern = '<%sd'%length 00230 buff.write(self.ode_joint_config.hiStop.tostring()) 00231 length = len(self.ode_joint_config.loStop) 00232 buff.write(_struct_I.pack(length)) 00233 pattern = '<%sd'%length 00234 buff.write(self.ode_joint_config.loStop.tostring()) 00235 length = len(self.ode_joint_config.erp) 00236 buff.write(_struct_I.pack(length)) 00237 pattern = '<%sd'%length 00238 buff.write(self.ode_joint_config.erp.tostring()) 00239 length = len(self.ode_joint_config.cfm) 00240 buff.write(_struct_I.pack(length)) 00241 pattern = '<%sd'%length 00242 buff.write(self.ode_joint_config.cfm.tostring()) 00243 length = len(self.ode_joint_config.stop_erp) 00244 buff.write(_struct_I.pack(length)) 00245 pattern = '<%sd'%length 00246 buff.write(self.ode_joint_config.stop_erp.tostring()) 00247 length = len(self.ode_joint_config.stop_cfm) 00248 buff.write(_struct_I.pack(length)) 00249 pattern = '<%sd'%length 00250 buff.write(self.ode_joint_config.stop_cfm.tostring()) 00251 length = len(self.ode_joint_config.fudge_factor) 00252 buff.write(_struct_I.pack(length)) 00253 pattern = '<%sd'%length 00254 buff.write(self.ode_joint_config.fudge_factor.tostring()) 00255 length = len(self.ode_joint_config.fmax) 00256 buff.write(_struct_I.pack(length)) 00257 pattern = '<%sd'%length 00258 buff.write(self.ode_joint_config.fmax.tostring()) 00259 length = len(self.ode_joint_config.vel) 00260 buff.write(_struct_I.pack(length)) 00261 pattern = '<%sd'%length 00262 buff.write(self.ode_joint_config.vel.tostring()) 00263 except struct.error as se: self._check_types(se) 00264 except TypeError as te: self._check_types(te) 00265 00266 def deserialize_numpy(self, str, numpy): 00267 """ 00268 unpack serialized message in str into this message instance using numpy for array types 00269 @param str: byte array of serialized message 00270 @type str: str 00271 @param numpy: numpy python module 00272 @type numpy: module 00273 """ 00274 try: 00275 if self.ode_joint_config is None: 00276 self.ode_joint_config = gazebo.msg.ODEJointProperties() 00277 end = 0 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 self.joint_name = str[start:end] 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 pattern = '<%sd'%length 00288 start = end 00289 end += struct.calcsize(pattern) 00290 self.ode_joint_config.damping = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00291 start = end 00292 end += 4 00293 (length,) = _struct_I.unpack(str[start:end]) 00294 pattern = '<%sd'%length 00295 start = end 00296 end += struct.calcsize(pattern) 00297 self.ode_joint_config.hiStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 pattern = '<%sd'%length 00302 start = end 00303 end += struct.calcsize(pattern) 00304 self.ode_joint_config.loStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00305 start = end 00306 end += 4 00307 (length,) = _struct_I.unpack(str[start:end]) 00308 pattern = '<%sd'%length 00309 start = end 00310 end += struct.calcsize(pattern) 00311 self.ode_joint_config.erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00312 start = end 00313 end += 4 00314 (length,) = _struct_I.unpack(str[start:end]) 00315 pattern = '<%sd'%length 00316 start = end 00317 end += struct.calcsize(pattern) 00318 self.ode_joint_config.cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00319 start = end 00320 end += 4 00321 (length,) = _struct_I.unpack(str[start:end]) 00322 pattern = '<%sd'%length 00323 start = end 00324 end += struct.calcsize(pattern) 00325 self.ode_joint_config.stop_erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00326 start = end 00327 end += 4 00328 (length,) = _struct_I.unpack(str[start:end]) 00329 pattern = '<%sd'%length 00330 start = end 00331 end += struct.calcsize(pattern) 00332 self.ode_joint_config.stop_cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00333 start = end 00334 end += 4 00335 (length,) = _struct_I.unpack(str[start:end]) 00336 pattern = '<%sd'%length 00337 start = end 00338 end += struct.calcsize(pattern) 00339 self.ode_joint_config.fudge_factor = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 pattern = '<%sd'%length 00344 start = end 00345 end += struct.calcsize(pattern) 00346 self.ode_joint_config.fmax = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00347 start = end 00348 end += 4 00349 (length,) = _struct_I.unpack(str[start:end]) 00350 pattern = '<%sd'%length 00351 start = end 00352 end += struct.calcsize(pattern) 00353 self.ode_joint_config.vel = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00354 return self 00355 except struct.error as e: 00356 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00357 00358 _struct_I = roslib.message.struct_I 00359 """autogenerated by genmsg_py from SetJointPropertiesResponse.msg. Do not edit.""" 00360 import roslib.message 00361 import struct 00362 00363 00364 class SetJointPropertiesResponse(roslib.message.Message): 00365 _md5sum = "2ec6f3eff0161f4257b808b12bc830c2" 00366 _type = "gazebo/SetJointPropertiesResponse" 00367 _has_header = False #flag to mark the presence of a Header object 00368 _full_text = """bool success 00369 string status_message 00370 00371 00372 """ 00373 __slots__ = ['success','status_message'] 00374 _slot_types = ['bool','string'] 00375 00376 def __init__(self, *args, **kwds): 00377 """ 00378 Constructor. Any message fields that are implicitly/explicitly 00379 set to None will be assigned a default value. The recommend 00380 use is keyword arguments as this is more robust to future message 00381 changes. You cannot mix in-order arguments and keyword arguments. 00382 00383 The available fields are: 00384 success,status_message 00385 00386 @param args: complete set of field values, in .msg order 00387 @param kwds: use keyword arguments corresponding to message field names 00388 to set specific fields. 00389 """ 00390 if args or kwds: 00391 super(SetJointPropertiesResponse, self).__init__(*args, **kwds) 00392 #message fields cannot be None, assign default values for those that are 00393 if self.success is None: 00394 self.success = False 00395 if self.status_message is None: 00396 self.status_message = '' 00397 else: 00398 self.success = False 00399 self.status_message = '' 00400 00401 def _get_types(self): 00402 """ 00403 internal API method 00404 """ 00405 return self._slot_types 00406 00407 def serialize(self, buff): 00408 """ 00409 serialize message into buffer 00410 @param buff: buffer 00411 @type buff: StringIO 00412 """ 00413 try: 00414 buff.write(_struct_B.pack(self.success)) 00415 _x = self.status_message 00416 length = len(_x) 00417 buff.write(struct.pack('<I%ss'%length, length, _x)) 00418 except struct.error as se: self._check_types(se) 00419 except TypeError as te: self._check_types(te) 00420 00421 def deserialize(self, str): 00422 """ 00423 unpack serialized message in str into this message instance 00424 @param str: byte array of serialized message 00425 @type str: str 00426 """ 00427 try: 00428 end = 0 00429 start = end 00430 end += 1 00431 (self.success,) = _struct_B.unpack(str[start:end]) 00432 self.success = bool(self.success) 00433 start = end 00434 end += 4 00435 (length,) = _struct_I.unpack(str[start:end]) 00436 start = end 00437 end += length 00438 self.status_message = str[start:end] 00439 return self 00440 except struct.error as e: 00441 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00442 00443 00444 def serialize_numpy(self, buff, numpy): 00445 """ 00446 serialize message with numpy array types into buffer 00447 @param buff: buffer 00448 @type buff: StringIO 00449 @param numpy: numpy python module 00450 @type numpy module 00451 """ 00452 try: 00453 buff.write(_struct_B.pack(self.success)) 00454 _x = self.status_message 00455 length = len(_x) 00456 buff.write(struct.pack('<I%ss'%length, length, _x)) 00457 except struct.error as se: self._check_types(se) 00458 except TypeError as te: self._check_types(te) 00459 00460 def deserialize_numpy(self, str, numpy): 00461 """ 00462 unpack serialized message in str into this message instance using numpy for array types 00463 @param str: byte array of serialized message 00464 @type str: str 00465 @param numpy: numpy python module 00466 @type numpy: module 00467 """ 00468 try: 00469 end = 0 00470 start = end 00471 end += 1 00472 (self.success,) = _struct_B.unpack(str[start:end]) 00473 self.success = bool(self.success) 00474 start = end 00475 end += 4 00476 (length,) = _struct_I.unpack(str[start:end]) 00477 start = end 00478 end += length 00479 self.status_message = str[start:end] 00480 return self 00481 except struct.error as e: 00482 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00483 00484 _struct_I = roslib.message.struct_I 00485 _struct_B = struct.Struct("<B") 00486 class SetJointProperties(roslib.message.ServiceDefinition): 00487 _type = 'gazebo/SetJointProperties' 00488 _md5sum = '15a76e921b1410c698d82782ea5fa370' 00489 _request_class = SetJointPropertiesRequest 00490 _response_class = SetJointPropertiesResponse