Merge pull request #152 from evanrobot/yw/fix_isam2_params

fix default parameters in constructor of IncrementalFixedLagSmoother.h
release/4.3a0
Frank Dellaert 2019-10-18 17:58:45 -04:00 committed by GitHub
commit cb3e7560d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -39,7 +39,7 @@ public:
/** default constructor */ /** default constructor */
IncrementalFixedLagSmoother(double smootherLag = 0.0, IncrementalFixedLagSmoother(double smootherLag = 0.0,
const ISAM2Params& parameters = ISAM2Params()) : const ISAM2Params& parameters = DefaultISAM2Params()) :
FixedLagSmoother(smootherLag), isam_(parameters) { FixedLagSmoother(smootherLag), isam_(parameters) {
} }
@ -114,6 +114,14 @@ public:
const ISAM2Result& getISAM2Result() const{ return isamResult_; } const ISAM2Result& getISAM2Result() const{ return isamResult_; }
protected: protected:
/** Create default parameters */
static ISAM2Params DefaultISAM2Params() {
ISAM2Params params;
params.findUnusedFactorSlots = true;
return params;
}
/** An iSAM2 object used to perform inference. The smoother lag is controlled /** An iSAM2 object used to perform inference. The smoother lag is controlled
* by what factors are removed each iteration */ * by what factors are removed each iteration */
ISAM2 isam_; ISAM2 isam_;