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


gazebo_msgs
Author(s): John Hsu
autogenerated on Mon Oct 6 2014 12:14:33