GridMapPclConverter.hpp
Go to the documentation of this file.
00001 /*
00002  * GridMapPclConverter.hpp
00003  *
00004  *  Created on: Apr 14, 2016
00005  *      Author: Dominic Jud
00006  *   Institute: ETH Zurich, ANYbotics
00007  */
00008 
00009 #pragma once
00010 
00011 #include <grid_map_core/grid_map_core.hpp>
00012 
00013 // PCL
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 // STD
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 } /* namespace */


grid_map_pcl
Author(s): Dominic Jud
autogenerated on Tue Jul 9 2019 05:06:29