gtsam  4.1.0
gtsam::TranslationRecovery Class Reference

Public Member Functions

 TranslationRecovery (const TranslationEdges &relativeTranslations, const LevenbergMarquardtParams &lmParams=LevenbergMarquardtParams())
 Construct a new Translation Recovery object. More...
NonlinearFactorGraph buildGraph () const
 Build the factor graph to do the optimization. More...
void addPrior (const double scale, NonlinearFactorGraph *graph, const SharedNoiseModel &priorNoiseModel=noiseModel::Isotropic::Sigma(3, 0.01)) const
 Add priors on ednpoints of first measurement edge. More...
Values initalizeRandomly () const
 Create random initial translations. More...
Values run (const double scale=1.0) const
 Build and optimize factor graph. More...

Static Public Member Functions

static TranslationEdges SimulateMeasurements (const Values &poses, const std::vector< KeyPair > &edges)
 Simulate translation direction measurements. More...

Public Types

using KeyPair = std::pair< Key, Key >
using TranslationEdges = std::vector< BinaryMeasurement< Unit3 > >

Constructor & Destructor Documentation

◆ TranslationRecovery()

gtsam::TranslationRecovery::TranslationRecovery ( const TranslationEdges &  relativeTranslations,
const LevenbergMarquardtParams lmParams = LevenbergMarquardtParams() 

Construct a new Translation Recovery object.

relativeTranslationsthe relative translations, in world coordinate frames, vector of BinaryMeasurements of Unit3, where each key of a measurement is a point in 3D.
lmParams(optional) gtsam::LavenbergMarquardtParams that can be used to modify the parameters for the LM optimizer. By default, uses the default LM parameters.

Member Function Documentation

◆ addPrior()

void TranslationRecovery::addPrior ( const double  scale,
NonlinearFactorGraph graph,
const SharedNoiseModel priorNoiseModel = noiseModel::Isotropic::Sigma(3, 0.01) 
) const

Add priors on ednpoints of first measurement edge.

scalescale for first relative translation which fixes gauge.
graphfactor graph to which prior is added.
priorNoiseModelthe noise model to use with the prior.

◆ buildGraph()

NonlinearFactorGraph TranslationRecovery::buildGraph ( ) const

Build the factor graph to do the optimization.


◆ initalizeRandomly()

Values TranslationRecovery::initalizeRandomly ( ) const

Create random initial translations.


◆ run()

Values TranslationRecovery::run ( const double  scale = 1.0) const

Build and optimize factor graph.

scalescale for first relative translation which fixes gauge.

◆ SimulateMeasurements()

TranslationRecovery::TranslationEdges TranslationRecovery::SimulateMeasurements ( const Values poses,
const std::vector< KeyPair > &  edges 

Simulate translation direction measurements.

posesSE(3) ground truth poses stored as Values
edgespairs (a,b) for which a measurement w_aZb will be generated.
TranslationEdges vector of binary measurements where the keys are the cameras and the measurement is the simulated Unit3 translation direction between the cameras.

The documentation for this class was generated from the following files: