GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
gtsam::BatchFixedLagSmoother Class Reference
Inheritance diagram for gtsam::BatchFixedLagSmoother:
Inheritance graph
[legend]
Collaboration diagram for gtsam::BatchFixedLagSmoother:
Collaboration graph
[legend]

Public Types

typedef std::shared_ptr< BatchFixedLagSmoothershared_ptr
 Typedef for a shared pointer to an Incremental Fixed-Lag Smoother.
 
typedef std::map< Key, double > KeyTimestampMap
 Typedef for a Key-Timestamp map/database.
 
typedef std::multimap< double, KeyTimestampKeyMap
 

Public Member Functions

 BatchFixedLagSmoother (double smootherLag=0.0, const LevenbergMarquardtParams &parameters=LevenbergMarquardtParams(), bool enforceConsistency=true)
 
 ~BatchFixedLagSmoother () override
 
void print (const std::string &s="BatchFixedLagSmoother:\, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
bool equals (const FixedLagSmoother &rhs, double tol=1e-9) const override
 
Result update (const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const KeyTimestampMap &timestamps=KeyTimestampMap(), const FactorIndices &factorsToRemove=FactorIndices()) override
 
Values calculateEstimate () const override
 
template<class VALUE >
VALUE calculateEstimate (Key key) const
 
const LevenbergMarquardtParamsparams () const
 
LevenbergMarquardtParamsparams ()
 
const NonlinearFactorGraphgetFactors () const
 
const ValuesgetLinearizationPoint () const
 
const OrderinggetOrdering () const
 
const VectorValuesgetDelta () const
 
Matrix marginalCovariance (Key key) const
 Calculate marginal covariance on given variable.
 
double smootherLag () const
 
double & smootherLag ()
 
const KeyTimestampMaptimestamps () const
 

Static Public Member Functions

static GaussianFactorGraph CalculateMarginalFactors (const GaussianFactorGraph &graph, const KeyVector &keys, const GaussianFactorGraph::Eliminate &eliminateFunction=EliminatePreferCholesky)
 
static NonlinearFactorGraph CalculateMarginalFactors (const NonlinearFactorGraph &graph, const Values &theta, const KeyVector &keys, const GaussianFactorGraph::Eliminate &eliminateFunction=EliminatePreferCholesky)
 Marginalize specific keys from a nonlinear graph, wrap in LinearContainers.
 

Protected Types

typedef std::map< Key, std::set< Key > > FactorIndex
 

Protected Member Functions

void insertFactors (const NonlinearFactorGraph &newFactors)
 
void removeFactors (const std::set< size_t > &deleteFactors)
 
void eraseKeys (const KeyVector &keys)
 
void reorder (const KeyVector &marginalizeKeys=KeyVector())
 
Result optimize ()
 
void marginalize (const KeyVector &marginalizableKeys)
 
void updateKeyTimestampMap (const KeyTimestampMap &newTimestamps)
 
void eraseKeyTimestampMap (const KeyVector &keys)
 
double getCurrentTimestamp () const
 
KeyVector findKeysBefore (double timestamp) const
 
KeyVector findKeysAfter (double timestamp) const
 

Protected Attributes

LevenbergMarquardtParams parameters_
 
bool enforceConsistency_
 
NonlinearFactorGraph factors_
 
Values theta_
 
Values linearValues_
 
Ordering ordering_
 
VectorValues delta_
 
std::queue< size_t > availableSlots_
 
FactorIndex factorIndex_
 
double smootherLag_
 
TimestampKeyMap timestampKeyMap_
 
KeyTimestampMap keyTimestampMap_
 

Member Typedef Documentation

◆ FactorIndex

typedef std::map<Key, std::set<Key> > gtsam::BatchFixedLagSmoother::FactorIndex
protected

A typedef defining an Key-Factor mapping

Constructor & Destructor Documentation

◆ BatchFixedLagSmoother()

gtsam::BatchFixedLagSmoother::BatchFixedLagSmoother ( double  smootherLag = 0.0,
const LevenbergMarquardtParams parameters = LevenbergMarquardtParams(),
bool  enforceConsistency = true 
)
inline

default constructor

◆ ~BatchFixedLagSmoother()

gtsam::BatchFixedLagSmoother::~BatchFixedLagSmoother ( )
inlineoverride

destructor

Member Function Documentation

◆ calculateEstimate() [1/2]

Values gtsam::BatchFixedLagSmoother::calculateEstimate ( ) const
inlineoverridevirtual

Compute an estimate from the incomplete linear delta computed during the last update. This delta is incomplete because it was not updated below wildfire_threshold. If only a single variable is needed, it is faster to call calculateEstimate(const KEY&).

Implements gtsam::FixedLagSmoother.

◆ calculateEstimate() [2/2]

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

Compute an estimate for a single variable using its incomplete linear delta computed during the last update. This is faster than calling the no-argument version of calculateEstimate, which operates on all variables.

Parameters
key
Returns

◆ CalculateMarginalFactors()

static GaussianFactorGraph gtsam::BatchFixedLagSmoother::CalculateMarginalFactors ( const GaussianFactorGraph graph,
const KeyVector keys,
const GaussianFactorGraph::Eliminate eliminateFunction = EliminatePreferCholesky 
)
static

Marginalize specific keys from a linear graph. Does not check whether keys actually exist in graph. In that case will fail somewhere deep within elimination

◆ equals()

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

Check if two IncrementalFixedLagSmoother Objects are equal

Reimplemented from gtsam::FixedLagSmoother.

◆ eraseKeys()

void gtsam::BatchFixedLagSmoother::eraseKeys ( const KeyVector keys)
protected

Erase any keys associated with timestamps before the provided time

◆ eraseKeyTimestampMap()

void gtsam::FixedLagSmoother::eraseKeyTimestampMap ( const KeyVector keys)
protectedinherited

Erase keys from the Key-Timestamps database

◆ findKeysAfter()

KeyVector gtsam::FixedLagSmoother::findKeysAfter ( double  timestamp) const
protectedinherited

Find all of the keys associated with timestamps before the provided time

◆ findKeysBefore()

KeyVector gtsam::FixedLagSmoother::findKeysBefore ( double  timestamp) const
protectedinherited

Find all of the keys associated with timestamps before the provided time

◆ getCurrentTimestamp()

double gtsam::FixedLagSmoother::getCurrentTimestamp ( ) const
protectedinherited

Find the most recent timestamp of the system

◆ getDelta()

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

Access the current set of deltas to the linearization point

◆ getFactors()

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

Access the current set of factors

◆ getLinearizationPoint()

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

Access the current linearization point

◆ getOrdering()

const Ordering& gtsam::BatchFixedLagSmoother::getOrdering ( ) const
inline

Access the current ordering

◆ insertFactors()

void gtsam::BatchFixedLagSmoother::insertFactors ( const NonlinearFactorGraph newFactors)
protected

Augment the list of factors with a set of new factors

◆ marginalize()

void gtsam::BatchFixedLagSmoother::marginalize ( const KeyVector marginalizableKeys)
protected

Marginalize out selected variables

◆ optimize()

Result gtsam::BatchFixedLagSmoother::optimize ( )
protected

Optimize the current graph using a modified version of L-M

◆ params() [1/2]

const LevenbergMarquardtParams& gtsam::BatchFixedLagSmoother::params ( ) const
inline

read the current set of optimizer parameters

◆ params() [2/2]

LevenbergMarquardtParams& gtsam::BatchFixedLagSmoother::params ( )
inline

update the current set of optimizer parameters

◆ print()

void gtsam::BatchFixedLagSmoother::print ( )
overridevirtual

Print the factor for debugging and testing (implementing Testable)

Reimplemented from gtsam::FixedLagSmoother.

◆ removeFactors()

void gtsam::BatchFixedLagSmoother::removeFactors ( const std::set< size_t > &  deleteFactors)
protected

Remove factors from the list of factors by slot index

◆ reorder()

void gtsam::BatchFixedLagSmoother::reorder ( const KeyVector marginalizeKeys = KeyVector())
protected

Use colamd to update into an efficient ordering

◆ smootherLag() [1/2]

double gtsam::FixedLagSmoother::smootherLag ( ) const
inlineinherited

read the current smoother lag

◆ smootherLag() [2/2]

double& gtsam::FixedLagSmoother::smootherLag ( )
inlineinherited

write to the current smoother lag

◆ timestamps()

const KeyTimestampMap& gtsam::FixedLagSmoother::timestamps ( ) const
inlineinherited

Access the current set of timestamps associated with each variable

◆ update()

Result gtsam::BatchFixedLagSmoother::update ( const NonlinearFactorGraph newFactors = NonlinearFactorGraph(),
const Values newTheta = Values(),
const KeyTimestampMap timestamps = KeyTimestampMap(),
const FactorIndices factorsToRemove = FactorIndices() 
)
overridevirtual

Add new factors, updating the solution and relinearizing as needed.

Implements gtsam::FixedLagSmoother.

◆ updateKeyTimestampMap()

void gtsam::FixedLagSmoother::updateKeyTimestampMap ( const KeyTimestampMap newTimestamps)
protectedinherited

Update the Timestamps associated with the keys

Member Data Documentation

◆ availableSlots_

std::queue<size_t> gtsam::BatchFixedLagSmoother::availableSlots_
protected

The set of available factor graph slots. These occur because we are constantly deleting factors, leaving holes.

◆ delta_

VectorValues gtsam::BatchFixedLagSmoother::delta_
protected

The current set of linear deltas

◆ enforceConsistency_

bool gtsam::BatchFixedLagSmoother::enforceConsistency_
protected

A flag indicating if the optimizer should enforce probabilistic consistency by maintaining the linearization point of all variables involved in linearized/marginal factors at the edge of the smoothing window. This idea is from ??? TODO: Look up paper reference

◆ factorIndex_

FactorIndex gtsam::BatchFixedLagSmoother::factorIndex_
protected

A cross-reference structure to allow efficient factor lookups by key

◆ factors_

NonlinearFactorGraph gtsam::BatchFixedLagSmoother::factors_
protected

The nonlinear factors

◆ linearValues_

Values gtsam::BatchFixedLagSmoother::linearValues_
protected

The set of values involved in current linear factors.

◆ ordering_

Ordering gtsam::BatchFixedLagSmoother::ordering_
protected

The current ordering

◆ parameters_

LevenbergMarquardtParams gtsam::BatchFixedLagSmoother::parameters_
protected

The L-M optimization parameters

◆ smootherLag_

double gtsam::FixedLagSmoother::smootherLag_
protectedinherited

The length of the smoother lag. Any variable older than this amount will be marginalized out.

◆ theta_

Values gtsam::BatchFixedLagSmoother::theta_
protected

The current linearization point

◆ timestampKeyMap_

TimestampKeyMap gtsam::FixedLagSmoother::timestampKeyMap_
protectedinherited

The current timestamp associated with each tracked key


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