2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 9 Author: Frank Dellaert & Varun Agrawal (Python) 19 Tests python binding for classes/functions in `sam.i`. 23 Test that `measured` works as expected for RangeFactor2D. 26 factor = gtsam.RangeFactor2D(1, 2, measurement,
28 self.assertEqual(measurement, factor.measured())
32 Test that `measured` works as expected for BearingFactor2D. 35 factor = gtsam.BearingFactor2D(1, 2, measurement,
41 Test that `measured` works as expected for BearingRangeFactor2D. 43 range_measurement = 10.0
45 factor = gtsam.BearingRangeFactor2D(
46 1, 2, bearing_measurement, range_measurement,
48 measurement = factor.measured()
50 self.assertEqual(range_measurement, measurement.range())
55 Test that `measured` works as expected for BearingRangeFactor3D. 58 range_measurement = 10.0
59 factor = gtsam.BearingRangeFactor3D(
60 1, 2, bearing_measurement, range_measurement,
62 measurement = factor.measured()
64 self.assertEqual(range_measurement, measurement.range())
69 Test that `measured` works as expected for BearingRangeFactorPose3. 71 range_measurement = 10.0
73 factor = gtsam.BearingRangeFactorPose3(
74 1, 2, bearing_measurement, range_measurement,
76 measurement = factor.measured()
78 self.assertEqual(range_measurement, measurement.range())
82 if __name__ ==
"__main__":
def test_BearingRangeFactorPose3(self)
def gtsamAssertEquals(self, actual, expected, tol=1e-9)
def test_BearingFactor2D(self)
Represents a 3D point on a unit sphere.
def test_BearingRangeFactor2D(self)
def test_BearingRangeFactor3D(self)
def test_RangeFactor2D(self)
static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)