3D projection: adding pose rotation (roll, pitch) before projection

This commit is contained in:
matlabbe
2016-04-12 17:45:50 -04:00
parent f511896c43
commit fc76e5b8f3
2 changed files with 13 additions and 4 deletions
+6
View File
@@ -2191,6 +2191,12 @@ void MainWindow::createAndAddCloudToMap(int nodeId, const Transform & pose, int
int minClusterSize = 20;
cv::Mat ground, obstacles;
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr voxelCloud = util3d::voxelize(cloud, indices, cellSize);
// add pose rotation without yaw
float roll, pitch, yaw;
pose.getEulerAngles(roll, pitch, yaw);
voxelCloud = util3d::transformPointCloud(voxelCloud, Transform(0,0,0, roll, pitch, 0));
util3d::occupancy2DFromCloud3D<pcl::PointXYZRGBNormal>(
voxelCloud,
ground,