61 using namespace gtsam;
63 int main(
int argc,
char** argv) {
88 graph.
print(
"\nFactor Graph:\n");
97 initialEstimate.
insert(5,
Pose2(2.1, 2.1, -M_PI_2));
98 initialEstimate.
print(
"\nInitial Estimate:\n");
114 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
int main(int argc, char **argv)
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
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.
std::shared_ptr< Diagonal > shared_ptr
Marginals marginals(graph, result)
size_t maxIterations
The maximum iterations to stop iterating (default 100)