26 using namespace gtsam;
28 int main(
int argc,
char** argv) {
38 auto model = noiseModel::Diagonal::Sigmas(
Vector3(0.2, 0.2, 0.1));
52 initial.insert(1,
Pose2(0.5, 0.0, 0.2));
53 initial.insert(2,
Pose2(2.3, 0.1, -0.2));
54 initial.insert(3,
Pose2(4.1, 0.1, M_PI_2));
56 initial.insert(5,
Pose2(2.1, 2.1, -M_PI_2));
63 ofstream
os(
"Pose2SLAMExample.dot");
virtual const Values & optimize()
noiseModel::Diagonal::shared_ptr model
int main(int argc, char **argv)
NonlinearFactorGraph graph
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&...args)
Emplace a shared pointer to factor of given type.
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
void saveGraph(std::ostream &stm, const Values &values=Values(), const GraphvizFormatting &graphvizFormatting=GraphvizFormatting(), const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Write the graph in GraphViz format for visualization.
ofstream os("timeSchurFactors.csv")
noiseModel::Diagonal::shared_ptr priorNoise