From d0a6e507210cb17f39a4d615fcdf75adfeda4838 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 8 Apr 2024 20:34:20 +0000 Subject: [PATCH] backport bullet-featherstone solver iters Signed-off-by: Ian Chen --- bullet-featherstone/src/Base.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bullet-featherstone/src/Base.cc b/bullet-featherstone/src/Base.cc index d03794932..66f713223 100644 --- a/bullet-featherstone/src/Base.cc +++ b/bullet-featherstone/src/Base.cc @@ -45,10 +45,15 @@ WorldInfo::WorldInfo(std::string name_) // By default a large impulse is applied when collisions penetrate // which causes unstable behavior. Bullet featherstone does not support - // configuring split impulse and penetration threshold parameters. Instead the - // penentration impulse depends on the erp2 parameter so set to a small value - // (default is 0.2). + // configuring split impulse and penetration threshold parameters. Instead + // the penentration impulse depends on the erp2 parameter so set to a small + // value (default in bullet is 0.2). this->world->getSolverInfo().m_erp2 = btScalar(0.002); + + // Set solver iterations to the same as the default value in SDF, + // //world/physics/solver/bullet/iters + // (default in bullet is 10) + this->world->getSolverInfo().m_numIterations = 50u; } } // namespace bullet_featherstone