Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colcon error casued by the lack of dependence tf2_eigen #737

Open
GoesM opened this issue Jul 12, 2024 · 0 comments
Open

colcon error casued by the lack of dependence tf2_eigen #737

GoesM opened this issue Jul 12, 2024 · 0 comments

Comments

@GoesM
Copy link

GoesM commented Jul 12, 2024

description

when I colcon build ros-bridge within ROS2-humble, I faced to the following errors:

--- stderr: pcl_recorder                               
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
In file included from /home/***/ros-bridge/pcl_recorder/src/mainROS2.cpp:7:
/home***/ros-bridge/pcl_recorder/include/PclRecorderROS2.h:13:10: fatal error: 'tf2_eigen/tf2_eigen.h' file not found
#include <tf2_eigen/tf2_eigen.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/pcl_recorder_node.dir/build.make:90: CMakeFiles/pcl_recorder_node.dir/src/mainROS2.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /home/***/ros-bridge/pcl_recorder/src/PclRecorderROS2.cpp:13:
/home/***/ros-bridge/pcl_recorder/include/PclRecorderROS2.h:13:10: fatal error: 'tf2_eigen/tf2_eigen.h' file not found
#include <tf2_eigen/tf2_eigen.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/pcl_recorder_node.dir/build.make:76: CMakeFiles/pcl_recorder_node.dir/src/PclRecorderROS2.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/pcl_recorder_node.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

analysis

I found the following cmakelist settings should be wrong:

ament_target_dependencies(${PROJECT_NAME}_node rclcpp sensor_msgs
pcl_conversions tf2 tf2_ros)

there seems the lack of dependence tf2_eigen .

suggestion

I changed it as followings, and everything is ok now.

  ament_target_dependencies(${PROJECT_NAME}_node rclcpp sensor_msgs
                            pcl_conversions tf2 tf2_ros tf2_eigen)

Shall I submit a PR to fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant