We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f2d607 commit f82833dCopy full SHA for f82833d
dart/constraint/JointConstraint.cpp
@@ -238,7 +238,7 @@ void JointConstraint::update()
238
// the position error.
239
240
const double C1 = mErrorAllowance * A1;
241
- double bouncing_vel = -std::max(B1, C1) / timeStep;
+ double bouncing_vel = -std::min(B1, C1) / timeStep;
242
assert(bouncing_vel >= 0);
243
bouncing_vel = std::min(bouncing_vel, mMaxErrorReductionVelocity);
244
@@ -280,7 +280,7 @@ void JointConstraint::update()
280
281
282
const double C2 = mErrorAllowance * A2;
283
- double bouncing_vel = -std::min(B2, C2) / timeStep;
+ double bouncing_vel = -std::max(B2, C2) / timeStep;
284
assert(bouncing_vel <= 0);
285
bouncing_vel = std::max(bouncing_vel, -mMaxErrorReductionVelocity);
286
0 commit comments