check in a good set of parameters for grasping deformable ball with nonlinear damping force (not as stable as linear damping)
This commit is contained in:
@@ -331,18 +331,12 @@ void Pinch::initPhysics()
|
||||
psb->translate(btVector3(0, 4, 0));
|
||||
psb->getCollisionShape()->setMargin(0.1);
|
||||
psb->setTotalMass(1);
|
||||
// psb->scale(btVector3(5, 5, 5));
|
||||
// psb->translate(btVector3(-2.5, 4, -2.5));
|
||||
// psb->getCollisionShape()->setMargin(0.1);
|
||||
// psb->setTotalMass(1);
|
||||
psb->setSpringStiffness(2);
|
||||
psb->setDampingCoefficient(0.02);
|
||||
psb->m_cfg.kKHR = 1; // collision hardness with kinematic objects
|
||||
psb->m_cfg.kCHR = 1; // collision hardness with rigid body
|
||||
psb->m_cfg.kDF = 2;
|
||||
psb->m_cfg.collisions = btSoftBody::fCollision::SDF_RD;
|
||||
getDeformableDynamicsWorld()->addSoftBody(psb);
|
||||
getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce());
|
||||
getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce(2, 0.02));
|
||||
getDeformableDynamicsWorld()->addForce(psb, new btDeformableGravityForce(gravity));
|
||||
// add a grippers
|
||||
createGrip();
|
||||
|
||||
Reference in New Issue
Block a user