Ask Your Question
2

How to fix error in building the lidar_localizer package?

asked 2019-07-22 14:42:56 -0500

JoshuaSiy gravatar image

updated 2019-07-24 00:47:25 -0500

jayess gravatar image

Greetings,

I am unsure how to resolve the error in building autoware and i have been following the instructions on this site.

system specs:

Ubuntu 16.04/ CUDA 9.0/ Eigen3/ Kinetic/ Autoware Version 1.11

The final results of the colcon build is.

Aborted  <<< lidar_euclidean_cluster_detect
Aborted  <<< costmap_generator


Summary: 121 packages finished [1min 18s]

    1 package failed: lidar_localizer
    7 packages aborted: costmap_generator lidar_euclidean_cluster_detect naive_motion_predict points_preprocessor road_occupancy_processor sick_ldmrs_laser trafficlight_recognizer
    3 packages had stderr output: lidar_euclidean_cluster_detect lidar_localizer trafficlight_recognizer
    10 packages not processed

One error occurred in the code for ndt_mapping

[Processing: dp_planner, ff_waypoint_follower, lattice_planner, lidar_kf_contour_track, lidar_localizer, trafficlight_recognizer, way_planner, waypoint_maker]
--- stderr: lidar_localizer                                                    
    In file included from /usr/local/include/eigen3/Eigen/Eigenvalues:35:0,
                 from /usr/local/include/eigen3/Eigen/Dense:7,
                 from /home/joshua/autoware.ai/install/ndt_cpu/include/ndt_cpu/Registration.h:4,
                 from /home/joshua/autoware.ai/install/ndt_cpu/include/ndt_cpu/NormalDistributionsTransform.h:4,
                 from /home/joshua/autoware.ai/src/autoware/core_perception/lidar_localizer/nodes/ndt_matching/ndt_matching.cpp:56:
    /usr/local/include/eigen3/Eigen/src/misc/RealSvd2x2.h:19:6: error: redefinition of ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation<RealScalar>*, Eigen::JacobiRotation<RealScalar>*)’
 void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q,
      ^
In file included from /usr/include/eigen3/Eigen/SVD:36:0,
                 from /usr/include/eigen3/Eigen/Geometry:15,
                 from /usr/include/pcl-1.7/pcl/point_cloud.h:47,
                 from /opt/ros/kinetic/include/pcl_ros/point_cloud.h:5,
                 from /opt/ros/kinetic/include/velodyne_pointcloud/rawdata.h:33,
                 from /home/joshua/autoware.ai/src/autoware/core_perception/lidar_localizer/nodes/ndt_matching/ndt_matching.cpp:41:
    /usr/include/eigen3/Eigen/src/SVD/JacobiSVD.h:405:6: note: ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation<RealScalar>*, Eigen::JacobiRotation<RealScalar>*)’ previously declared here


 void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q,
      ^
In file included from /usr/local/include/eigen3/Eigen/Eigenvalues:35:0,
                 from /usr/local/include/eigen3/Eigen/Dense:7,
                 from /home/joshua/autoware.ai/install/ndt_cpu/include/ndt_cpu/Registration.h:4,
                 from /home/joshua/autoware.ai/install/ndt_cpu/include/ndt_cpu/NormalDistributionsTransform.h:4,
                 from /home/joshua/autoware.ai/src/autoware/core_perception/lidar_localizer/nodes/ndt_mapping/ndt_mapping.cpp:47:
/usr/local/include/eigen3/Eigen/src/misc/RealSvd2x2.h:19:6: error: redefinition of ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation<RealScalar>*, Eigen::JacobiRotation<RealScalar>*)’
 void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q,
      ^
In file included from /usr/include/eigen3/Eigen/SVD:36:0,
                 from /usr/include/eigen3/Eigen/Geometry:15,
                 from /usr/include/pcl-1.7/pcl/point_cloud.h:47,
                 from /opt/ros/kinetic/include/pcl_ros/point_cloud.h:5,
                 from /opt/ros/kinetic/include/velodyne_pointcloud/rawdata.h:33,
                 from /home/joshua/autoware.ai/src/autoware/core_perception/lidar_localizer/nodes/ndt_mapping/ndt_mapping.cpp:37:
/usr/include/eigen3/Eigen/src/SVD/JacobiSVD.h:405:6: note: ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation<RealScalar>*, Eigen::JacobiRotation<RealScalar>*)’ previously declared here
 void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q,
      ^
make ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-07-23 21:33:41 -0500

Yamato Ando gravatar image

It seems that Eigen::internal::real_2x2_jacobi_svd funtion is defined twice.

Please reinstall Eigen.

As shown in the following commit, it seems to move the function from JacobiSVD.h to RealSvd2x2.h. https://bitbucket.org/eigen/eigen/com...

edit flag offensive delete link more

Comments

Thank you.

JoshuaSiy gravatar imageJoshuaSiy ( 2019-07-24 05:59:13 -0500 )edit

Still having the problem after uninstall and reinstall Eigen. Should I switch to an older version of Eigen?

mhxu gravatar imagemhxu ( 2019-08-22 19:00:12 -0500 )edit

@mhxu Are you exactly the same error? Are two Eigen installed? Either uninstall one or set it so that it will not be referenced during build.

Yamato Ando gravatar imageYamato Ando ( 2019-08-26 02:40:58 -0500 )edit

@Yamato Ando . Yes, I think the problem might be two Eigen were installed. I figured out that I don't have to manually install Eigen from source. Eigen has already been installed on my machine by command apt-get install libeigen3-dev.

mhxu gravatar imagemhxu ( 2019-08-26 18:30:52 -0500 )edit

@mhxu Could you remove Eigen installed from source? Like the command, $ cd <Eigen-source-directory>/build $ sudo make uninstall

Yamato Ando gravatar imageYamato Ando ( 2019-08-27 04:58:55 -0500 )edit

@Yamato Ando . Problem resolved after removing the Eigen from source. Thank you.

mhxu gravatar imagemhxu ( 2019-08-27 11:33:32 -0500 )edit

@mhxu Great !

Yamato Ando gravatar imageYamato Ando ( 2019-08-27 21:35:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-07-22 14:42:56 -0500

Seen: 129 times

Last updated: Jul 24