Revision: 8667
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8667&view=rev
Author:   hsujohnhsu
Date:     2010-05-06 20:07:00 +0000 (Thu, 06 May 2010)

Log Message:
-----------
adding param for autodDisableBody and contactFeedbacks.

Modified Paths:
--------------
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/server/physics/ode/ODEPhysics.hh

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2010-05-06 19:45:39 UTC 
(rev 8666)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2010-05-06 20:07:00 UTC 
(rev 8667)
@@ -79,14 +79,6 @@
 
   this->contactGroup = dJointGroupCreate(0);
 
-  // If auto-disable is active, then user interaction with the joints 
-  // doesn't behave properly
-  dWorldSetAutoDisableFlag(this->worldId, 1);
-  dWorldSetAutoDisableTime(this->worldId, 2.0);
-  dWorldSetAutoDisableLinearThreshold(this->worldId, 0.001);
-  dWorldSetAutoDisableAngularThreshold(this->worldId, 0.001);
-  dWorldSetAutoDisableSteps(this->worldId, 50);
-
   Param::Begin(&this->parameters);
   this->globalCFMP = new ParamT<double>("cfm", 10e-5, 0);
   this->globalERPP = new ParamT<double>("erp", 0.2, 0);
@@ -95,12 +87,10 @@
   this->quickStepWP = new ParamT<double>("quickStepW", 1.3, 0);  /// 
over_relaxation value for SOR
   this->contactMaxCorrectingVelP = new 
ParamT<double>("contactMaxCorrectingVel", 10.0, 0);
   this->contactSurfaceLayerP = new ParamT<double>("contactSurfaceLayer", 0.01, 
0);
+  this->autoDisableBodyP = new ParamT<bool>("autoDisableBody", false, 0);
+  this->contactFeedbacksP = new ParamT<int>("contactFeedbacks", 100, 0);
   Param::End();
 
-  this->contactFeedbacks.resize(100);
-
-  // Reset the contact pointer
-  this->contactFeedbackIter = this->contactFeedbacks.begin();
 }
 
 
@@ -146,6 +136,8 @@
   this->quickStepWP->Load(cnode);
   this->contactMaxCorrectingVelP->Load(cnode);
   this->contactSurfaceLayerP->Load(cnode);
+  this->autoDisableBodyP->Load(cnode);
+  this->contactFeedbacksP->Load(cnode);
 
   // Help prevent "popping of deeply embedded object
   dWorldSetContactMaxCorrectingVel(this->worldId, 
contactMaxCorrectingVelP->GetValue());
@@ -153,6 +145,19 @@
   // This helps prevent jittering problems.
   dWorldSetContactSurfaceLayer(this->worldId, 
contactSurfaceLayerP->GetValue());
 
+  // If auto-disable is active, then user interaction with the joints 
+  // doesn't behave properly
+  // disable autodisable by default
+  dWorldSetAutoDisableFlag(this->worldId, this->autoDisableBodyP->GetValue());
+  dWorldSetAutoDisableTime(this->worldId, 2.0);
+  dWorldSetAutoDisableLinearThreshold(this->worldId, 0.001);
+  dWorldSetAutoDisableAngularThreshold(this->worldId, 0.001);
+  dWorldSetAutoDisableSteps(this->worldId, 50);
+
+  this->contactFeedbacks.resize(this->contactFeedbacksP->GetValue());
+
+  // Reset the contact pointer
+  this->contactFeedbackIter = this->contactFeedbacks.begin();
 }
 
 
////////////////////////////////////////////////////////////////////////////////

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.hh
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2010-05-06 19:45:39 UTC 
(rev 8666)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2010-05-06 20:07:00 UTC 
(rev 8667)
@@ -159,6 +159,8 @@
   private: ParamT<double> *quickStepWP; 
   private: ParamT<double> *contactMaxCorrectingVelP;
   private: ParamT<double> *contactSurfaceLayerP;
+  private: ParamT<bool> *autoDisableBodyP;
+  private: ParamT<int> *contactFeedbacksP;
 
   private: class ContactFeedback
            {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to