Revision: 8611 http://playerstage.svn.sourceforge.net/playerstage/?rev=8611&view=rev Author: natepak Date: 2010-04-12 14:31:26 +0000 (Mon, 12 Apr 2010)
Log Message: ----------- Fixed the auto-disable so that moving joints causes the bodies to re-enable, in ODE Modified Paths: -------------- code/gazebo/trunk/player_cfgs/gazebo.cfg code/gazebo/trunk/server/physics/ode/ODEHinge2Joint.cc code/gazebo/trunk/server/physics/ode/ODEHingeJoint.cc code/gazebo/trunk/server/physics/ode/ODEJoint.cc code/gazebo/trunk/server/physics/ode/ODEPhysics.cc code/gazebo/trunk/server/physics/ode/ODESliderJoint.cc code/gazebo/trunk/server/physics/ode/ODEUniversalJoint.cc Modified: code/gazebo/trunk/player_cfgs/gazebo.cfg =================================================================== --- code/gazebo/trunk/player_cfgs/gazebo.cfg 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/player_cfgs/gazebo.cfg 2010-04-12 14:31:26 UTC (rev 8611) @@ -15,14 +15,14 @@ ( name "gazebo" provides ["position2d:0"] - gz_id "position_iface_0" + gz_id "pioneer2dx_model1::position_iface_0" ) driver ( name "gazebo" provides ["laser:0"] - gz_id "laser_iface_0" + gz_id "pioneer2dx_model1::laser::laser_iface_0" ) driver @@ -42,12 +42,12 @@ weight_current_dir 3.0 ) -driver -( - name "gazebo" - provides ["fiducial:0"] - gz_id "fiducial_iface_0" -) +#driver +#( +# name "gazebo" +# provides ["fiducial:0"] +# gz_id "fiducial_iface_0" +#) #driver #( Modified: code/gazebo/trunk/server/physics/ode/ODEHinge2Joint.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODEHinge2Joint.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODEHinge2Joint.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -24,6 +24,7 @@ * CVS: $Id: ODEHinge2Joint.cc 7129 2008-11-12 19:38:15Z natepak $ */ +#include "Body.hh" #include "Global.hh" #include "XMLConfig.hh" #include "ODEHinge2Joint.hh" @@ -90,6 +91,8 @@ void ODEHinge2Joint::SetAnchor( int /*index*/, const Vector3 &anchor ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); dJointSetHinge2Anchor( this->jointId, anchor.x, anchor.y, anchor.z ); this->physics->UnlockMutex(); } @@ -99,6 +102,9 @@ void ODEHinge2Joint::SetAxis( int index, const Vector3 &axis ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + if (index == 0) dJointSetHinge2Axis1( this->jointId, axis.x, axis.y, axis.z ); else @@ -187,6 +193,9 @@ void ODEHinge2Joint::SetForce(int index, double torque) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + if (index == 0) dJointAddHinge2Torques(this->jointId, torque, 0); else @@ -210,6 +219,7 @@ void ODEHinge2Joint::SetParam( int parameter, double value) { this->physics->LockMutex(); + ODEJoint::SetParam(parameter, value); dJointSetHinge2Param( this->jointId, parameter, value ); this->physics->UnlockMutex(); } Modified: code/gazebo/trunk/server/physics/ode/ODEHingeJoint.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODEHingeJoint.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODEHingeJoint.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -76,6 +76,9 @@ void ODEHingeJoint::SetAnchor( int /*index*/, const Vector3 &anchor ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + dJointSetHingeAnchor( this->jointId, anchor.x, anchor.y, anchor.z ); this->physics->UnlockMutex(); } @@ -99,6 +102,9 @@ void ODEHingeJoint::SetAxis( int /*index*/, const Vector3 &axis ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + dJointSetHingeAxis( this->jointId, axis.x, axis.y, axis.z ); this->physics->UnlockMutex(); } @@ -151,6 +157,8 @@ void ODEHingeJoint::SetForce(int /*index*/, double torque) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); dJointAddHingeTorque( this->jointId, torque ); this->physics->UnlockMutex(); } @@ -171,6 +179,8 @@ void ODEHingeJoint::SetParam( int parameter, double value) { this->physics->LockMutex(); + ODEJoint::SetParam(parameter, value); + dJointSetHingeParam( this->jointId, parameter, value ); this->physics->UnlockMutex(); } Modified: code/gazebo/trunk/server/physics/ode/ODEJoint.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODEJoint.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODEJoint.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -157,6 +157,8 @@ // where appropriate void ODEJoint::SetParam(int /*parameter*/, double /*value*/) { + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); } //////////////////////////////////////////////////////////////////////////////// Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -471,8 +471,11 @@ int numc = 0; dContact contact; - if (geom1->GetType() == Shape::TRIMESH && geom2->GetType()==Shape::TRIMESH) + if (geom1->GetShapeType() == Shape::TRIMESH && + geom2->GetShapeType()==Shape::TRIMESH) + { numContacts = maxContacts; + } numc = dCollide(o1,o2,numContacts, self->contactGeoms, sizeof(self->contactGeoms[0])); Modified: code/gazebo/trunk/server/physics/ode/ODESliderJoint.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODESliderJoint.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODESliderJoint.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -24,6 +24,7 @@ * CVS: $Id: ODESliderJoint.cc 7039 2008-09-24 18:06:29Z natepak $ */ +#include "Body.hh" #include "XMLConfig.hh" #include "ODESliderJoint.hh" @@ -96,6 +97,9 @@ void ODESliderJoint::SetAxis( int /*index*/, const Vector3 &axis ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + dJointSetSliderAxis( this->jointId, axis.x, axis.y, axis.z ); this->physics->UnlockMutex(); } @@ -105,6 +109,9 @@ void ODESliderJoint::SetForce(int /*index*/, double force) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + dJointAddSliderForce(this->jointId, force); this->physics->UnlockMutex(); } @@ -114,6 +121,7 @@ void ODESliderJoint::SetParam( int parameter, double value ) { this->physics->LockMutex(); + ODEJoint::SetParam(parameter, value); dJointSetSliderParam( this->jointId, parameter, value ); this->physics->UnlockMutex(); } Modified: code/gazebo/trunk/server/physics/ode/ODEUniversalJoint.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODEUniversalJoint.cc 2010-04-12 14:29:07 UTC (rev 8610) +++ code/gazebo/trunk/server/physics/ode/ODEUniversalJoint.cc 2010-04-12 14:31:26 UTC (rev 8611) @@ -24,6 +24,7 @@ * CVS: $Id: ODEUniversalJoint.cc 7039 2008-09-24 18:06:29Z natepak $ */ +#include "Body.hh" #include "ODEUniversalJoint.hh" using namespace gazebo; @@ -59,6 +60,9 @@ void ODEUniversalJoint::SetAnchor( int /*index*/, const Vector3 &anchor ) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + dJointSetUniversalAnchor( this->jointId, anchor.x, anchor.y, anchor.z ); this->physics->UnlockMutex(); } @@ -84,6 +88,10 @@ void ODEUniversalJoint::SetAxis( int index, const Vector3 &axis ) { this->physics->LockMutex(); + + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); + if (index == 0) dJointSetUniversalAxis1( this->jointId, axis.x, axis.y, axis.z ); else @@ -136,6 +144,8 @@ void ODEUniversalJoint::SetForce(int index, double torque) { this->physics->LockMutex(); + this->body1->SetEnabled(true); + this->body2->SetEnabled(true); if (index == 0) dJointAddUniversalTorques( this->jointId, torque, 0); else @@ -168,6 +178,7 @@ void ODEUniversalJoint::SetParam( int parameter, double value) { this->physics->LockMutex(); + ODEJoint::SetParam(parameter, value); dJointSetUniversalParam( this->jointId, parameter, value ); this->physics->UnlockMutex(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit