Public Types | Public Member Functions | Public Attributes | List of all members
gtsam::ISAM2Params Struct Reference

#include <ISAM2Params.h>

Public Types

enum  Factorization { CHOLESKY, QR }
 
typedef std::variant< ISAM2GaussNewtonParams, ISAM2DoglegParamsOptimizationParams
 
typedef std::variant< double, FastMap< char, Vector > > RelinearizationThreshold
 

Public Member Functions

 ISAM2Params (OptimizationParams _optimizationParams=ISAM2GaussNewtonParams(), RelinearizationThreshold _relinearizeThreshold=0.1, int _relinearizeSkip=10, bool _enableRelinearization=true, bool _evaluateNonlinearError=false, Factorization _factorization=ISAM2Params::CHOLESKY, bool _cacheLinearizedFactors=true, const KeyFormatter &_keyFormatter=DefaultKeyFormatter, bool _enableDetailedResults=false)
 
void print (const std::string &str="") const
 print iSAM2 parameters More...
 
Getters and Setters for all properties
OptimizationParams getOptimizationParams () const
 
RelinearizationThreshold getRelinearizeThreshold () const
 
std::string getFactorization () const
 
KeyFormatter getKeyFormatter () const
 
void setOptimizationParams (OptimizationParams optimizationParams)
 
void setRelinearizeThreshold (RelinearizationThreshold relinearizeThreshold)
 
void setFactorization (const std::string &factorization)
 
void setKeyFormatter (KeyFormatter keyFormatter)
 
GaussianFactorGraph::Eliminate getEliminationFunction () const
 

Static Public Member Functions

Some utilities
static Factorization factorizationTranslator (const std::string &str)
 
static std::string factorizationTranslator (const Factorization &value)
 

Public Attributes

bool cacheLinearizedFactors
 
bool enableDetailedResults
 
bool enablePartialRelinearizationCheck
 
bool enableRelinearization
 
bool evaluateNonlinearError
 
Factorization factorization
 
bool findUnusedFactorSlots
 
KeyFormatter keyFormatter
 
OptimizationParams optimizationParams
 
int relinearizeSkip
 
RelinearizationThreshold relinearizeThreshold
 

Detailed Description

Definition at line 136 of file ISAM2Params.h.

Member Typedef Documentation

◆ OptimizationParams

Either ISAM2GaussNewtonParams or ISAM2DoglegParams

Definition at line 138 of file ISAM2Params.h.

◆ RelinearizationThreshold

typedef std::variant<double, FastMap<char, Vector> > gtsam::ISAM2Params::RelinearizationThreshold

Either a constant relinearization threshold or a per-variable-type set of thresholds

Definition at line 141 of file ISAM2Params.h.

Member Enumeration Documentation

◆ Factorization

Enumerator
CHOLESKY 
QR 

Definition at line 182 of file ISAM2Params.h.

Constructor & Destructor Documentation

◆ ISAM2Params()

gtsam::ISAM2Params::ISAM2Params ( OptimizationParams  _optimizationParams = ISAM2GaussNewtonParams(),
RelinearizationThreshold  _relinearizeThreshold = 0.1,
int  _relinearizeSkip = 10,
bool  _enableRelinearization = true,
bool  _evaluateNonlinearError = false,
Factorization  _factorization = ISAM2Params::CHOLESKY,
bool  _cacheLinearizedFactors = true,
const KeyFormatter _keyFormatter = DefaultKeyFormatter,
bool  _enableDetailedResults = false 
)
inline

Specify parameters as constructor arguments See the documentation of member variables above.

Parameters
_keyFormattersee ISAM2::Params::keyFormatter,

Definition at line 231 of file ISAM2Params.h.

Member Function Documentation

◆ factorizationTranslator() [1/2]

string gtsam::ISAM2Params::factorizationTranslator ( const Factorization value)
static

Definition at line 73 of file ISAM2Params.cpp.

◆ factorizationTranslator() [2/2]

ISAM2Params::Factorization gtsam::ISAM2Params::factorizationTranslator ( const std::string &  str)
static

Definition at line 60 of file ISAM2Params.cpp.

◆ getEliminationFunction()

GaussianFactorGraph::Eliminate gtsam::ISAM2Params::getEliminationFunction ( ) const
inline

Definition at line 323 of file ISAM2Params.h.

◆ getFactorization()

std::string gtsam::ISAM2Params::getFactorization ( ) const
inline

Definition at line 305 of file ISAM2Params.h.

◆ getKeyFormatter()

KeyFormatter gtsam::ISAM2Params::getKeyFormatter ( ) const
inline

Definition at line 308 of file ISAM2Params.h.

◆ getOptimizationParams()

OptimizationParams gtsam::ISAM2Params::getOptimizationParams ( ) const
inline

Definition at line 299 of file ISAM2Params.h.

◆ getRelinearizeThreshold()

RelinearizationThreshold gtsam::ISAM2Params::getRelinearizeThreshold ( ) const
inline

Definition at line 302 of file ISAM2Params.h.

◆ print()

void gtsam::ISAM2Params::print ( const std::string &  str = "") const
inline

print iSAM2 parameters

Definition at line 253 of file ISAM2Params.h.

◆ setFactorization()

void gtsam::ISAM2Params::setFactorization ( const std::string &  factorization)
inline

Definition at line 316 of file ISAM2Params.h.

◆ setKeyFormatter()

void gtsam::ISAM2Params::setKeyFormatter ( KeyFormatter  keyFormatter)
inline

Definition at line 319 of file ISAM2Params.h.

◆ setOptimizationParams()

void gtsam::ISAM2Params::setOptimizationParams ( OptimizationParams  optimizationParams)
inline

Definition at line 310 of file ISAM2Params.h.

◆ setRelinearizeThreshold()

void gtsam::ISAM2Params::setRelinearizeThreshold ( RelinearizationThreshold  relinearizeThreshold)
inline

Definition at line 313 of file ISAM2Params.h.

Member Data Documentation

◆ cacheLinearizedFactors

bool gtsam::ISAM2Params::cacheLinearizedFactors

Whether to cache linear factors (default: true). This can improve performance if linearization is expensive, but can hurt performance if linearization is very cleap due to computation to look up additional keys.

Definition at line 201 of file ISAM2Params.h.

◆ enableDetailedResults

bool gtsam::ISAM2Params::enableDetailedResults

Whether to compute and return ISAM2Result::detailedResults, this can increase running time (default: false)

Definition at line 207 of file ISAM2Params.h.

◆ enablePartialRelinearizationCheck

bool gtsam::ISAM2Params::enablePartialRelinearizationCheck

Check variables for relinearization in tree-order, stopping the check once a variable does not need to be relinearized (default: false). This can improve speed by only checking a small part of the top of the tree. However, variables below the check cut-off can accumulate significant deltas without triggering relinearization. This is particularly useful in exploration scenarios where real-time performance is desired over correctness. Use with caution.

Definition at line 219 of file ISAM2Params.h.

◆ enableRelinearization

bool gtsam::ISAM2Params::enableRelinearization

Controls whether ISAM2 will ever relinearize any variables (default: true)

Definition at line 175 of file ISAM2Params.h.

◆ evaluateNonlinearError

bool gtsam::ISAM2Params::evaluateNonlinearError

Whether to evaluate the nonlinear error before and after the update, to return in ISAM2Result from update()

Definition at line 178 of file ISAM2Params.h.

◆ factorization

Factorization gtsam::ISAM2Params::factorization

Specifies whether to use QR or CHOESKY numerical factorization (default: CHOLESKY). Cholesky is faster but potentially numerically unstable for poorly-conditioned problems, which can occur when uncertainty is very low in some variables (or dimensions of variables) and very high in others. QR is slower but more numerically stable in poorly-conditioned problems. We suggest using the default of Cholesky unless gtsam sometimes throws IndefiniteLinearSystemException when your problem's Hessian is actually positive definite. For positive definite problems, numerical error accumulation can cause the problem to become numerically negative or indefinite as solving proceeds, especially when using Cholesky.

Definition at line 194 of file ISAM2Params.h.

◆ findUnusedFactorSlots

bool gtsam::ISAM2Params::findUnusedFactorSlots

When you will be removing many factors, e.g. when using ISAM2 as a fixed-lag smoother, enable this option to add factors in the first available factor slots, to avoid accumulating nullptr factor slots, at the cost of having to search for slots every time a factor is added.

Definition at line 225 of file ISAM2Params.h.

◆ keyFormatter

KeyFormatter gtsam::ISAM2Params::keyFormatter

A KeyFormatter for when keys are printed during debugging (default: DefaultKeyFormatter)

Definition at line 204 of file ISAM2Params.h.

◆ optimizationParams

OptimizationParams gtsam::ISAM2Params::optimizationParams

Optimization parameters, this both selects the nonlinear optimization method and specifies its parameters, either ISAM2GaussNewtonParams or ISAM2DoglegParams. In the former, Gauss-Newton optimization will be used with the specified parameters, and in the latter Powell's dog-leg algorithm will be used with the specified parameters.

Definition at line 151 of file ISAM2Params.h.

◆ relinearizeSkip

int gtsam::ISAM2Params::relinearizeSkip

Only relinearize any variables every relinearizeSkip calls to ISAM2::update (default: 10)

Definition at line 171 of file ISAM2Params.h.

◆ relinearizeThreshold

RelinearizationThreshold gtsam::ISAM2Params::relinearizeThreshold

Only relinearize variables whose linear delta magnitude is greater than this threshold (default: 0.1). If this is a FastMap<char,Vector> instead of a double, then the threshold is specified for each dimension of each variable type. This parameter then maps from a character indicating the variable type to a Vector of thresholds for each dimension of that variable. For example, if Pose keys are of type TypedSymbol<'x',Pose3>, and landmark keys are of type TypedSymbol<'l',Point3>, then appropriate entries would be added with:

FastMap<char,Vector> thresholds;
thresholds['x'] = (Vector(6) << 0.1, 0.1, 0.1, 0.5, 0.5, 0.5).finished();
// 0.1 rad rotation threshold, 0.5 m translation threshold thresholds['l'] =
Vector3(1.0, 1.0, 1.0); // 1.0 m landmark position threshold
params.relinearizeThreshold = thresholds;

Definition at line 169 of file ISAM2Params.h.


The documentation for this struct was generated from the following files:
gtsam::Vector3
Eigen::Vector3d Vector3
Definition: Vector.h:43
vanilla::params
static const SmartProjectionParams params
Definition: smartFactorScenarios.h:69
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:15:38