/** * Set the global CFM (constraint force mixing) value. * @param w w * @param cfm Typical values are in the range @m{10^{-9}} -- 1. * The default is 10^-5 if single precision is being used, or 10^-10 * if double precision is being used. */ //ODE_API public static void dWorldSetCFM (DWorld w, double cfm) { w.setCFM(cfm); }
/** * Set the global CFM (constraint force mixing) value. * @param w w * @param cfm Typical values are in the range @m{10^{-9}} -- 1. * The default is 10^-5 if single precision is being used, or 10^-10 * if double precision is being used. */ //ODE_API public static void dWorldSetCFM (DWorld w, double cfm) { w.setCFM(cfm); }
world.setCFM (1e-5); OdeHelper.createPlane (space,0,0,1,0);
private void demo(String[] args) { // create world OdeHelper.initODE2( 0 ); world = OdeHelper.createWorld(); space = OdeHelper.createSimpleSpace( null ); contactgroup = OdeHelper.createJointGroup(); world.setGravity( 0,0,-0.5 ); world.setCFM( 1e-5 ); OdeHelper.createPlane( space,0,0,1,0 ); for (int i = 0; i < NUM; i++) obj[i] = new MyObject(); // run simulation dsSimulationLoop( args,352,288,this ); contactgroup.destroy(); space.destroy(); world.destroy(); OdeHelper.closeODE(); }
private void constructWorldForTest (double gravity, int bodycount, /* body 1 pos */ double pos1x, double pos1y, double pos1z, /* body 2 pos */ double pos2x, double pos2y, double pos2z, /* body 1 rotation axis */ double ax1x, double ax1y, double ax1z, /* body 1 rotation axis */ double ax2x, double ax2y, double ax2z, /* rotation angles */ double a1, double a2) { // create world world = OdeHelper.createWorld(); world.setERP (0.2); world.setCFM (1e-6); world.setGravity (0,0,gravity); DMass m = OdeHelper.createMass(); m.setBox (1,SIDE,SIDE,SIDE); m.adjust (MASS); body[0] = OdeHelper.createBody (world); body[0].setMass (m); body[0].setPosition(pos1x, pos1y, pos1z); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q,ax1x,ax1y,ax1z,a1); body[0].setQuaternion (q); if (bodycount==2) { body[1] = OdeHelper.createBody (world); body[1].setMass (m); body[1].setPosition (pos2x, pos2y, pos2z); dQFromAxisAndAngle (q,ax2x,ax2y,ax2z,a2); body[1].setQuaternion (q); } else body[1] = null; }
world = OdeHelper.createWorld(); world.setGravity (0,0,-0.5); world.setCFM (1e-5); space = OdeHelper.createSimpleSpace(null); OdeHelper.createPlane(space,0,0,1,0);
contactgroup = OdeHelper.createJointGroup(); world.setGravity(0,0,-GRAVITY); world.setCFM (1e-5); world.setAutoDisableFlag (true);
world.setCFM (1e-5);
contactgroup = OdeHelper.createJointGroup (); world.setGravity (0,0,-0.05); world.setCFM (1e-5); world.setAutoDisableFlag (true); world.setContactMaxCorrectingVel (0.1);
dyn_world.setCFM (cf_mixing); dyn_world.setGravity (0, 0.0, -1.0);
contactgroup = OdeHelper.createJointGroup(); world.setGravity (0,0,-0.5); world.setCFM (1e-5);
contactgroup = OdeHelper.createJointGroup (); world.setGravity (0,0,-0.05); world.setCFM (1e-5); world.setAutoDisableFlag (true); world.setContactMaxCorrectingVel (0.1);
contactgroup = OdeHelper.createJointGroup(); world.setGravity (0,0,-0.5); world.setCFM (1e-5); OdeHelper.createPlane (space,0,0,1,0); for (int i = 0; i < obj.length; i++) obj[i] = new MyObject();
contactgroup = OdeHelper.createJointGroup (); world.setGravity (0,0,-0.2); world.setCFM (1e-5); world.setAutoDisableFlag (true); world.setContactMaxCorrectingVel (0.1);
world = OdeHelper.createWorld(); world.setGravity(0,0,-0.5f); world.setCFM(1e-5f); world.setLinearDamping(0.00001f); world.setAngularDamping(0.0001f);
world = OdeHelper.createWorld(); world.setGravity(0,0,-0.5f); world.setCFM(1e-5f); world.setLinearDamping(0.00001f); world.setAngularDamping(0.0001f);
world.setCFM (1e-5); world.setERP (0.8); world.setQuickStepNumIterations (ITERS);