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