_ODEJointProperties.py
Go to the documentation of this file.
00001 """autogenerated by genpy from gazebo_msgs/ODEJointProperties.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 ODEJointProperties(genpy.Message):
00009   _md5sum = "1b744c32a920af979f53afe2f9c3511f"
00010   _type = "gazebo_msgs/ODEJointProperties"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# access to low level joint properties, change these at your own risk
00013 float64[] damping             # joint damping
00014 float64[] hiStop              # joint limit
00015 float64[] loStop              # joint limit
00016 float64[] erp                 # set joint erp
00017 float64[] cfm                 # set joint cfm
00018 float64[] stop_erp            # set joint erp for joint limit "contact" joint
00019 float64[] stop_cfm            # set joint cfm for joint limit "contact" joint
00020 float64[] fudge_factor        # joint fudge_factor applied at limits, see ODE manual for info.
00021 float64[] fmax                # ode joint param fmax
00022 float64[] vel                 # ode joint param vel
00023 
00024 """
00025   __slots__ = ['damping','hiStop','loStop','erp','cfm','stop_erp','stop_cfm','fudge_factor','fmax','vel']
00026   _slot_types = ['float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]']
00027 
00028   def __init__(self, *args, **kwds):
00029     """
00030     Constructor. Any message fields that are implicitly/explicitly
00031     set to None will be assigned a default value. The recommend
00032     use is keyword arguments as this is more robust to future message
00033     changes.  You cannot mix in-order arguments and keyword arguments.
00034 
00035     The available fields are:
00036        damping,hiStop,loStop,erp,cfm,stop_erp,stop_cfm,fudge_factor,fmax,vel
00037 
00038     :param args: complete set of field values, in .msg order
00039     :param kwds: use keyword arguments corresponding to message field names
00040     to set specific fields.
00041     """
00042     if args or kwds:
00043       super(ODEJointProperties, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.damping is None:
00046         self.damping = []
00047       if self.hiStop is None:
00048         self.hiStop = []
00049       if self.loStop is None:
00050         self.loStop = []
00051       if self.erp is None:
00052         self.erp = []
00053       if self.cfm is None:
00054         self.cfm = []
00055       if self.stop_erp is None:
00056         self.stop_erp = []
00057       if self.stop_cfm is None:
00058         self.stop_cfm = []
00059       if self.fudge_factor is None:
00060         self.fudge_factor = []
00061       if self.fmax is None:
00062         self.fmax = []
00063       if self.vel is None:
00064         self.vel = []
00065     else:
00066       self.damping = []
00067       self.hiStop = []
00068       self.loStop = []
00069       self.erp = []
00070       self.cfm = []
00071       self.stop_erp = []
00072       self.stop_cfm = []
00073       self.fudge_factor = []
00074       self.fmax = []
00075       self.vel = []
00076 
00077   def _get_types(self):
00078     """
00079     internal API method
00080     """
00081     return self._slot_types
00082 
00083   def serialize(self, buff):
00084     """
00085     serialize message into buffer
00086     :param buff: buffer, ``StringIO``
00087     """
00088     try:
00089       length = len(self.damping)
00090       buff.write(_struct_I.pack(length))
00091       pattern = '<%sd'%length
00092       buff.write(struct.pack(pattern, *self.damping))
00093       length = len(self.hiStop)
00094       buff.write(_struct_I.pack(length))
00095       pattern = '<%sd'%length
00096       buff.write(struct.pack(pattern, *self.hiStop))
00097       length = len(self.loStop)
00098       buff.write(_struct_I.pack(length))
00099       pattern = '<%sd'%length
00100       buff.write(struct.pack(pattern, *self.loStop))
00101       length = len(self.erp)
00102       buff.write(_struct_I.pack(length))
00103       pattern = '<%sd'%length
00104       buff.write(struct.pack(pattern, *self.erp))
00105       length = len(self.cfm)
00106       buff.write(_struct_I.pack(length))
00107       pattern = '<%sd'%length
00108       buff.write(struct.pack(pattern, *self.cfm))
00109       length = len(self.stop_erp)
00110       buff.write(_struct_I.pack(length))
00111       pattern = '<%sd'%length
00112       buff.write(struct.pack(pattern, *self.stop_erp))
00113       length = len(self.stop_cfm)
00114       buff.write(_struct_I.pack(length))
00115       pattern = '<%sd'%length
00116       buff.write(struct.pack(pattern, *self.stop_cfm))
00117       length = len(self.fudge_factor)
00118       buff.write(_struct_I.pack(length))
00119       pattern = '<%sd'%length
00120       buff.write(struct.pack(pattern, *self.fudge_factor))
00121       length = len(self.fmax)
00122       buff.write(_struct_I.pack(length))
00123       pattern = '<%sd'%length
00124       buff.write(struct.pack(pattern, *self.fmax))
00125       length = len(self.vel)
00126       buff.write(_struct_I.pack(length))
00127       pattern = '<%sd'%length
00128       buff.write(struct.pack(pattern, *self.vel))
00129     except struct.error as se: self._check_types(se)
00130     except TypeError as te: self._check_types(te)
00131 
00132   def deserialize(self, str):
00133     """
00134     unpack serialized message in str into this message instance
00135     :param str: byte array of serialized message, ``str``
00136     """
00137     try:
00138       end = 0
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.damping = 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.hiStop = 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.loStop = 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.erp = 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.cfm = 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.stop_erp = 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.stop_cfm = 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.fudge_factor = 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.fmax = struct.unpack(pattern, str[start:end])
00202       start = end
00203       end += 4
00204       (length,) = _struct_I.unpack(str[start:end])
00205       pattern = '<%sd'%length
00206       start = end
00207       end += struct.calcsize(pattern)
00208       self.vel = struct.unpack(pattern, str[start:end])
00209       return self
00210     except struct.error as e:
00211       raise genpy.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, ``StringIO``
00218     :param numpy: numpy python module
00219     """
00220     try:
00221       length = len(self.damping)
00222       buff.write(_struct_I.pack(length))
00223       pattern = '<%sd'%length
00224       buff.write(self.damping.tostring())
00225       length = len(self.hiStop)
00226       buff.write(_struct_I.pack(length))
00227       pattern = '<%sd'%length
00228       buff.write(self.hiStop.tostring())
00229       length = len(self.loStop)
00230       buff.write(_struct_I.pack(length))
00231       pattern = '<%sd'%length
00232       buff.write(self.loStop.tostring())
00233       length = len(self.erp)
00234       buff.write(_struct_I.pack(length))
00235       pattern = '<%sd'%length
00236       buff.write(self.erp.tostring())
00237       length = len(self.cfm)
00238       buff.write(_struct_I.pack(length))
00239       pattern = '<%sd'%length
00240       buff.write(self.cfm.tostring())
00241       length = len(self.stop_erp)
00242       buff.write(_struct_I.pack(length))
00243       pattern = '<%sd'%length
00244       buff.write(self.stop_erp.tostring())
00245       length = len(self.stop_cfm)
00246       buff.write(_struct_I.pack(length))
00247       pattern = '<%sd'%length
00248       buff.write(self.stop_cfm.tostring())
00249       length = len(self.fudge_factor)
00250       buff.write(_struct_I.pack(length))
00251       pattern = '<%sd'%length
00252       buff.write(self.fudge_factor.tostring())
00253       length = len(self.fmax)
00254       buff.write(_struct_I.pack(length))
00255       pattern = '<%sd'%length
00256       buff.write(self.fmax.tostring())
00257       length = len(self.vel)
00258       buff.write(_struct_I.pack(length))
00259       pattern = '<%sd'%length
00260       buff.write(self.vel.tostring())
00261     except struct.error as se: self._check_types(se)
00262     except TypeError as te: self._check_types(te)
00263 
00264   def deserialize_numpy(self, str, numpy):
00265     """
00266     unpack serialized message in str into this message instance using numpy for array types
00267     :param str: byte array of serialized message, ``str``
00268     :param numpy: numpy python module
00269     """
00270     try:
00271       end = 0
00272       start = end
00273       end += 4
00274       (length,) = _struct_I.unpack(str[start:end])
00275       pattern = '<%sd'%length
00276       start = end
00277       end += struct.calcsize(pattern)
00278       self.damping = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00279       start = end
00280       end += 4
00281       (length,) = _struct_I.unpack(str[start:end])
00282       pattern = '<%sd'%length
00283       start = end
00284       end += struct.calcsize(pattern)
00285       self.hiStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00286       start = end
00287       end += 4
00288       (length,) = _struct_I.unpack(str[start:end])
00289       pattern = '<%sd'%length
00290       start = end
00291       end += struct.calcsize(pattern)
00292       self.loStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00293       start = end
00294       end += 4
00295       (length,) = _struct_I.unpack(str[start:end])
00296       pattern = '<%sd'%length
00297       start = end
00298       end += struct.calcsize(pattern)
00299       self.erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00300       start = end
00301       end += 4
00302       (length,) = _struct_I.unpack(str[start:end])
00303       pattern = '<%sd'%length
00304       start = end
00305       end += struct.calcsize(pattern)
00306       self.cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00307       start = end
00308       end += 4
00309       (length,) = _struct_I.unpack(str[start:end])
00310       pattern = '<%sd'%length
00311       start = end
00312       end += struct.calcsize(pattern)
00313       self.stop_erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00314       start = end
00315       end += 4
00316       (length,) = _struct_I.unpack(str[start:end])
00317       pattern = '<%sd'%length
00318       start = end
00319       end += struct.calcsize(pattern)
00320       self.stop_cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00321       start = end
00322       end += 4
00323       (length,) = _struct_I.unpack(str[start:end])
00324       pattern = '<%sd'%length
00325       start = end
00326       end += struct.calcsize(pattern)
00327       self.fudge_factor = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00328       start = end
00329       end += 4
00330       (length,) = _struct_I.unpack(str[start:end])
00331       pattern = '<%sd'%length
00332       start = end
00333       end += struct.calcsize(pattern)
00334       self.fmax = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       pattern = '<%sd'%length
00339       start = end
00340       end += struct.calcsize(pattern)
00341       self.vel = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00342       return self
00343     except struct.error as e:
00344       raise genpy.DeserializationError(e) #most likely buffer underfill
00345 
00346 _struct_I = genpy.struct_I


gazebo_msgs
Author(s): John Hsu
autogenerated on Sun Jan 5 2014 11:34:32