MarkusEich/cpf_segmentation

error when make

Opened this issue · 1 comments

Hi, after cmake .. I tried to make but result in having these errors related to Eigen. Would you please give me some suggestions on where to find exactly the problem is? Many thanks!

The following statements are what I get with make command:

Scanning dependencies of target segmentation
[ 14%] Building CXX object CMakeFiles/segmentation.dir/src/segmentation.cpp.o
In file included from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:85:0,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h: In function ‘bool isConvex(Eigen::Vector3f, Eigen::Vector3f, Eigen::Vector3f, Eigen::Vector3f)’:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:30:73: error: too many arguments to function ‘double pcl::getAngle3D(const Vector4f&, const Vector4f&)’
float normal_angle = pcl::getAngle3D(source_normal, target_normal, true);
^
In file included from /usr/include/pcl-1.7/pcl/common/common.h:194:0,
from /usr/include/pcl-1.7/pcl/octree/impl/octree_pointcloud.hpp:45,
from /usr/include/pcl-1.7/pcl/octree/octree_impl.h:46,
from /usr/include/pcl-1.7/pcl/octree/octree_pointcloud_adjacency.h:46,
from /usr/include/pcl-1.7/pcl/segmentation/supervoxel_clustering.h:49,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:61,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/pcl-1.7/pcl/common/impl/common.hpp:46:1: note: declared here
pcl::getAngle3D (const Eigen::Vector4f &v1, const Eigen::Vector4f &v2)
^
In file included from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:85:0,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:61:70: error: too many arguments to function ‘double pcl::getAngle3D(const Vector4f&, const Vector4f&)’
float intersection_angle = pcl::getAngle3D (ncross, vec_t_to_s, true);
^
In file included from /usr/include/pcl-1.7/pcl/common/common.h:194:0,
from /usr/include/pcl-1.7/pcl/octree/impl/octree_pointcloud.hpp:45,
from /usr/include/pcl-1.7/pcl/octree/octree_impl.h:46,
from /usr/include/pcl-1.7/pcl/octree/octree_pointcloud_adjacency.h:46,
from /usr/include/pcl-1.7/pcl/segmentation/supervoxel_clustering.h:49,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:61,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/pcl-1.7/pcl/common/impl/common.hpp:46:1: note: declared here
pcl::getAngle3D (const Eigen::Vector4f &v1, const Eigen::Vector4f &v2)
^
/home/claude/cpf_segmentation-master/src/segmentation.cpp: In member function ‘void APC::Segmentation::doSegmentation()’:
/home/claude/cpf_segmentation-master/src/segmentation.cpp:51:10: error: ‘class pcl::SupervoxelClusteringpcl::PointXYZRGBA’ has no member named ‘setUseSingleCameraTransform’
super.setUseSingleCameraTransform (config_.use_single_cam_transform);
^
In file included from /usr/include/eigen3/Eigen/Core:254:0,
from /usr/include/eigen3/Eigen/StdVector:14,
from /usr/include/pcl-1.7/pcl/point_cloud.h:46,
from /usr/include/pcl-1.7/pcl/io/pcd_io.h:43,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:55,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/eigen3/Eigen/src/Core/Assign.h: In instantiation of ‘Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:411:46: required from ‘Derived& Eigen::PlainObjectBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’
/usr/include/eigen3/Eigen/src/Core/Assign.h:520:123: required from ‘static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<float, 4, 1>; OtherDerived = Eigen::Matrix<float, 3, 1>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:618:105: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:281:31: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; _Scalar = float; int _Rows = 4; int _Cols = 1; int _Options = 0; int _MaxRows = 4; int _MaxCols = 1]’
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:30:73: required from here
/usr/include/eigen3/Eigen/src/Core/Assign.h:492:3: error: ‘YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES’ is not a member of ‘Eigen::internal::static_assertion’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
^
make[2]: *** [CMakeFiles/segmentation.dir/src/segmentation.cpp.o] Error 1
make[1]: *** [CMakeFiles/segmentation.dir/all] Error 2
make: *** [all] Error 2

I guess the error is due to pcl 1.7. Could you try pcl 1.8 instead?
I have committed a new version, which works better than the old one. Please check it out.