wh200720041 / ssl_slam2

SSL_SLAM2: Lightweight 3-D Localization and Mapping for Solid-State LiDAR (mapping and localization separated) ICRA 2021
GNU General Public License v3.0
392 stars 71 forks source link

About function LaseProcessingClass::featureExtraction #5

Closed e04su3184 closed 3 years ago

e04su3184 commented 3 years ago

Hi @wh200720041

I'm still studying your masterpiece. but there is a question I can`t understand.

Code block in function LaseProcessingClass::featureExtraction

double last_angle = atan2(pc_in->points[0].z,pc_in->points[0].y) 180 / M_PI; double angle = atan2(pc_in->points[i].x,pc_in->points[i].z) 180 / M_PI; ... if(fabs(angle - last_angle) > 0.05){ .... } ...

Why could angle and last_angle subtract? What`s the meaning?

BRs

wh200720041 commented 3 years ago

Hi @e04su3184

The subtract of angle and last_angle is to determine whether there is a new line.

The scanning pattern of L515 is line by line. the line with lowest vertical angle will be scanned first and the line with highest vertical angle will be scanning last. The vertical angle of each line is different. Hence when the vertical angle changes, we know that there is a new line starting.