50 std::shared_ptr<JacobianFactor> whitenedJacobian_;
59 std::optional<double> gamma = {})
62 throw std::invalid_argument(
"ShonanGaugeFactor must have p>=d.");
66 size_t P = SOn::Dimension(p);
67 rows_ = SOn::Dimension(q);
77 double invSigma = gamma ? std::sqrt(*gamma) : 1.0;
78 size_t i = 0, j = 0, n = p - 1 - d;
80 A.block(i, j, n, n) = invSigma * Matrix::Identity(n, n);
87 std::make_shared<JacobianFactor>(key, A, Vector::Zero(rows_));
97 size_t dim()
const override {
return rows_; }
101 return whitenedJacobian_;
double error(const Values &c) const override
Calculate the error of the factor: always zero.
Definition: ShonanGaugeFactor.h:94
ShonanGaugeFactor(Key key, size_t p, size_t d=3, std::optional< double > gamma={})
Definition: ShonanGaugeFactor.h:58
Definition: NonlinearFactor.h:68
std::shared_ptr< GaussianFactor > linearize(const Values &c) const override
linearize to a GaussianFactor
Definition: ShonanGaugeFactor.h:100
~ShonanGaugeFactor() override
Destructor.
Definition: ShonanGaugeFactor.h:91
Definition: chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
Non-linear factor base classes.
Definition: ShonanGaugeFactor.h:45
N*N matrix representation of SO(N). N can be Eigen::Dynamic.
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
size_t dim() const override
get the dimension of the factor (number of rows on linearization)
Definition: ShonanGaugeFactor.h:97