GH-ICP icon indicating copy to clipboard operation
GH-ICP copied to clipboard

Compilation error

Open Dene33 opened this issue 2 years ago • 1 comments

Scanning dependencies of target ghicp
[ 16%] Building CXX object CMakeFiles/ghicp.dir/test/ghicp_main.cpp.o
[ 33%] Building CXX object CMakeFiles/ghicp.dir/src/common_reg.cpp.o
In file included from /mnt/Shared/Demania/repos/GH-ICP-master/src/common_reg.cpp:8:0:
/usr/include/pcl-1.8/pcl/features/from_meshes.h:17:92: error: ‘Vertices’ is not a member of ‘pcl’
     computeApproximateNormals(const pcl::PointCloud<PointT>& cloud, const std::vector<pcl::Vertices>& polygons, pcl::PointCloud<PointNT>& normals)
                                                                                            ^~~~~~~~
/usr/include/pcl-1.8/pcl/features/from_meshes.h:17:92: error: ‘Vertices’ is not a member of ‘pcl’
/usr/include/pcl-1.8/pcl/features/from_meshes.h:17:100: error: template argument 1 is invalid
     computeApproximateNormals(const pcl::PointCloud<PointT>& cloud, const std::vector<pcl::Vertices>& polygons, pcl::PointCloud<PointNT>& normals)
                                                                                                    ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:17:100: error: template argument 2 is invalid
In file included from /mnt/Shared/Demania/repos/GH-ICP-master/src/common_reg.cpp:8:0:
/usr/include/pcl-1.8/pcl/features/from_meshes.h: In function ‘void pcl::features::computeApproximateNormals(const pcl::PointCloud<PointT>&, const int&, pcl::PointCloud<PointNT>&)’:
/usr/include/pcl-1.8/pcl/features/from_meshes.h:20:51: error: request for member ‘size’ in ‘polygons’, which is of non-class type ‘const int’
       int nr_polygons = static_cast<int>(polygons.size());
                                                   ^~~~
/usr/include/pcl-1.8/pcl/features/from_meshes.h:35:54: error: invalid types ‘const int[int]’ for array subscript
         const int nr_points_polygon = (int)polygons[i].vertices.size();
                                                      ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:39:58: error: invalid types ‘const int[int]’ for array subscript
         Eigen::Vector3f vec_a_b = cloud.points[polygons[i].vertices[0]].getVector3fMap() - cloud.points[polygons[i].vertices[1]].getVector3fMap();
                                                          ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:39:115: error: invalid types ‘const int[int]’ for array subscript
         Eigen::Vector3f vec_a_b = cloud.points[polygons[i].vertices[0]].getVector3fMap() - cloud.points[polygons[i].vertices[1]].getVector3fMap();
                                                                                                                   ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:40:58: error: invalid types ‘const int[int]’ for array subscript
         Eigen::Vector3f vec_a_c = cloud.points[polygons[i].vertices[0]].getVector3fMap() - cloud.points[polygons[i].vertices[2]].getVector3fMap();
                                                          ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:40:115: error: invalid types ‘const int[int]’ for array subscript
         Eigen::Vector3f vec_a_c = cloud.points[polygons[i].vertices[0]].getVector3fMap() - cloud.points[polygons[i].vertices[2]].getVector3fMap();
                                                                                                                   ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:42:64: error: invalid types ‘const int[int]’ for array subscript
         pcl::flipNormalTowardsViewpoint(cloud.points[polygons[i].vertices[0]], 0.0f, 0.0f, 0.0f, normal(0), normal(1), normal(2));
                                                                ^
/usr/include/pcl-1.8/pcl/features/from_meshes.h:46:36: error: invalid types ‘const int[int]’ for array subscript
           normals.points[polygons[i].vertices[j]].getNormalVector3fMap() += normal;
                                    ^
CMakeFiles/ghicp.dir/build.make:95: recipe for target 'CMakeFiles/ghicp.dir/src/common_reg.cpp.o' failed
make[2]: *** [CMakeFiles/ghicp.dir/src/common_reg.cpp.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/ghicp.dir/all' failed
make[1]: *** [CMakeFiles/ghicp.dir/all] Error 2
Makefile:103: recipe for target 'all' failed
make: *** [all] Error 2

Dene33 avatar May 26 '22 11:05 Dene33

Same error for me too, did you manage to solve it?

anilesec avatar May 30 '22 09:05 anilesec