29 template <
class T,
class ALLOC>
34 static const Key kKey(0);
35 for (
const auto&
R : rotations) {
39 initial.insert<
T>(kKey,
T());
41 return result.at<
T>(kKey);
60 template <
typename CONTAINER>
62 std::optional<double> beta)
65 throw std::invalid_argument(
66 "KarcherMeanFactor needs dimension for dynamic types.");
70 Matrix A = Matrix::Identity(d, d);
72 std::map<Key, Matrix> terms;
77 std::make_shared<JacobianFactor>(terms, Vector::Zero(d));
virtual const Values & optimize()
Factor Graph consisting of non-linear factors.
Rot2 R(Rot2::fromAngle(0.1))
T FindKarcherMeanImpl(const vector< T, ALLOC > &rotations)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
NonlinearFactorGraph graph
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
STL compatible allocator to use with types requiring a non standrad alignment.
Eigen::Triplet< double > T
T FindKarcherMean(std::initializer_list< T > &&rotations)
Jet< T, N > sqrt(const Jet< T, N > &f)
std::uint64_t Key
Integer nonlinear key type.
std::shared_ptr< JacobianFactor > whitenedJacobian_
Constant Jacobian made of d*d identity matrices.