hku-mars / loam_livox

A robust LiDAR Odometry and Mapping (LOAM) package for Livox-LiDAR
GNU General Public License v2.0
1.46k stars 440 forks source link

how to understand " laserCloudIn.points[ idx ].x == 0 " ? #7

Closed chennuo0125-HIT closed 5 years ago

chennuo0125-HIT commented 5 years ago

https://github.com/hku-mars/loam_livox/blob/7aa011352399205f678c5816a3549d835a253dde/src/livox_feature_extractor.hpp#L494
if ( laserCloudIn.points[ idx ].x == 0 ) { if ( idx == 0 ) { // TODO: handle this case. std::cout << "First point should be normal!!!" << std::endl; return 0; } else { pt_info->pt_2d_img = m_pts_info_vec[ idx - 1 ].pt_2d_img; pt_info->polar_dis_sq2 = m_pts_info_vec[ idx - 1 ].polar_dis_sq2; //cout << "Add mask, id = " << idx << " type = e_point_000" << endl; add_mask_of_point( pt_info, e_pt_000 ); continue; } }

ziv-lin commented 5 years ago

When the LiDAR has a bad measurement on some objects like mirrors, glasses, sky, etc. It will return a point with measurement "[0 0 0]", such kind of points are less reliable and should be filtered.