28 template <
class T,
class ALLOC>
33 static const Key kKey(0);
34 for (
const auto&
R : rotations) {
38 initial.insert<
T>(kKey,
T());
40 return result.at<
T>(kKey);
60 template <
typename CONTAINER>
62 boost::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 boost::make_shared<JacobianFactor>(terms, Vector::Zero(d));
boost::shared_ptr< JacobianFactor > whitenedJacobian_
Constant Jacobian made of d*d identity matrices.
virtual const Values & optimize()
Factor Graph consisting of non-linear factors.
Rot2 R(Rot2::fromAngle(0.1))
T FindKarcherMeanImpl(const vector< T, ALLOC > &rotations)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
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)
std::uint64_t Key
Integer nonlinear key type.