2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 PriorFactor unit tests. 9 Author: Frank Dellaert & Duy Nguyen Ta (Python) 27 factor = gtsam.PriorFactorPose3(key, priorPose3, model)
28 values.insert(key, priorPose3)
29 self.assertEqual(factor.error(values), 0)
32 priorVector = np.array([0., 0., 0.])
34 factor = gtsam.PriorFactorVector(key, priorVector, model)
35 values.insert(key, priorVector)
36 self.assertEqual(factor.error(values), 0)
40 Test adding prior factors directly to factor graph via the .addPrior method. 49 graph.addPriorPose3(key, priorPose3, model)
50 self.assertEqual(graph.size(), 1)
54 priorVector = np.array([0., 0., 0.])
56 graph.addPriorVector(key, priorVector, model)
57 self.assertEqual(graph.size(), 2)
60 if __name__ ==
"__main__":
static shared_ptr Create(size_t dim)
def test_PriorFactor(self)