Skip to content

Commit 42a5613

Browse files
committed
Fix more signs and comments in test
Signed-off-by: Steve Peters <[email protected]>
1 parent 7bd1556 commit 42a5613

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dartsim/src/JointFeatures_TEST.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ TEST_F(JointTransmittedWrenchFixture, JointLosses)
13421342
}
13431343
}
13441344

1345-
// Check that the transmitted wrench is affected contact forces
1345+
// Check that the transmitted wrench is affected by contact forces
13461346
TEST_F(JointTransmittedWrenchFixture, ContactForces)
13471347
{
13481348
auto box = this->world->GetModel("box");
@@ -1373,14 +1373,14 @@ TEST_F(JointTransmittedWrenchFixture, ContactForces)
13731373
// Fp_z = √(Fn² + Ft²) // Since all of the reaction force is in the world's
13741374
// z-axis
13751375
//
1376-
// ∑M_b = 0 = Fp * sin(θ) * (2*r) - m₁*g*sin(θ)*r - m₂*g*sin(θ)*(2*r)
1376+
// ∑M_b = 0 = -Fp_z * sin(θ) * (2*r) + m₁*g*sin(θ)*r + m₂*g*sin(θ)*(2*r)
13771377
//
1378-
// Fp_z = 0.5 * g * ((m₁ + 2*m₂))
1378+
// Fp_z = 0.5 * g * (m₁ + 2*m₂)
13791379
//
13801380
// We can then compute the tangential (Ft) and normal (Fn) components as
13811381
//
1382-
// Ft = Fp_z * sin(θ)
1383-
// Fn = Fp_z * cos(θ)
1382+
// Ft = Fp_z * sin(θ)
1383+
// Fn = -Fp_z * cos(θ)
13841384

13851385
const double reactionForceAtP =
13861386
0.5 * kGravity * (kArmLinkMass + 2 * kSensorLinkMass);

0 commit comments

Comments
 (0)