2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 visual_isam unit tests. 9 Author: Frank Dellaert & Duy Nguyen Ta (Python) 15 from gtsam
import symbol
20 """Test class for ISAM2 with visual landmarks.""" 22 """Test to see if ISAM works as expected for a simple visual SLAM example.""" 24 options = generator.Options()
25 options.triangle =
False 26 options.nrCameras = 20
29 isamOptions = visual_isam.Options()
30 isamOptions.hardConstraint =
False 31 isamOptions.pointPriors =
False 32 isamOptions.batchInitialization =
True 33 isamOptions.reorderInterval = 10
34 isamOptions.alwaysRelinearize =
False 37 data, truth = generator.generate_data(options)
40 isam, result, nextPose = visual_isam.initialize(
41 data, truth, isamOptions)
44 for currentPose
in range(nextPose, options.nrCameras):
45 isam, result = visual_isam.step(data, isam, result, truth,
48 for i, _
in enumerate(truth.cameras):
49 pose_i = result.atPose3(
symbol(
'x', i))
52 for j, _
in enumerate(truth.points):
53 point_j = result.atPoint3(
symbol(
'l', j))
57 if __name__ ==
"__main__":
def gtsamAssertEquals(self, actual, expected, tol=1e-9)
Key symbol(unsigned char c, std::uint64_t j)
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
Double_ range(const Point2_ &p, const Point2_ &q)
def test_VisualISAMExample(self)