gtsam  4.0.0
gtsam
gtsam::ConcurrentIncrementalSmoother Class Reference

Detailed Description

A Levenberg-Marquardt Batch Smoother that implements the Concurrent Filtering and Smoother interface.

+ Inheritance diagram for gtsam::ConcurrentIncrementalSmoother:

Public Member Functions

 ConcurrentIncrementalSmoother (const ISAM2Params &parameters=ISAM2Params())
 Default constructor.
 
virtual ~ConcurrentIncrementalSmoother ()
 Default destructor.
 
virtual void print (const std::string &s="Concurrent Incremental Smoother:\n", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Implement a GTSAM standard 'print' function.
 
virtual bool equals (const ConcurrentSmoother &rhs, double tol=1e-9) const
 Check if two Concurrent Smoothers are equal.
 
const NonlinearFactorGraphgetFactors () const
 Access the current set of factors.
 
const ValuesgetLinearizationPoint () const
 Access the current linearization point.
 
const VectorValuesgetDelta () const
 Access the current set of deltas to the linearization point.
 
Values calculateEstimate () const
 Compute the current best estimate of all variables and return a full Values structure. More...
 
template<class VALUE >
VALUE calculateEstimate (Key key) const
 Compute the current best estimate of a single variable. More...
 
Result update (const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const boost::optional< FactorIndices > &removeFactorIndices=boost::none)
 Add new factors and variables to the smoother. More...
 
virtual void presync ()
 Perform any required operations before the synchronization process starts. More...
 
virtual void getSummarizedFactors (NonlinearFactorGraph &summarizedFactors, Values &separatorValues)
 Populate the provided containers with factors that constitute the smoother branch summarization needed by the filter. More...
 
virtual void synchronize (const NonlinearFactorGraph &smootherFactors, const Values &smootherValues, const NonlinearFactorGraph &summarizedFactors, const Values &separatorValues)
 Apply the new smoother factors sent by the filter, and the updated version of the filter branch summarized factors. More...
 
virtual void postsync ()
 Perform any required operations after the synchronization process finishes. More...
 
- Public Member Functions inherited from gtsam::ConcurrentSmoother
 ConcurrentSmoother ()
 Default constructor.
 
virtual ~ConcurrentSmoother ()
 Default destructor.
 

Public Types

typedef boost::shared_ptr< ConcurrentIncrementalSmoothershared_ptr
 
typedef ConcurrentSmoother Base
 typedef for base class
 
- Public Types inherited from gtsam::ConcurrentSmoother
typedef boost::shared_ptr< ConcurrentSmoothershared_ptr
 

Classes

struct  Result
 Meta information returned about the update. More...
 

Protected Attributes

ISAM2 isam2_
 iSAM2 inference engine
 
NonlinearFactorGraph smootherFactors_
 New factors to be added to the smoother during the next update.
 
Values smootherValues_
 New variables to be added to the smoother during the next update.
 
NonlinearFactorGraph filterSummarizationFactors_
 New filter summarization factors to replace the existing filter summarization during the next update.
 
Values separatorValues_
 The linearization points of the separator variables. These should not be changed during optimization.
 
FactorIndices filterSummarizationSlots_
 The slots in factor graph that correspond to the current filter summarization factors.
 
bool synchronizationUpdatesAvailable_
 Flag indicating the currently stored synchronization updates have not been applied yet.
 
NonlinearFactorGraph smootherSummarization_
 A temporary holding place for calculated smoother summarization.
 

Member Function Documentation

◆ calculateEstimate() [1/2]

Values gtsam::ConcurrentIncrementalSmoother::calculateEstimate ( ) const
inline

Compute the current best estimate of all variables and return a full Values structure.

If only a single variable is needed, it may be faster to call calculateEstimate(const KEY&).

◆ calculateEstimate() [2/2]

template<class VALUE >
VALUE gtsam::ConcurrentIncrementalSmoother::calculateEstimate ( Key  key) const
inline

Compute the current best estimate of a single variable.

This is generally faster than calling the no-argument version of calculateEstimate if only specific variables are needed.

Parameters
key
Returns

◆ getSummarizedFactors()

void gtsam::ConcurrentIncrementalSmoother::getSummarizedFactors ( NonlinearFactorGraph summarizedFactors,
Values separatorValues 
)
virtual

Populate the provided containers with factors that constitute the smoother branch summarization needed by the filter.

Parameters
summarizedFactorsThe summarized factors for the filter branch

Implements gtsam::ConcurrentSmoother.

◆ postsync()

void gtsam::ConcurrentIncrementalSmoother::postsync ( )
virtual

Perform any required operations after the synchronization process finishes.

Called by 'synchronize'

Reimplemented from gtsam::ConcurrentSmoother.

◆ presync()

void gtsam::ConcurrentIncrementalSmoother::presync ( )
virtual

Perform any required operations before the synchronization process starts.

Called by 'synchronize'

Reimplemented from gtsam::ConcurrentSmoother.

◆ synchronize()

void gtsam::ConcurrentIncrementalSmoother::synchronize ( const NonlinearFactorGraph smootherFactors,
const Values smootherValues,
const NonlinearFactorGraph summarizedFactors,
const Values separatorValues 
)
virtual

Apply the new smoother factors sent by the filter, and the updated version of the filter branch summarized factors.

Parameters
smootherFactorsA set of new factors added to the smoother from the filter
smootherValuesLinearization points for any new variables
summarizedFactorsAn updated version of the filter branch summarized factors
rootValuesThe linearization point of the root variables

Implements gtsam::ConcurrentSmoother.

◆ update()

ConcurrentIncrementalSmoother::Result gtsam::ConcurrentIncrementalSmoother::update ( const NonlinearFactorGraph newFactors = NonlinearFactorGraph(),
const Values newTheta = Values(),
const boost::optional< FactorIndices > &  removeFactorIndices = boost::none 
)

Add new factors and variables to the smoother.

Add new measurements, and optionally new variables, to the smoother. This runs a full step of the ISAM2 algorithm, relinearizing and updating the solution as needed, according to the wildfire and relinearize thresholds.

Parameters
newFactorsThe new factors to be added to the smoother
newThetaInitialization points for new variables to be added to the smoother You must include here all new variables occuring in newFactors (which were not already in the smoother). There must not be any variables here that do not occur in newFactors, and additionally, variables that were already in the system must not be included here.

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