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");
Matrix marginalCovariance(Key variable) const
virtual const Values & optimize()
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
A non-templated config holding any types of Manifold-group elements.
Factor Graph consisting of non-linear factors.
noiseModel::Diagonal::shared_ptr model
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)
void print(const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
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="NonlinearFactorGraph: ", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
void insert(Key j, const Value &val)
A class for computing marginals in a NonlinearFactorGraph.
Marginals marginals(graph, result)
size_t maxIterations
The maximum iterations to stop iterating (default 100)