ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

tf2_eigen include does not find library Eigen/Geometry

asked 2018-11-28 15:12:32 -0500

teflon gravatar image

updated 2018-11-28 15:18:27 -0500

gvdhoorn gravatar image

Hi,

I want to use tf2_eigen to convert geometry_msgs/Vector3 messages (and further geometry_msgs) to eigen-vectors to use them for calculations.

The preprocessor does not find this include in tf2_eigen: #include <Eigen/Geometry>

I deem the reason for this is that eigen3 is installed on my computer and the path should be: <eigen3/Eigen/Geometry>

Do you have an idea how I can handle this problem? I have no permission to change the tf2_eigen file.

Additionaly my CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(px4_data_observer)
find_package(catkin REQUIRED COMPONENTS
  roscpp
  message_filters
  geometry_msgs
  sensor_msgs
  eigen_conversions
  tf2
  tf2_eigen
)
find_package(Eigen3 REQUIRED)
catkin_package(
)
include_directories(
  include
  ${catkin_INCLUDE_DIRS}
  ${Eigen_INCLUDE_DIRS}
)

Thank you in advanced!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-29 04:48:58 -0500

teflon gravatar image

I include now Eigen3 and fixed a misstake I did in my code. I used the wrong namespace. Instead of the correct tf2::fromMsg () I used Eigen::fromMsg() because the autocomplition suggests this. My preprocessor still does not find the Eigen/Geometry include but building works. Also the function tf2::fromMsg() works now :) Thank you very much for the hint!

edit flag offensive delete link more
0

answered 2018-11-28 16:07:40 -0500

tfoote gravatar image

Are you sure that your ${Eigen_INCLUDE_DIRS} is correct. I believe it should be Eigen3 to match the find_package argument.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-28 15:12:32 -0500

Seen: 1,555 times

Last updated: Nov 29 '18