Skip to content

Commit

Permalink
Merge pull request PJLab-ADG#43 from dezhi-l/feature/AmazingFeature
Browse files Browse the repository at this point in the history
fix issue lidar2imu/manual_calib core dumped PJLab-ADG#12
  • Loading branch information
xiaokn authored Nov 21, 2022
2 parents 6df6e87 + 4e169e0 commit e52115b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lidar2imu/manual_calib/src/run_lidar2imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ int ProcessLidarFrame(const std::vector<pcl::PointCloud<pcl::PointXYZI>> &pcds,
dst_pt.z = p_res(2);
dst_pt.intensity = src_pt.intensity;

if (!all_octree->isVoxelOccupiedAtPoint(dst_pt)) {
double min_x, min_y, min_z, max_x, max_y, max_z;
all_octree->getBoundingBox(min_x, min_y, min_z, max_x, max_y, max_z);
bool isInBox = (dst_pt.x >= min_x && dst_pt.x <= max_x) && (dst_pt.y >= min_y && dst_pt.y <= max_y) && (dst_pt.z >= min_z && dst_pt.z <= max_z);
if (!isInBox || !all_octree->isVoxelOccupiedAtPoint(dst_pt))
{
all_octree->addPointToCloud(dst_pt, cloudLidar);
}
}
Expand Down

0 comments on commit e52115b

Please sign in to comment.