70 : lmParams_(lmParams) {}
174 const Values &poses,
const std::vector<KeyPair> &
edges);
vector< MFAS::KeyPair > edges
Values initializeRandomly(const std::vector< BinaryMeasurement< Unit3 >> &relativeTranslations, const std::vector< BinaryMeasurement< Point3 >> &betweenTranslations, std::mt19937 *rng, const Values &initialValues=Values()) const
Create random initial translations.
A non-templated config holding any types of Manifold-group elements.
std::vector< BinaryMeasurement< Unit3 > > TranslationEdges
Values run(const TranslationEdges &relativeTranslations, const double scale=1.0, const std::vector< BinaryMeasurement< Point3 >> &betweenTranslations={}, const Values &initialValues=Values()) const
Build and optimize factor graph.
LevenbergMarquardtParams lmParams_
NonlinearFactorGraph graph
static TranslationEdges SimulateMeasurements(const Values &poses, const std::vector< KeyPair > &edges)
Simulate translation direction measurements.
TranslationRecovery(const LevenbergMarquardtParams &lmParams)
Construct a new Translation Recovery object.
void addPrior(const std::vector< BinaryMeasurement< Unit3 >> &relativeTranslations, const double scale, const std::vector< BinaryMeasurement< Point3 >> &betweenTranslations, NonlinearFactorGraph *graph, const SharedNoiseModel &priorNoiseModel=noiseModel::Isotropic::Sigma(3, 0.01)) const
Add 3 factors to the graph:
LevenbergMarquardtParams lmParams
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
NonlinearFactorGraph buildGraph(const std::vector< BinaryMeasurement< Unit3 >> &relativeTranslations) const
Build the factor graph to do the optimization.
std::vector< float > Values
static double scale(double x, double a, double b, double t1, double t2)
Scale x from [a, b] to [t1, t2].
std::pair< Key, Key > KeyPair
Binary measurement represents a measurement between two keys in a graph. A binary measurement is simi...
TranslationEdges relativeTranslations_
noiseModel::Base::shared_ptr SharedNoiseModel
TranslationRecovery()=default
Default constructor.
static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)