From 513bbb43ed05eec5ee8621494f3faa166164a700 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sat, 26 Apr 2025 22:40:03 -0400 Subject: [PATCH] Fix FindKarcherMean tests --- python/gtsam/tests/test_KarcherMeanFactor.py | 6 +++--- python/gtsam/tests/test_backwards_compatibility.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/gtsam/tests/test_KarcherMeanFactor.py b/python/gtsam/tests/test_KarcherMeanFactor.py index 0bc942341..c7154fd18 100644 --- a/python/gtsam/tests/test_KarcherMeanFactor.py +++ b/python/gtsam/tests/test_KarcherMeanFactor.py @@ -35,7 +35,7 @@ class TestKarcherMean(GtsamTestCase): """ rotations = [R, R.inverse()] expected = Rot3() - actual = gtsam.FindKarcherMean(rotations) + actual = gtsam.FindKarcherMeanRot3(rotations) self.gtsamAssertEquals(expected, actual) def test_find_karcher_mean_identity(self): @@ -47,7 +47,7 @@ class TestKarcherMean(GtsamTestCase): aRb_list = [a1Rb1, a2Rb2, a3Rb3] aRb_expected = Rot3() - aRb = gtsam.FindKarcherMean(aRb_list) + aRb = gtsam.FindKarcherMeanRot3(aRb_list) self.gtsamAssertEquals(aRb, aRb_expected) def test_factor(self): @@ -69,7 +69,7 @@ class TestKarcherMean(GtsamTestCase): expected = Rot3() result = gtsam.GaussNewtonOptimizer(graph, initial).optimize() - actual = gtsam.FindKarcherMean([result.atRot3(1), result.atRot3(2)]) + actual = gtsam.FindKarcherMeanRot3([result.atRot3(1), result.atRot3(2)]) self.gtsamAssertEquals(expected, actual) self.gtsamAssertEquals(R12, result.atRot3(1).between(result.atRot3(2))) diff --git a/python/gtsam/tests/test_backwards_compatibility.py b/python/gtsam/tests/test_backwards_compatibility.py index c64be37a7..c6c7eadca 100644 --- a/python/gtsam/tests/test_backwards_compatibility.py +++ b/python/gtsam/tests/test_backwards_compatibility.py @@ -315,7 +315,7 @@ class TestBackwardsCompatibility(GtsamTestCase): rotations = gtsam.Rot3Vector([R, R.inverse()]) expected = Rot3() - actual = gtsam.FindKarcherMean(rotations) + actual = gtsam.FindKarcherMeanRot3(rotations) self.gtsamAssertEquals(expected, actual) def test_find_karcher_mean_identity(self): @@ -327,7 +327,7 @@ class TestBackwardsCompatibility(GtsamTestCase): aRb_list = gtsam.Rot3Vector([a1Rb1, a2Rb2, a3Rb3]) aRb_expected = Rot3() - aRb = gtsam.FindKarcherMean(aRb_list) + aRb = gtsam.FindKarcherMeanRot3(aRb_list) self.gtsamAssertEquals(aRb, aRb_expected) def test_factor(self): @@ -354,7 +354,7 @@ class TestBackwardsCompatibility(GtsamTestCase): expected = Rot3() result = gtsam.GaussNewtonOptimizer(graph, initial).optimize() - actual = gtsam.FindKarcherMean( + actual = gtsam.FindKarcherMeanRot3( gtsam.Rot3Vector([result.atRot3(1), result.atRot3(2)])) self.gtsamAssertEquals(expected, actual)