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 = "cecbd7ae4dd73d0ce24e775cee96d4a6"
00008 _type = "gazebo/ODEPhysics"
00009 _has_header = False
00010 _full_text = """#This message is deprecated. Please use the version in gazebo_msgs instead.
00011
00012 bool auto_disable_bodies # enable auto disabling of bodies, default false
00013 uint32 sor_pgs_iters # inner iterations when uisng projected Gauss Seidel
00014 float64 sor_pgs_w # relaxation parameter when using projected Gauss Seidel, 1 = no relaxation
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_iters','sor_pgs_w','contact_surface_layer','contact_max_correcting_vel','cfm','erp','max_contacts']
00023 _slot_types = ['bool','uint32','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_iters,sor_pgs_w,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
00042 if self.auto_disable_bodies is None:
00043 self.auto_disable_bodies = False
00044 if self.sor_pgs_iters is None:
00045 self.sor_pgs_iters = 0
00046 if self.sor_pgs_w is None:
00047 self.sor_pgs_w = 0.
00048 if self.contact_surface_layer is None:
00049 self.contact_surface_layer = 0.
00050 if self.contact_max_correcting_vel is None:
00051 self.contact_max_correcting_vel = 0.
00052 if self.cfm is None:
00053 self.cfm = 0.
00054 if self.erp is None:
00055 self.erp = 0.
00056 if self.max_contacts is None:
00057 self.max_contacts = 0
00058 else:
00059 self.auto_disable_bodies = False
00060 self.sor_pgs_iters = 0
00061 self.sor_pgs_w = 0.
00062 self.contact_surface_layer = 0.
00063 self.contact_max_correcting_vel = 0.
00064 self.cfm = 0.
00065 self.erp = 0.
00066 self.max_contacts = 0
00067
00068 def _get_types(self):
00069 """
00070 internal API method
00071 """
00072 return self._slot_types
00073
00074 def serialize(self, buff):
00075 """
00076 serialize message into buffer
00077 @param buff: buffer
00078 @type buff: StringIO
00079 """
00080 try:
00081 _x = self
00082 buff.write(_struct_BI5dI.pack(_x.auto_disable_bodies, _x.sor_pgs_iters, _x.sor_pgs_w, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts))
00083 except struct.error as se: self._check_types(se)
00084 except TypeError as te: self._check_types(te)
00085
00086 def deserialize(self, str):
00087 """
00088 unpack serialized message in str into this message instance
00089 @param str: byte array of serialized message
00090 @type str: str
00091 """
00092 try:
00093 end = 0
00094 _x = self
00095 start = end
00096 end += 49
00097 (_x.auto_disable_bodies, _x.sor_pgs_iters, _x.sor_pgs_w, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts,) = _struct_BI5dI.unpack(str[start:end])
00098 self.auto_disable_bodies = bool(self.auto_disable_bodies)
00099 return self
00100 except struct.error as e:
00101 raise roslib.message.DeserializationError(e)
00102
00103
00104 def serialize_numpy(self, buff, numpy):
00105 """
00106 serialize message with numpy array types into buffer
00107 @param buff: buffer
00108 @type buff: StringIO
00109 @param numpy: numpy python module
00110 @type numpy module
00111 """
00112 try:
00113 _x = self
00114 buff.write(_struct_BI5dI.pack(_x.auto_disable_bodies, _x.sor_pgs_iters, _x.sor_pgs_w, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts))
00115 except struct.error as se: self._check_types(se)
00116 except TypeError as te: self._check_types(te)
00117
00118 def deserialize_numpy(self, str, numpy):
00119 """
00120 unpack serialized message in str into this message instance using numpy for array types
00121 @param str: byte array of serialized message
00122 @type str: str
00123 @param numpy: numpy python module
00124 @type numpy: module
00125 """
00126 try:
00127 end = 0
00128 _x = self
00129 start = end
00130 end += 49
00131 (_x.auto_disable_bodies, _x.sor_pgs_iters, _x.sor_pgs_w, _x.contact_surface_layer, _x.contact_max_correcting_vel, _x.cfm, _x.erp, _x.max_contacts,) = _struct_BI5dI.unpack(str[start:end])
00132 self.auto_disable_bodies = bool(self.auto_disable_bodies)
00133 return self
00134 except struct.error as e:
00135 raise roslib.message.DeserializationError(e)
00136
00137 _struct_I = roslib.message.struct_I
00138 _struct_BI5dI = struct.Struct("<BI5dI")