mirror of
https://github.com/HViktorTsoi/FAST_LIO_LOCALIZATION.git
synced 2023-05-28 12:51:38 +08:00
limit scan range
This commit is contained in:
@@ -732,6 +732,7 @@ int main(int argc, char** argv)
|
||||
nh.param<double>("mapping/b_gyr_cov",b_gyr_cov,0.0001);
|
||||
nh.param<double>("mapping/b_acc_cov",b_acc_cov,0.0001);
|
||||
nh.param<double>("preprocess/blind", p_pre->blind, 0.01);
|
||||
nh.param<double>("preprocess/max_range",p_pre->max_scan_range, 100.f);
|
||||
nh.param<int>("preprocess/lidar_type", p_pre->lidar_type, AVIA);
|
||||
nh.param<int>("preprocess/scan_line", p_pre->N_SCANS, 16);
|
||||
nh.param<int>("point_filter_num", p_pre->point_filter_num, 2);
|
||||
|
||||
@@ -154,8 +154,11 @@ void Preprocess::avia_handler(const livox_ros_driver::CustomMsg::ConstPtr &msg)
|
||||
|| (abs(pl_full[i].z - pl_full[i-1].z) > 1e-7)
|
||||
&& (pl_full[i].x * pl_full[i].x + pl_full[i].y * pl_full[i].y > blind))
|
||||
{
|
||||
if(pl_full[i].x * pl_full[i].x + pl_full[i].y * pl_full[i].y < max_scan_range * max_scan_range){
|
||||
pl_surf.push_back(pl_full[i]);
|
||||
}
|
||||
// pl_surf.push_back(pl_full[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ class Preprocess
|
||||
vector<orgtype> typess[128]; //maximum 128 line lidar
|
||||
int lidar_type, point_filter_num, N_SCANS;;
|
||||
double blind;
|
||||
double max_scan_range;
|
||||
bool feature_enabled, given_offset_time;
|
||||
ros::Publisher pub_full, pub_surf, pub_corn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user