From 4ad4e12cb2df5ac031eaf759517179a8e0cd87af Mon Sep 17 00:00:00 2001 From: Miller Date: Tue, 4 Jul 2017 23:34:11 -0500 Subject: set ransac thresh and covbias --- src/feature.cpp | 2 +- src/main.cpp | 10 ++++++++-- src/state.cpp | 4 ++-- src/types.h | 4 ++++ 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/feature.cpp b/src/feature.cpp index 43fd834..95a5366 100644 --- a/src/feature.cpp +++ b/src/feature.cpp @@ -1099,7 +1099,7 @@ Feature::isRansacInlier(const measurement_t &z, const Vector3d &pos, y = zi-hi; Y = y.transpose()*y; - return (Y::Zero(STATESIZE,STATESIZE); - P.block<3,3>(6,6) = COVBIAS*Matrix3d::Identity(); + P.block<3,3>(6,6) = covbias*Matrix3d::Identity(); return ; } /* ----- end of method State::State ----- */ @@ -988,7 +988,7 @@ State::ransacUpdate ( vector &z, const Quaterniond &q ) } if (!found) { Feature *ft = featureById(i->id); - if (ft->isInlier(*i, Pxx(), Pxy(i->id), Pyy(i->id), body->ned(), q, RANSAC_HI_THRESHOLD)) { + if (ft->isInlier(*i, Pxx(), Pxy(i->id), Pyy(i->id), body->ned(), q, ransac_hi_threshold)) { hi_inliers.push_back(*i); } else { removeFeature(i->id, true); diff --git a/src/types.h b/src/types.h index b9a5560..fac708c 100644 --- a/src/types.h +++ b/src/types.h @@ -29,6 +29,10 @@ extern double acc_bias_std; extern double canoecenter; extern double canoeheight; +extern double ransac_li_threshold; +extern double ransac_hi_threshold; +extern double covbias; + typedef Eigen::Matrix UVector2d; // A struct for storing measurements. typedef enum {BOTH,REFLECTION,MONO,HEIGHT} measurement_type; -- cgit v1.1