Skip to content

Commit

Permalink
Apply #1774 to main (7.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Dec 19, 2023
1 parent 5d68310 commit cf15489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dart/dynamics/JointConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void JointConstraint::update()
// the position error.

const double C1 = mErrorAllowance * A1;
double bouncing_vel = -std::max(B1, C1) / timeStep;
double bouncing_vel = -std::min(B1, C1) / timeStep;
assert(bouncing_vel >= 0);
bouncing_vel = std::min(bouncing_vel, mMaxErrorReductionVelocity);

Expand Down Expand Up @@ -268,7 +268,7 @@ void JointConstraint::update()
// the position error.

const double C2 = mErrorAllowance * A2;
double bouncing_vel = -std::min(B2, C2) / timeStep;
double bouncing_vel = -std::max(B2, C2) / timeStep;
assert(bouncing_vel <= 0);
bouncing_vel = std::max(bouncing_vel, -mMaxErrorReductionVelocity);

Expand Down

0 comments on commit cf15489

Please sign in to comment.