Adlink-ROS / rf2o_laser_odometry

GNU General Public License v3.0
31 stars 6 forks source link

Build errors #3

Closed ashBabu closed 3 months ago

ashBabu commented 3 months ago

Hi, I have been getting the following errors when I try to build the package. I understand the branch is for foxy but it seems to be coming from Eigen. Any pointers?

ROS: Jazzy Eigen3: 3.4.0-4

In member function ‘void rf2o::CLaserOdometry2D::performWarping()’:
/home/ash/ros2_ws/src/rf2o_laser_odometry/src/CLaserOdometry2D.cpp:771:51: error: no match for ‘operator+=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<float, -1, -1>, double, Eigen::internal::SingleRange> >::type’ {aka ‘Eigen::IndexedView<Eigen::Matrix<float, -1, -1>, double, Eigen::internal::SingleRange>’} and ‘const float’)
  771 |           range_warped[image_level](round(uwarp)) += range_w;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

error: no match for ‘operator+=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<float, -1, -1>, float, Eigen::internal::SingleRange> >::type’ {aka ‘Eigen::IndexedView<Eigen::Matrix<float, -1, -1>, float, Eigen::internal::SingleRange>’} and ‘float’)
  772 |           wacu(std::round(uwarp)) += 1.f;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

error: static assertion failed: YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX
  157 |   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GondotCl commented 3 months ago

hello, i got similar issue using ROS2 humble, i resolved it on my fork of the package, see : https://github.com/GondotCl/rf2o_laser_odometry

I didn't change a lot, you can look at the few commits I made for details

ashBabu commented 3 months ago

Thanks @GondotCl . It compiled and worked for me. May be consider making a PR? Closing this