Skip to content

Commit f180a10

Browse files
V1.0.36 fix bug in calculate point index
1 parent 622fecf commit f180a10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandar_pointcloud/src/conversions/convert.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ void Convert::calcPointXYZIT(pandar_msgs::PandarPacket &packet, int cursor) {
13071307
}
13081308
else{
13091309
pthread_mutex_lock(&m_RedundantPointLock);
1310-
if (fabs(point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp) > 0.01)
1310+
if (point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp > 0.01 && point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp < 0.11)
13111311
m_RedundantPointBuffer.push_back(RedundantPoint{point_index, point});
13121312
pthread_mutex_unlock(&m_RedundantPointLock);
13131313
}
@@ -1484,7 +1484,7 @@ void Convert::calcQT128PointXYZIT(pandar_msgs::PandarPacket &packet, int cursor)
14841484
}
14851485
else{
14861486
pthread_mutex_lock(&m_RedundantPointLock);
1487-
if (fabs(point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp) > 0.01)
1487+
if (point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp > 0.01 && point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp < 0.11)
14881488
m_RedundantPointBuffer.push_back(RedundantPoint{point_index, point});
14891489
pthread_mutex_unlock(&m_RedundantPointLock);
14901490
}

0 commit comments

Comments
 (0)