humanoid-path-planner / hpp-fcl

An extension of the Flexible Collision Library
Other
305 stars 89 forks source link

Installation make error #38

Closed ShihaoWang closed 5 years ago

ShihaoWang commented 5 years ago

Hi there,

There is an error during the installation process after a successful cmake .. . My OS is Ubunbu 14.04 and the output of the cmake is

shihao@shihao-OptiPlex-7040:~/hpp-fcl/build$ cmake ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Performing Test R-pedantic
-- Performing Test R-pedantic - Success
-- Performing Test R-Wno-long-long
-- Performing Test R-Wno-long-long - Success
-- Performing Test R-Wall
-- Performing Test R-Wall - Success
-- Performing Test R-Wextra
-- Performing Test R-Wextra - Success
-- Performing Test R-Wcast-align
-- Performing Test R-Wcast-align - Success
-- Performing Test R-Wcast-qual
-- Performing Test R-Wcast-qual - Success
-- Performing Test R-Wformat
-- Performing Test R-Wformat - Success
-- Performing Test R-Wwrite-strings
-- Performing Test R-Wwrite-strings - Success
-- Performing Test R-Wconversion
-- Performing Test R-Wconversion - Success
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6") 
-- eigen3 >= 3.0.0 is required.
-- checking for module 'eigen3 >= 3.0.0'
--   found eigen3 , version 3.2.0
-- Pkg-config module eigen3 v3.2.0 has been detected with success.
-- Boost version: 1.54.0
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   filesystem
--   system
--   unit_test_framework
-- octomap >= 1.6 is optional.
-- checking for module 'octomap >= 1.6'
--   found octomap , version 1.9.0
-- Pkg-config module octomap v1.9.0 has been detected with success.
-- FCL uses Octomap
-- assimp >= 2.0 is required.
-- checking for module 'assimp >= 2.0'
--   found assimp , version 3.0.1264
-- Pkg-config module assimp v3.0.1264 has been detected with success.
-- Assimp version has unified headers
-- Failed to find latex/dvips/gs, will use MathJax backend.
-- Doxygen rendering: using MathJax backend
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shihao/hpp-fcl/build

After I type the make -j8 to proceed the installation, two errors have been reported.

  1. /usr/include/eigen3/Eigen/src/Core/../plugins/MatrixCwiseBinaryOps.h:110:72: error: could not convert ‘Eigen::MatrixBase<Derived>::cwiseMax(const Eigen::MatrixBase<OtherDerived>&) const [with OtherDerived = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> >; Derived = Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >; typename Eigen::internal::traits<T>::Scalar = double]((*(const Eigen::MatrixBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> > >*)(& Eigen::DenseBase<Derived>::Constant(Eigen::DenseBase<Derived>::Index, Eigen::DenseBase<Derived>::Index, const Scalar&) [with Derived = Eigen::Matrix<double, 3, 1>; Eigen::DenseBase<Derived>::ConstantReturnType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> >; typename Eigen::internal::traits<T>::Scalar = double; Eigen::DenseBase<Derived>::Index = long int; Eigen::DenseBase<Derived>::Scalar = double](((const Eigen::EigenBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > >*)this)->Eigen::EigenBase<Derived>::cols<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > >(), (* & other)))))’ from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> > >’ to ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > > >’
  2. /home/shihao/hpp-fcl/src/distance_sphere_sphere.cpp:75:58: error: operands to ?: have different types ‘const Eigen::CwiseUnaryOp<Eigen::internal::scalar_quotient1_op<double>, const Eigen::Matrix<double, 3, 1> >’ and ‘fcl::Vec3f {aka Eigen::Matrix<double, 3, 1>}’
     Vec3f unit (dist > epsilon ? c1c2/dist : Vec3f (0,0,0));
                                                          ^
    /home/shihao/hpp-fcl/src/distance_sphere_sphere.cpp: In function ‘std::size_t fcl::ShapeShapeCollide(const fcl::CollisionGeometry*, const fcl::Transform3f&, const fcl::CollisionGeometry*, const fcl::Transform3f&, const NarrowPhaseSolver*, const fcl::CollisionRequest&, fcl::CollisionResult&) [with T_SH1 = fcl::Sphere; T_SH2 = fcl::Sphere; NarrowPhaseSolver = fcl::GJKSolver_indep; std::size_t = long unsigned int]’:
    /home/shihao/hpp-fcl/src/distance_sphere_sphere.cpp:115:58: error: operands to ?: have different types ‘const Eigen::CwiseUnaryOp<Eigen::internal::scalar_quotient1_op<double>, const Eigen::Matrix<double, 3, 1> >’ and ‘fcl::Vec3f {aka Eigen::Matrix<double, 3, 1>}’
     Vec3f unit (dist > epsilon ? c1c2/dist : Vec3f (0,0,0));

It seems to me that the error results from the Eigen3 library but I am not quite sure about what I should do with this problem. Can you help me with it?

florent-lamiraux commented 5 years ago

It seems that the compiler is confused by the use of "?" in place of "if" in distance_sphere_sphere.cpp: line 75. Can you try to replace the line by Vec3f unit (0,0,0); if (dist > epsilon) unit = c1c2/dist; If it compiles, please make a pull request.

ShihaoWang commented 5 years ago

Hi, Thanks for your reply. After the replacement of original line with the provided code, the error in distance_sphere_sphere.cpp has been resolved. However, with the proceeding of the make -j4 command, a new error shows up: (relevant to /hpp-fcl/src/BV/OBB.cpp:317:60:)

/usr/include/eigen3/Eigen/src/Core/../plugins/MatrixCwiseBinaryOps.h:110:72: error: could not convert ‘Eigen::MatrixBase<Derived>::cwiseMax(const Eigen::MatrixBase<OtherDerived>&) const [with OtherDerived = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> >; Derived = 
Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >; typename Eigen::internal::traits<T>::Scalar = double]((*(const Eigen::MatrixBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> > >*)(& 
Eigen::DenseBase<Derived>::Constant(Eigen::DenseBase<Derived>::Index, Eigen::DenseBase<Derived>::Index, const Scalar&) [with Derived = Eigen::Matrix<double, 3, 1>; Eigen::DenseBase<Derived>::ConstantReturnType = 
Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> >; typename Eigen::internal::traits<T>::Scalar = double; Eigen::DenseBase<Derived>::Index = long int; Eigen::DenseBase<Derived>::Scalar = double](((const 
Eigen::EigenBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > 
>*)this)->Eigen::EigenBase<Derived>::cols<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > >(), (* & other)))))’ from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double>, const 
Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >, const 
Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1> > >’ to ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >, const 
Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> > > >’
   return cwiseMax(Derived::PlainObject::Constant(rows(), cols(), other));

Is there something I need to change to get rid of this problem?

florent-lamiraux commented 5 years ago

It seems that the changes we made are not compatible with older versions of eigen. Can you try to checkout branch "master", it should work better.

florent-lamiraux commented 5 years ago

Another option is to upgrade to Ubuntu-16.04.

jcarpent commented 5 years ago

@ShihaoWang You can install directly hpp-fcl using the binary versions. They are available on 14.04. Please follow the installation guide: https://stack-of-tasks.github.io/pinocchio/download.html to configure apt-get with the correct distribution name. And then just type in a terminal:

sudo apt-get install robotpkg-hpp-fcl
jcarpent commented 5 years ago

@florent-lamiraux I think you should not break the compatibility with 14.04 when upgrading hpp-fcl core content because other projects are still running on 14.04 (on HRP-2 mostly). The unit tests have to be activated in travis to avoid such kind of errors.

I know this is a tedious task requiring additional force task, but it will save time later.

ShihaoWang commented 5 years ago

Hi @jcarpent and @florent-lamiraux,

Thanks for your reply and suggestion. I tried to install hpp-fcl with the apt-get method and this actually works well for the package installation without further effort.

jcarpent commented 5 years ago

@ShihaoWang Good to know that the installation procedure has successfully worked! I gonna close this issue now. Feel free to reopen it when you want.