mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user