From 68327a193643a18c2dd414e95fe0ca37200c46b5 Mon Sep 17 00:00:00 2001 From: Dan McGann Date: Tue, 4 Mar 2025 18:05:42 -0500 Subject: [PATCH] Update test bearingPose3toPose3 Update this unit test to actually test the pose3 to pose3 function and jacobians. --- gtsam/geometry/tests/testPose3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtsam/geometry/tests/testPose3.cpp b/gtsam/geometry/tests/testPose3.cpp index 0e83dc2b7..f3ad34b98 100644 --- a/gtsam/geometry/tests/testPose3.cpp +++ b/gtsam/geometry/tests/testPose3.cpp @@ -769,8 +769,9 @@ TEST(Pose3, PoseToPoseBearing) { EXPECT(assert_equal(Unit3(0,1,0), xl1.bearing(xl2, actualH1, actualH2), 1e-9)); // Check numerical derivatives - expectedH1 = numericalDerivative21(bearing_proxy, xl1, l2); - H2block = numericalDerivative22(bearing_proxy, xl1, l2); + std::function f = [](const Pose3& a, const Pose3& b) { return a.bearing(b); }; + expectedH1 = numericalDerivative21(f, xl1, xl2); + expectedH2 = numericalDerivative22(f, xl1, xl2); EXPECT(assert_equal(expectedH1, actualH1, 1e-5)); EXPECT(assert_equal(expectedH2, actualH2, 1e-5)); }