29 using namespace gtsam;
31 int main(
int argc,
char *argv[]) {
37 auto model = noiseModel::Diagonal::Sigmas((
Vector(3) << 0.05, 0.05, 5.0 *
M_PI / 180.0).finished());
42 auto noise = noiseModel::Diagonal::Sigmas((
Vector(3) << 0.5, 0.5, 15.0 *
M_PI / 180.0).finished());
49 noiseModel::Diagonal::Sigmas(
Vector3(1
e-6, 1
e-6, 1
e-8));
50 g->addPrior(0,
Pose2(), priorModel);
53 for (
size_t i = 0;
i < trials;
i++) {
const gtsam::Symbol key('X', 0)
Vector sample() const
sample from distribution
virtual const Values & optimize()
noiseModel::Diagonal::shared_ptr model
void g(const string &key, int i)
Initialize Pose2 in a factor graph using LAGO (Linear Approximation for Graph Optimization). see papers:
GraphAndValues load2D(const std::string &filename, SharedNoiseModel model, size_t maxIndex, bool addNoise, bool smart, NoiseFormat noiseFormat, KernelFunctionType kernelFunctionType)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
sampling from a NoiseModel
GTSAM_EXPORT std::string findExampleDataFile(const std::string &name)
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
void insert(Key j, const Value &val)
void tictoc_finishedIteration_()
std::shared_ptr< Diagonal > shared_ptr
int main(int argc, char *argv[])
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Values initialize(const NonlinearFactorGraph &graph, bool useOdometricPath)
utility functions for loading datasets