start python unit test for align()

release/4.3a0
John Lambert 2021-08-31 06:26:52 -06:00 committed by GitHub
parent 50f3b93324
commit cff3c5b4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -6,7 +6,7 @@ All Rights Reserved
See LICENSE for the license information See LICENSE for the license information
Pose2 unit tests. Pose2 unit tests.
Author: Frank Dellaert & Duy Nguyen Ta (Python) Author: Frank Dellaert & Duy Nguyen Ta & John Lambert
""" """
import unittest import unittest
@ -20,13 +20,20 @@ from gtsam.utils.test_case import GtsamTestCase
class TestPose2(GtsamTestCase): class TestPose2(GtsamTestCase):
"""Test selected Pose2 methods.""" """Test selected Pose2 methods."""
def test_adjoint(self): def test_adjoint(self) -> None:
"""Test adjoint method.""" """Test adjoint method."""
xi = np.array([1, 2, 3]) xi = np.array([1, 2, 3])
expected = np.dot(Pose2.adjointMap_(xi), xi) expected = np.dot(Pose2.adjointMap_(xi), xi)
actual = Pose2.adjoint_(xi, xi) actual = Pose2.adjoint_(xi, xi)
np.testing.assert_array_equal(actual, expected) np.testing.assert_array_equal(actual, expected)
def test_align(self) -> None:
"""Ensure estimation of the Pose2 element to align two 2d point clouds succeeds.
"""
pass
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()