64 using namespace gtsam;
66 int main(
int argc,
char** argv) {
76 auto model = noiseModel::Diagonal::Sigmas(
Vector3(0.2, 0.2, 0.1));
90 graph.
print(
"\nFactor Graph:\n");
99 initialEstimate.
insert(5,
Pose2(2.1, 2.1, -M_PI_2));
100 initialEstimate.
print(
"\nInitial Estimate:\n");
116 result.
print(
"Final Result:\n");
virtual const Values & optimize()
A non-templated config holding any types of Manifold-group elements.
Factor Graph consisting of non-linear factors.
noiseModel::Diagonal::shared_ptr model
void insert(Key j, const Value &val)
NonlinearFactorGraph graph
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
double relativeErrorTol
The maximum relative error decrease to stop iterating (default 1e-5)
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&...args)
Emplace a shared pointer to factor of given type.
int main(int argc, char **argv)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static ConjugateGradientParameters parameters
void print(const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
void print(const std::string &str="NonlinearFactorGraph: ", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Matrix marginalCovariance(Key variable) const
A class for computing marginals in a NonlinearFactorGraph.
noiseModel::Diagonal::shared_ptr priorNoise
Marginals marginals(graph, result)
size_t maxIterations
The maximum iterations to stop iterating (default 100)