|
gtsam
|
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) | |
| Specify parameters as constructor arguments See the documentation of member variables above. | |
| void | print (const std::string &str="") const |
| print iSAM2 parameters | |
Getters and Setters for all properties | |
| OptimizationParams | getOptimizationParams () const |
| RelinearizationThreshold | getRelinearizeThreshold () const |
| std::string | getFactorization () const |
| KeyFormatter | getKeyFormatter () const |
| void | setOptimizationParams (const OptimizationParams &optimizationParams) |
| void | setRelinearizeThreshold (const 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 | |
| OptimizationParams | optimizationParams |
| Optimization parameters, this both selects the nonlinear optimization method and specifies its parameters, either ISAM2GaussNewtonParams or ISAM2DoglegParams. | |
| RelinearizationThreshold | relinearizeThreshold |
| Only relinearize variables whose linear delta magnitude is greater than this threshold (default: 0.1). | |
| int | relinearizeSkip |
| Only relinearize any variables every relinearizeSkip calls to ISAM2::update (default: 10). | |
| bool | enableRelinearization |
| Controls whether ISAM2 will ever relinearize any variables (default: true). | |
| bool | evaluateNonlinearError |
| Whether to evaluate the nonlinear error before and after the update, to return in ISAM2Result from update(). | |
| Factorization | factorization |
| Specifies whether to use QR or CHOESKY numerical factorization (default: CHOLESKY). | |
| bool | cacheLinearizedFactors |
| Whether to cache linear factors (default: true). | |
| KeyFormatter | keyFormatter |
| A KeyFormatter for when keys are printed during debugging (default: DefaultKeyFormatter). | |
| bool | enableDetailedResults |
| Compute per-variable details and ISAM2Result::treeNnz. | |
| bool | enablePartialRelinearizationCheck |
| Check variables for relinearization in tree-order, stopping the check once a variable does not need to be relinearized (default: false). | |
| bool | findUnusedFactorSlots |
| When you will be removing many factors, e.g. | |
| bool | enableAdaptiveReorder |
| When enabled, ISAM2 tracks the total number of nonzero entries (nnz) in the Bayes tree after every batch reorder. | |
| double | adaptiveReorderThreshold |
| The fill-in growth ratio that triggers a batch reorder when enableAdaptiveReorder is true (default: 2.0, i.e. | |
Public Types | |
| enum | Factorization { CHOLESKY , QR } |
| typedef std::variant< ISAM2GaussNewtonParams, ISAM2DoglegParams, ISAM2DoglegLineSearchParams > | OptimizationParams |
| Either ISAM2GaussNewtonParams or ISAM2DoglegParams or ISAM2DoglegLineSearchParams. | |
| typedef std::variant< double, FastMap< char, Vector > > | RelinearizationThreshold |
| Either a constant relinearization threshold or a per-variable-type set of thresholds. | |
|
inline |
Specify parameters as constructor arguments See the documentation of member variables above.
| _keyFormatter | see ISAM2::Params::keyFormatter, |
| double gtsam::ISAM2Params::adaptiveReorderThreshold |
The fill-in growth ratio that triggers a batch reorder when enableAdaptiveReorder is true (default: 2.0, i.e.
reorder when nnz doubles relative to the last fresh ordering).
| 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.
| bool gtsam::ISAM2Params::enableAdaptiveReorder |
When enabled, ISAM2 tracks the total number of nonzero entries (nnz) in the Bayes tree after every batch reorder.
If the current nnz exceeds adaptiveReorderThreshold times the nnz recorded after the last batch reorder, a full batch re-elimination with COLAMD reordering is triggered automatically. This prevents fill-in from accumulating over long sessions (e.g. thousands of incremental SLAM updates). Default: disabled.
| bool gtsam::ISAM2Params::enableDetailedResults |
Compute per-variable details and ISAM2Result::treeNnz.
The latter visits every clique, so enabling this can increase update time (default: false).
| 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.
| 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.
| 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.
| 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.
| 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: