@@ -679,8 +679,8 @@ bool CYdLidar::doProcessSimple(LaserScan &outscan)
679
679
{
680
680
const node_info& node = global_nodes[i];
681
681
682
- // printf("%lu a %.01f r %u\n",
683
- // i, float(node.angle) / 64 .0f, node.dist);
682
+ // printf("%lu a: %.01f d: %u\n",
683
+ // i, float(node.angle) / 128 .0f, node.dist);
684
684
685
685
if (isNetTOFLidar (m_LidarType))
686
686
{
@@ -700,6 +700,10 @@ bool CYdLidar::doProcessSimple(LaserScan &outscan)
700
700
{
701
701
range = static_cast <float >(global_nodes[i].dist / 2000 .f );
702
702
}
703
+ else if (isR3Lidar (lidar_model))
704
+ {
705
+ range = static_cast <float >(global_nodes[i].dist / 40000 .f );
706
+ }
703
707
else
704
708
{
705
709
if (isTOFLidar (m_LidarType) ||
@@ -787,6 +791,8 @@ bool CYdLidar::doProcessSimple(LaserScan &outscan)
787
791
}
788
792
} // end for (int i = 0; i < count; i++)
789
793
794
+ outscan.size = outscan.points .size (); // 保留原点云数
795
+
790
796
if (m_FixedResolution)
791
797
{
792
798
outscan.points .resize (all_node_count);
@@ -1408,10 +1414,10 @@ bool CYdLidar::getDeviceInfo()
1408
1414
1409
1415
frequencyOffset = 0.4 ;
1410
1416
lidar_model = di.model ;
1417
+ printf (" Current Lidar Model Code %d\n " , lidar_model);
1411
1418
bool intensity = hasIntensity (di.model );
1412
1419
defalutSampleRate = getDefaultSampleRate (di.model );
1413
1420
// printf("getDefaultSampleRate %d\n", defalutSampleRate.size());
1414
-
1415
1421
intensity = m_Intensity;
1416
1422
std::string serial_number;
1417
1423
lidarPtr->setIntensities (intensity);
0 commit comments