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