Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #pragma once
00010
00011 #include <grid_map_core/grid_map_core.hpp>
00012
00013
00014 #include <pcl/point_cloud.h>
00015 #include <pcl/point_types.h>
00016 #include <pcl/conversions.h>
00017 #include <pcl/PolygonMesh.h>
00018 #include <pcl/common/common.h>
00019
00020
00021 #include <iostream>
00022 #include <vector>
00023 #include <algorithm>
00024 #include <cmath>
00025
00026 namespace grid_map {
00027
00031 class GridMapPclConverter
00032 {
00033 public:
00037 GridMapPclConverter();
00038
00042 virtual ~GridMapPclConverter();
00043
00052 static bool initializeFromPolygonMesh(const pcl::PolygonMesh& mesh, const double resolution,
00053 grid_map::GridMap& gridMap);
00054
00063 static bool addLayerFromPolygonMesh(const pcl::PolygonMesh& mesh, const std::string& layer,
00064 grid_map::GridMap& gridMap);
00065
00066 private:
00067 static bool rayTriangleIntersect(const Eigen::Vector3f& point,
00068 const Eigen::Vector3f& ray,
00069 const Eigen::Matrix3f& triangleVertices,
00070 Eigen::Vector3f& intersectionPoint);
00071
00072 };
00073
00074 }