minor fixes

release/4.3a0
jingnanshi 2020-12-24 11:19:47 -05:00
parent dc5c769e7c
commit 92ed225a55
1 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ public:
size_t maxIterations = 100; /* maximum number of iterations*/
double barcSq = 1.0; /* a factor is considered an inlier if factor.error() < barcSq. Note that factor.error() whitens by the covariance*/
double muStep = 1.4; /* multiplicative factor to reduce/increase the mu in gnc */
double relativeCostTol = 1e-5; ///< if relative cost change if below this threshold, stop iterating
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)
VerbosityGNC verbosityGNC = SILENT; /* verbosity level */
std::vector<size_t> knownInliers = std::vector<size_t>(); /* slots in the factor graph corresponding to measurements that we know are inliers */
@ -111,7 +111,7 @@ public:
* 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
* */
void setKnownInliers(const std::vector<size_t> knownIn) {
void setKnownInliers(const std::vector<size_t>& knownIn) {
for (size_t i = 0; i < knownIn.size(); i++)
knownInliers.push_back(knownIn[i]);
}
@ -406,7 +406,7 @@ public:
}
/// calculate gnc weights
Vector calculateWeights(const Values currentEstimate, const double mu) {
Vector calculateWeights(const Values& currentEstimate, const double mu) {
Vector weights = Vector::Ones(nfg_.size());
// do not update the weights that the user has decided are known inliers