void dlio::OdomNode::setAdaptiveParams() {
// Spaciousness
float sp = this->metrics.spaciousness.back();
if (sp < 0.5) { sp = 0.5; }
if (sp > 5.0) { sp = 5.0; }
this->keyframe_thresh_dist_ = sp;
// Density
float den = this->metrics.density.back();
if (den < 0.5*this->gicp_max_corr_dist_) { den = 0.5*this->gicp_max_corr_dist_; }
if (den > 2.0*this->gicp_max_corr_dist_) { den = 2.0*this->gicp_max_corr_dist_; }
if (sp < 5.0) { den = 0.5*this->gicp_max_corr_dist_; };
if (sp > 5.0) { den = 2.0*this->gicp_max_corr_dist_; };
this->gicp.setMaxCorrespondenceDistance(den);
// Concave hull alpha
this->concave_hull.setAlpha(this->keyframe_thresh_dist_);
}
density(den)的调整逻辑上似乎存在问题, if (sp < 5.0) { den = 0.5*this->gicp_max_corr_dist_; }; if (sp > 5.0) { den = 2.0*this->gicp_max_corr_dist_; };导致den只有两个值,且因为sp最开始约束后不存在>5.0可能,最终den只有在sp大于等一5.0时约束是有效的,否则只能取最小。
是我理解有问题吗???
density(den)的调整逻辑上似乎存在问题,
if (sp < 5.0) { den = 0.5*this->gicp_max_corr_dist_; }; if (sp > 5.0) { den = 2.0*this->gicp_max_corr_dist_; };导致den只有两个值,且因为sp最开始约束后不存在>5.0可能,最终den只有在sp大于等一5.0时约束是有效的,否则只能取最小。是我理解有问题吗???