2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 KarcherMeanFactor unit tests. 25 """Find the Karcher mean of given values.""" 30 graph.add(gtsam.PriorFactorRot3(KEY, R, MODEL))
34 return result.atRot3(KEY)
46 rotations = {R, R.inverse()}
52 """Check that the InnerConstraint factor leaves the mean unchanged.""" 59 R12 = R.compose(R.compose(R))
60 graph.add(gtsam.BetweenFactorRot3(1, 2, R12, MODEL))
64 graph.add(gtsam.KarcherMeanFactorRot3(keys))
67 initial.insert(1, R.inverse())
73 [result.atRot3(1), result.atRot3(2)])
76 R12, result.atRot3(1).
between(result.atRot3(2)))
79 if __name__ ==
"__main__":
T between(const T &t1, const T &t2)
def gtsamAssertEquals(self, actual, expected, tol=1e-9)
static shared_ptr Create(size_t dim)
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
static Rot3 Expmap(const Vector3 &v, OptionalJacobian< 3, 3 > H=boost::none)
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
def find_Karcher_mean_Rot3(rotations)