Skip to content

Commit

Permalink
Merge pull request #240 from Ipuch/master
Browse files Browse the repository at this point in the history
SoftContact torque applied in world frame.
  • Loading branch information
pariterre authored Oct 22, 2021
2 parents 5b59f72 + 9cd690a commit b8d14d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/RigidBody/SoftContactNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ RigidBodyDynamics::Math::SpatialVector rigidbody::SoftContactNode::computeForceA

// Find the application point of the force
RigidBodyDynamics::Math::SpatialVector out(0, 0, 0, 0, 0, 0);
out.block(0, 0, 3, 1) = force.cross(CoMinGlobal - applicationPoint(x));
out.block(0, 0, 3, 1) = force.cross(- applicationPoint(x));
out.block(3, 0, 3, 1) = force;
return out;
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_rigidbody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ TEST(SoftContacts, ForceAtCoM){

RigidBodyDynamics::Math::SpatialVector force = sphere.computeForceAtCom(model, Q, QDot);

std::vector<double> forceExpected = {847.90514495586694, -529.16654948198982, 694.87983562160457,
std::vector<double> forceExpected = {-169.49529328017607, 835.69754838406357, -2.2059677321320312,
-275.74596651650978, -55.149193303301956, 294.47295042042418};
for (unsigned int i = 0; i < 6; ++i) {
SCALAR_TO_DOUBLE(f, force(i));
Expand Down

0 comments on commit b8d14d3

Please sign in to comment.