Skip to content

Commit

Permalink
V1.0.36 fix bug in calculate point index
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyu-hesaitech committed Dec 5, 2022
1 parent 622fecf commit f180a10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandar_pointcloud/src/conversions/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ void Convert::calcPointXYZIT(pandar_msgs::PandarPacket &packet, int cursor) {
}
else{
pthread_mutex_lock(&m_RedundantPointLock);
if (fabs(point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp) > 0.01)
if (point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp > 0.01 && point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp < 0.11)
m_RedundantPointBuffer.push_back(RedundantPoint{point_index, point});
pthread_mutex_unlock(&m_RedundantPointLock);
}
Expand Down Expand Up @@ -1484,7 +1484,7 @@ void Convert::calcQT128PointXYZIT(pandar_msgs::PandarPacket &packet, int cursor)
}
else{
pthread_mutex_lock(&m_RedundantPointLock);
if (fabs(point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp) > 0.01)
if (point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp > 0.01 && point.timestamp - m_OutMsgArray[cursor]->points[point_index].timestamp < 0.11)
m_RedundantPointBuffer.push_back(RedundantPoint{point_index, point});
pthread_mutex_unlock(&m_RedundantPointLock);
}
Expand Down

0 comments on commit f180a10

Please sign in to comment.