Fix FrobeniusWormholeFactor Python test

release/4.3a0
Fan Jiang 2020-07-06 23:36:17 -04:00
parent 6d5706049d
commit 683e37f148
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ Author: Frank Dellaert
import unittest import unittest
import numpy as np import numpy as np
from gtsam import (SO3, SO4, FrobeniusBetweenFactorSO4, FrobeniusFactorSO4, from gtsam import (Rot3, SO3, SO4, FrobeniusBetweenFactorSO4, FrobeniusFactorSO4,
FrobeniusWormholeFactor, SOn) FrobeniusWormholeFactor, SOn)
id = SO4() id = SO4()
@ -43,7 +43,7 @@ class TestFrobeniusFactorSO4(unittest.TestCase):
"""Test creation of a factor that calculates Shonan error.""" """Test creation of a factor that calculates Shonan error."""
R1 = SO3.Expmap(v1[3:]) R1 = SO3.Expmap(v1[3:])
R2 = SO3.Expmap(v2[3:]) R2 = SO3.Expmap(v2[3:])
factor = FrobeniusWormholeFactor(1, 2, R1.between(R2), p=4) factor = FrobeniusWormholeFactor(1, 2, Rot3(R1.between(R2).matrix()), p=4)
I4 = SOn(4) I4 = SOn(4)
Q1 = I4.retract(v1) Q1 = I4.retract(v1)
Q2 = I4.retract(v2) Q2 = I4.retract(v2)