Loading...
Searching...
No Matches
gtsam::GncParams< BaseOptimizerParameters > Class Template Reference

## Public Member Functions

| GncParams (const BaseOptimizerParameters &baseOptimizerParams)
| Constructor.
| GncParams ()
| Default constructor.
void | setLossType (const GncLossType type)
| Set the robust loss function to be used in GNC (chosen among the ones in GncLossType).
void | setMaxIterations (const size_t maxIter)
| Set the maximum number of iterations in GNC (changing the max nr of iters might lead to less accurate solutions and is not recommended).
void | setMuStep (const double step)
| Set the graduated non-convexity step: at each GNC iteration, mu is updated as mu <- mu * muStep.
void | setRelativeCostTol (double value)
| Set the maximum relative difference in mu values to stop iterating.
void | setWeightsTol (double value)
| Set the maximum difference between the weights and their rounding in {0,1} to stop iterating.
void | setVerbosityGNC (const Verbosity value)
| Set the verbosity level.
void | setKnownInliers (const IndexVector &knownIn)
| (Optional) Provide a vector of measurements that must be considered inliers.
void | setKnownOutliers (const IndexVector &knownOut)
| (Optional) Provide a vector of measurements that must be considered outliers.
bool | equals (const GncParams &other, double tol=1e-9) const
| Equals.
void | print (const std::string &str) const
| Print.

## Public Attributes

BaseOptimizerParameters | baseOptimizerParams
| GNC parameters.
GncLossType | lossType = TLS
| any other specific GNC parameters:
size_t | maxIterations = 100
| Maximum number of iterations.
double | muStep = 1.4
| Multiplicative factor to reduce/increase the mu in gnc.
double | relativeCostTol = 1e-5
| If relative cost change is below this threshold, stop iterating.
double | weightsTol = 1e-4
| If the weights are within weightsTol from being binary, stop iterating (only for TLS).
Verbosity | verbosity = SILENT
| Verbosity level.
IndexVector | knownInliers = IndexVector()
| Slots in the factor graph corresponding to measurements that we know are outliers.
IndexVector | knownOutliers = IndexVector()

## Public Types

enum | Verbosity { SILENT = 0 , SUMMARY , MU , WEIGHTS , VALUES }
| Verbosity levels.
typedef BaseOptimizerParameters::OptimizerType | OptimizerType
| For each parameter, specify the corresponding optimizer: e.g., GaussNewtonParams -> GaussNewtonOptimizer.
using | IndexVector = FastVector<uint64_t>
| Use IndexVector for inliers and outliers since it is fast + wrapping.

## Member Typedef Documentation

## IndexVector

template<class BaseOptimizerParameters>

using gtsam::GncParams< BaseOptimizerParameters >::IndexVector = FastVector<uint64_t>

Use IndexVector for inliers and outliers since it is fast + wrapping.

Slots in the factor graph corresponding to measurements that we know are inliers

## Member Function Documentation

## setKnownInliers()

template<class BaseOptimizerParameters>

void gtsam::GncParams< BaseOptimizerParameters >::setKnownInliers | ( | const IndexVector & | knownIn | ) |

inline

(Optional) Provide a vector of measurements that must be considered inliers.

The enties in the vector corresponds to the slots in the factor graph. For instance, if you have a nonlinear factor graph nfg, and you provide knownIn = {0, 2, 15}, GNC will not apply outlier rejection to nfg[0], nfg[2], and nfg[15]. This functionality is commonly used in SLAM when one may assume the odometry is outlier free, and only apply GNC to prune outliers from the loop closures.

## setKnownOutliers()

template<class BaseOptimizerParameters>

void gtsam::GncParams< BaseOptimizerParameters >::setKnownOutliers | ( | const IndexVector & | knownOut | ) |

inline

(Optional) Provide a vector of measurements that must be considered outliers.

The enties in the vector corresponds to the slots in the factor graph. For instance, if you have a nonlinear factor graph nfg, and you provide knownOut = {0, 2, 15}, GNC will not apply outlier rejection to nfg[0], nfg[2], and nfg[15].

## Member Data Documentation

## baseOptimizerParams

template<class BaseOptimizerParameters>

BaseOptimizerParameters gtsam::GncParams< BaseOptimizerParameters >::baseOptimizerParams

GNC parameters.

Optimization parameters used to solve the weighted least squares problem at each GNC iteration

## lossType

template<class BaseOptimizerParameters>

GncLossType gtsam::GncParams< BaseOptimizerParameters >::lossType = TLS

any other specific GNC parameters:

Default loss

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

- /build/gtsam-gchP9J/gtsam-4.2.2+dfsg/gtsam/nonlinear/GncParams.h