Comments from Jim Roseborough.

1. Fix the tolerance on the rotation matrix conversion test.
2. Fix some out of date comments.

Change-Id: I65e80da1f96d7b4d9ac0630ad8cb708c41739840
This commit is contained in:
Sameer Agarwal
2013-10-28 19:38:08 -07:00
parent fda69b5213
commit c6bafdd02c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -417,7 +417,7 @@ void AngleAxisToRotationMatrix(
R(1, 2) = -wx*sintheta + wy*wz*(kOne - costheta);
R(2, 2) = costheta + wz*wz*(kOne - costheta);
} else {
// At zero, we switch to using the first order Taylor expansion.
// Near zero, we switch to using the first order Taylor expansion.
R(0, 0) = kOne;
R(1, 0) = angle_axis[2];
R(2, 0) = -angle_axis[1];
@@ -625,7 +625,7 @@ void AngleAxisRotatePoint(const T angle_axis[3], const T pt[3], T result[3]) {
// and actually performing multiplication with the point pt, gives us
// R * pt = pt + w x pt.
//
// Switching to the Taylor expansion at zero provides meaningful
// Switching to the Taylor expansion near zero provides meaningful
// derivatives when evaluated using Jets.
//
// Explicitly inlined evaluation of the cross product for
+1 -1
View File
@@ -576,7 +576,7 @@ TEST(Rotation, AngleAxisToRotationMatrixAndBackNearZero) {
RotationMatrixToAngleAxis(matrix, round_trip);
for (int i = 0; i < 3; ++i) {
EXPECT_NEAR(round_trip[i], axis_angle[i], kTolerance);
EXPECT_NEAR(round_trip[i], axis_angle[i], std::numeric_limits<double>::epsilon());
}
}
}