GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
gtsam::ConcurrentIncrementalFilter Class Reference

#include <ConcurrentIncrementalFilter.h>

Inheritance diagram for gtsam::ConcurrentIncrementalFilter:
Inheritance graph
[legend]
Collaboration diagram for gtsam::ConcurrentIncrementalFilter:
Collaboration graph
[legend]

Classes

struct  Result
 

Public Types

typedef std::shared_ptr< ConcurrentIncrementalFiltershared_ptr
 
typedef ConcurrentFilter Base
 typedef for base class
 

Public Member Functions

 ConcurrentIncrementalFilter (const ISAM2Params &parameters=ISAM2Params())
 
 ~ConcurrentIncrementalFilter () override
 
void print (const std::string &s="Concurrent Incremental Filter:\, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
bool equals (const ConcurrentFilter &rhs, double tol=1e-9) const override
 
const NonlinearFactorGraphgetFactors () const
 
const ISAM2getISAM2 () const
 
const ValuesgetLinearizationPoint () const
 
const VectorValuesgetDelta () const
 
Values calculateEstimate () const
 
template<class VALUE >
VALUE calculateEstimate (Key key) const
 
Result update (const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const std::optional< FastList< Key > > &keysToMove={}, const std::optional< FactorIndices > &removeFactorIndices={})
 
void presync () override
 
void getSummarizedFactors (NonlinearFactorGraph &filterSummarization, Values &filterSummarizationValues) override
 
void getSmootherFactors (NonlinearFactorGraph &smootherFactors, Values &smootherValues) override
 
void synchronize (const NonlinearFactorGraph &smootherSummarization, const Values &smootherSummarizationValues) override
 
void postsync () override
 

Protected Attributes

ISAM2 isam2_
 The iSAM2 inference engine.
 
NonlinearFactorGraph previousSmootherSummarization_
 The smoother summarization on the old separator sent by the smoother during the last synchronization.
 
FactorIndices currentSmootherSummarizationSlots_
 The slots in factor graph that correspond to the current smoother summarization on the current separator.
 
NonlinearFactorGraph smootherShortcut_
 A set of conditional factors from the old separator to the current separator (recursively calculated during each filter update)
 
NonlinearFactorGraph smootherFactors_
 A temporary holding place for the set of full nonlinear factors being sent to the smoother.
 
Values smootherValues_
 A temporary holding place for the linearization points of all keys being sent to the smoother.
 

Detailed Description

An iSAM2-based Batch Filter that implements the Concurrent Filtering and Smoother interface.

Constructor & Destructor Documentation

◆ ConcurrentIncrementalFilter()

gtsam::ConcurrentIncrementalFilter::ConcurrentIncrementalFilter ( const ISAM2Params parameters = ISAM2Params())
inline

Default constructor

◆ ~ConcurrentIncrementalFilter()

gtsam::ConcurrentIncrementalFilter::~ConcurrentIncrementalFilter ( )
inlineoverride

Default destructor

Member Function Documentation

◆ calculateEstimate() [1/2]

Values gtsam::ConcurrentIncrementalFilter::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::ConcurrentIncrementalFilter::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

◆ equals()

bool gtsam::ConcurrentIncrementalFilter::equals ( const ConcurrentFilter rhs,
double  tol = 1e-9 
) const
overridevirtual

Check if two Concurrent Filters are equal

Implements gtsam::ConcurrentFilter.

◆ getDelta()

const VectorValues& gtsam::ConcurrentIncrementalFilter::getDelta ( ) const
inline

Access the current set of deltas to the linearization point

◆ getFactors()

const NonlinearFactorGraph& gtsam::ConcurrentIncrementalFilter::getFactors ( ) const
inline

Access the current set of factors

◆ getISAM2()

const ISAM2& gtsam::ConcurrentIncrementalFilter::getISAM2 ( ) const
inline

Access the current linearization point

◆ getLinearizationPoint()

const Values& gtsam::ConcurrentIncrementalFilter::getLinearizationPoint ( ) const
inline

Access the current linearization point

◆ getSmootherFactors()

void gtsam::ConcurrentIncrementalFilter::getSmootherFactors ( NonlinearFactorGraph smootherFactors,
Values smootherValues 
)
overridevirtual

Populate the provided containers with factors being sent to the smoother from the filter. These may be original nonlinear factors, or factors encoding a summarization of the filter information. The specifics will be implementation-specific for a given filter.

Parameters
smootherFactorsThe new factors to be added to the smoother
smootherValuesThe linearization points of any new variables

Implements gtsam::ConcurrentFilter.

◆ getSummarizedFactors()

void gtsam::ConcurrentIncrementalFilter::getSummarizedFactors ( NonlinearFactorGraph filterSummarization,
Values filterSummarizationValues 
)
overridevirtual

Populate the provided containers with factors that constitute the filter branch summarization needed by the smoother. Also, linearization points for the new root clique must be provided.

Parameters
summarizedFactorsThe summarized factors for the filter branch
rootValuesThe linearization points of the root clique variables

Implements gtsam::ConcurrentFilter.

◆ postsync()

void gtsam::ConcurrentIncrementalFilter::postsync ( )
overridevirtual

Perform any required operations after the synchronization process finishes. Called by 'synchronize'

Reimplemented from gtsam::ConcurrentFilter.

◆ presync()

void gtsam::ConcurrentIncrementalFilter::presync ( )
overridevirtual

Perform any required operations before the synchronization process starts. Called by 'synchronize'

Reimplemented from gtsam::ConcurrentFilter.

◆ print()

void gtsam::ConcurrentIncrementalFilter::print ( )
overridevirtual

Implement a GTSAM standard 'print' function

Implements gtsam::ConcurrentFilter.

◆ synchronize()

void gtsam::ConcurrentIncrementalFilter::synchronize ( const NonlinearFactorGraph smootherSummarization,
const Values smootherSummarizationValues 
)
overridevirtual

Apply the updated version of the smoother branch summarized factors.

Parameters
summarizedFactorsAn updated version of the smoother branch summarized factors

Implements gtsam::ConcurrentFilter.

◆ update()

Result gtsam::ConcurrentIncrementalFilter::update ( const NonlinearFactorGraph newFactors = NonlinearFactorGraph(),
const Values newTheta = Values(),
const std::optional< FastList< Key > > &  keysToMove = {},
const std::optional< FactorIndices > &  removeFactorIndices = {} 
)

Add new factors and variables to the filter.

Add new measurements, and optionally new variables, to the filter. This runs a full update step of the derived filter algorithm

Parameters
newFactorsThe new factors to be added to the smoother
newThetaInitialization points for new variables to be added to the filter You must include here all new variables occurring in newFactors that were not already in the filter.
keysToMoveAn optional set of keys to move from the filter to the smoother
removeFactorIndicesAn optional set of indices corresponding to the factors you want to remove from the graph

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