Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: constraints aren't stiff
PostPosted: Wed Jun 27, 2012 9:33 am 
Offline

Joined: Wed Jun 27, 2012 9:13 am
Posts: 8
Hi,

at the moment I develop a simulation for a humanoid robot, but i have a problem with the constraints.
I use the btGeneric6DofConstraint for all joints of my robot an set angular and linear Limits 0.
I set the CFM- and ERP-parameter with follow values:

linearStopERP = 0.6
linearStopCFM = 0.9
linearCFM = 0.9
angularStopERP = 0.6
angularStopCFM = 0.9
angularCFM = 0.9

Unfortunately, the joints bounce when the robot walk or hit on the ground. I tried to test some ERP-CFM-Configurations without a success. There are some pictures of my problem at the attachment and here a little demo video :
http://www.youtube.com/watch?v=aPJdQCXqWeU

Here some Code:

Code:
btGeneric6DofConstraint * Robot::addbtGeneric6DofSpringConstraint (RobotPart *partA, RobotPart *partB,btVector3 pointInA,btVector3 pointInB, bool useLinearReferenceFrameA){

   pointInA.setValue((btScalar)pointInA.x()*(btScalar)scale.x(),(btScalar)pointInA.y()*(btScalar)scale.y(),(btScalar)pointInA.z()*(btScalar)scale.z());
   pointInB.setValue((btScalar)pointInB.x()*(btScalar)scale.x(),(btScalar)pointInB.y()*(btScalar)scale.y(),(btScalar)pointInB.z()*(btScalar)scale.z());

   btTransform tInA;
   tInA.setIdentity();
   tInA.setOrigin( pointInA );
   btTransform tInB;
   tInB.setIdentity();
   tInB.setOrigin( pointInB );
   btGeneric6DofConstraint *cons = new btGeneric6DofSpringConstraint(*partA->getRigidBody(),*partB->getRigidBody(),tInA,tInB,false);


   partA->getRigidBody()->setActivationState(DISABLE_DEACTIVATION);
   partB->getRigidBody()->setActivationState(DISABLE_DEACTIVATION);


   cons->setAngularLowerLimit(btVector3(0,0,0));
   cons->setLinearLowerLimit(btVector3(0,0,0));
   cons->setAngularUpperLimit(btVector3(0,0,0));
   cons->setLinearLowerLimit(btVector3(0,0,0));


   dynamicsWorld->addConstraint(cons);

   allConstraints.push_back(cons);

   return cons;
}


I hope you can help me with my problem

Thanks,
Oliver


Attachments:
File comment: some pictures of my problem
constraint-problem.zip [130.7 KiB]
Downloaded 60 times
Top
 Profile  
 
PostPosted: Wed Jun 27, 2012 3:42 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 759
Location: Bellevue, WA
Use 0.1 - 0.2 for ERP and 0.0 for CFM. You are essentially making the joints soft. Look here for an explanation: http://ode.org/ode-latest-userguide.html#sec_3_7_0


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 7:20 am 
Offline

Joined: Wed Jun 27, 2012 9:13 am
Posts: 8
Hey,

i have fixed some stupid bugs in my simulator, but the constraints still aren't stiff.
Here a little video: http://www.youtube.com/watch?v=R6KRtTQf874

my parameters:

linStopERP 0.4
linStopCFM 0.0000
linCFM 0.0000
angStopERP 0.4
angStopCFM 0.0000
angCFM 0.0000

Can somebody help me with this problem?

A further helpfully information:

Linked objects can collide with each other in my implementation:
Code:
dynamicsWorld->addConstraint(cons,true);


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 4:40 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 759
Location: Bellevue, WA
You can ramp up the iteration count and also use smaller timesteps. Make sure you enable warmstarting and there is a warmstarting factor which defaults to 0.9 iirc. Make sure it is set to 1.0


Top
 Profile  
 
PostPosted: Thu Aug 09, 2012 9:43 am 
Offline

Joined: Wed Jun 27, 2012 9:13 am
Posts: 8
thank you for the tipps!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Eaglegor and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group