00001 """autogenerated by genpy from gazebo_msgs/ODEPhysics.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 ODEPhysics(genpy.Message):
00009 _md5sum = "667d56ddbd547918c32d1934503dc335"
00010 _type = "gazebo_msgs/ODEPhysics"
00011 _has_header = False
00012 _full_text = """bool auto_disable_bodies # enable auto disabling of bodies, default false
00013 uint32 sor_pgs_precon_iters # preconditioning inner iterations when uisng projected Gauss Seidel
00014 uint32 sor_pgs_iters # inner iterations when uisng projected Gauss Seidel
00015 float64 sor_pgs_w # relaxation parameter when using projected Gauss Seidel, 1 = no relaxation
00016 float64 sor_pgs_rms_error_tol # rms error tolerance before stopping inner iterations
00017 float64 contact_surface_layer # contact "dead-band" width
00018 float64 contact_max_correcting_vel # contact maximum correction velocity
00019 float64 cfm # global constraint force mixing
00020 float64 erp # global error reduction parameter
00021 uint32 max_contacts # maximum contact joints between two geoms
00022
00023 """
00024 __slots__ = ['auto_disable_bodies','sor_pgs_precon_iters','sor_pgs_iters','sor_pgs_w','sor_pgs_rms_error_tol','contact_surface_layer','contact_max_correcting_vel','cfm','erp','max_contacts']
00025 _slot_types = ['bool','uint32','uint32','float64','float64','float64','float64','float64','float64','uint32']
00026
00027 def __init__(self, *args, **kwds):
00028 """
00029 Constructor. Any message fields that are implicitly/explicitly
00030 set to None will be assigned a default value. The recommend
00031 use is keyword arguments as this is more robust to future message
00032 changes. You cannot mix in-order arguments and keyword arguments.
00033
00034 The available fields are:
00035 auto_disable_bodies,sor_pgs_precon_iters,sor_pgs_iters,sor_pgs_w,sor_pgs_rms_error_tol,contact_surface_layer,contact_max_correcting_vel,cfm,erp,max_contacts
00036
00037 :param args: complete set of field values, in .msg order
00038 :param kwds: use keyword arguments corresponding to message field names
00039 to set specific fields.
00040 """
00041 if args or kwds:
00042 super(ODEPhysics, self).__init__(*args, **kwds)
00043
00044 if self.auto_disable_bodies is None:
00045 self.auto_disable_bodies = False
00046 if self.sor_pgs_precon_iters is None:
00047 self.sor_pgs_precon_iters = 0
00048 if self.sor_pgs_iters is None:
00049 self.sor_pgs_iters = 0
00050 if self.sor_pgs_w is None:
00051 self.sor_pgs_w = 0.
00052 if self.sor_pgs_rms_error_tol is None:
00053 self.sor_pgs_rms_error_tol = 0.
00054 if self.contact_surface_layer is None:
00055 self.contact_surface_layer = 0.
00056 if self.contact_max_correcting_vel is None:
00057 self.contact_max_correcting_vel = 0.
00058 if self.cfm is None:
00059 self.cfm = 0.
00060 if self.erp is None:
00061 self.erp = 0.
00062 if self.max_contacts is None:
00063 self.max_contacts = 0
00064 else:
00065 self.auto_disable_bodies = False
00066 self.sor_pgs_precon_iters = 0
00067 self.sor_pgs_iters = 0
00068 self.sor_pgs_w = 0.
00069 self.sor_pgs_rms_error_tol = 0.
00070 self.contact_surface_layer = 0.
00071 self.contact_max_correcting_vel = 0.
00072 self.cfm = 0.
00073 self.erp = 0.
00074 self.max_contacts = 0
00075
00076 def _get_types(self):
00077 """
00078 internal API method
00079 """
00080 return self._slot_types
00081
00082 def serialize(self, buff):
00083 """
00084 serialize message into buffer
00085 :param buff: buffer, ``StringIO``
00086 """
00087 try:
00088 _x = self
00089 buff.write(_struct_B2I6dI.pack(_x.auto_disable_bodies, _x.sor_pgs_precon_iters, _x.sor_pgs_iters, _x.sor_pgs_w, _x.sor_pgs_rms_error_tol, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts))
00090 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00091 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 :param str: byte array of serialized message, ``str``
00097 """
00098 try:
00099 end = 0
00100 _x = self
00101 start = end
00102 end += 61
00103 (_x.auto_disable_bodies, _x.sor_pgs_precon_iters, _x.sor_pgs_iters, _x.sor_pgs_w, _x.sor_pgs_rms_error_tol, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts,) = _struct_B2I6dI.unpack(str[start:end])
00104 self.auto_disable_bodies = bool(self.auto_disable_bodies)
00105 return self
00106 except struct.error as e:
00107 raise genpy.DeserializationError(e)
00108
00109
00110 def serialize_numpy(self, buff, numpy):
00111 """
00112 serialize message with numpy array types into buffer
00113 :param buff: buffer, ``StringIO``
00114 :param numpy: numpy python module
00115 """
00116 try:
00117 _x = self
00118 buff.write(_struct_B2I6dI.pack(_x.auto_disable_bodies, _x.sor_pgs_precon_iters, _x.sor_pgs_iters, _x.sor_pgs_w, _x.sor_pgs_rms_error_tol, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts))
00119 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00120 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00121
00122 def deserialize_numpy(self, str, numpy):
00123 """
00124 unpack serialized message in str into this message instance using numpy for array types
00125 :param str: byte array of serialized message, ``str``
00126 :param numpy: numpy python module
00127 """
00128 try:
00129 end = 0
00130 _x = self
00131 start = end
00132 end += 61
00133 (_x.auto_disable_bodies, _x.sor_pgs_precon_iters, _x.sor_pgs_iters, _x.sor_pgs_w, _x.sor_pgs_rms_error_tol, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts,) = _struct_B2I6dI.unpack(str[start:end])
00134 self.auto_disable_bodies = bool(self.auto_disable_bodies)
00135 return self
00136 except struct.error as e:
00137 raise genpy.DeserializationError(e)
00138
00139 _struct_I = genpy.struct_I
00140 _struct_B2I6dI = struct.Struct("<B2I6dI")