2 GTSAM Copyright 2010-2018, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 5 Authors: Frank Dellaert, et al. (see THANKS for the full author list) 7 See LICENSE for the license information 9 Simple robot motion example, with prior and two odometry measurements 10 Author: Frank Dellaert 14 from __future__
import print_function
20 import matplotlib.pyplot
as plt
33 graph.add(gtsam.PriorFactorPose2(1, priorMean, PRIOR_NOISE))
39 graph.add(gtsam.BetweenFactorPose2(1, 2, odometry, ODOMETRY_NOISE))
40 graph.add(gtsam.BetweenFactorPose2(2, 3, odometry, ODOMETRY_NOISE))
41 print(
"\nFactor Graph:\n{}".format(graph))
49 print(
"\nInitial Estimate:\n{}".format(initial))
54 result = optimizer.optimize()
55 print(
"\nFinal Result:\n{}".format(result))
60 print(
"X{} covariance:\n{}\n".format(i, marginals.marginalCovariance(i)))
64 gtsam_plot.plot_pose2(0, result.atPose2(i), 0.5, marginals.marginalCovariance(i))
void print(const Matrix &A, const string &s, ostream &stream)
static shared_ptr Sigmas(const Vector &sigmas, bool smart=true)