cretaceous-creature / jsk_laser

0 stars 3 forks source link

Add a new mapping rule from the pinhole model to the laserscan message structure #4

Closed tongtybj closed 7 years ago

tongtybj commented 7 years ago

A slight different mapping way for the laserscan structure from the raw pixel structure:

 double th = atan2( (k - STEPSIZE/4) / (double)(STEPSIZE/2 - 16) * SENSOR_LENGTH, lensfocus);
 int index = (th - laserscan_msg.angle_min) / laserscan_msg.angle_increment;

 laserscan_msg.ranges[index] = dist_dataholder[k]/100;
 laserscan_msg.intensities[index] = reflectance_dataholder[k]/5000>1?1:reflectance_dataholder[k]/5000;

No big different, Just have a try