Skip to content

Commit

Permalink
import align from gtsam directly
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwlambert authored Aug 31, 2021
1 parent 5c737c3 commit 3fc7692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/gtsam/tests/test_Pose2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import numpy as np

import gtsam
from gtsam import Point2, Point2Pairs, Pose2
from gtsam import align, Point2, Point2Pairs, Pose2

This comment has been minimized.

Copy link
@dellaert

dellaert Aug 31, 2021

Member

Only import classes. Use gtsam.align below

This comment has been minimized.

Copy link
@johnwlambert

johnwlambert Aug 31, 2021

Author Contributor

Hi @dellaert , definitely agreed. Should we think about making this a static member of Pose2, like we did for Similarity3?

https://github.com/borglab/gtsam/blob/develop/gtsam/geometry/Similarity3.h#L126

I think align() might be too ambiguous in the global namespace

This comment has been minimized.

Copy link
@dellaert

dellaert Aug 31, 2021

Member

We could, but it would not be backwards compatible. Other PR.

from gtsam.utils.test_case import GtsamTestCase


Expand Down Expand Up @@ -58,7 +58,7 @@ def test_align(self) -> None:

# fmt: on
ab_pairs = Point2Pairs(list(zip(pts_a, pts_b)))
bTa = Pose2.align(ab_pairs)
bTa = align(ab_pairs)
aTb = bTa.inverse()
assert aTb is not None

Expand Down

0 comments on commit 3fc7692

Please sign in to comment.