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

undefined reference to `tf::pointEigenToMsg

asked 2019-07-23 12:29:29 -0500

Henning Luo gravatar image

I'm working on Ubuntu 16.04 with ROS Kinetic.

In my program I was trying to convert an Eigen::Vector3d to a geometry_msgs::Point.

The error:

undefined reference to `tf::pointEigenToMsg(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, geometry_msgs::Point_<std::allocator<void> >&)'

I have included the header:

#include <eigen_conversions/eigen_msg.h>
#include <tf/tf.h>
#include <tf_conversions/tf_eigen.h>

and in my CMakeLists.txt

find_package(catkin REQUIRED COMPONENTS 
    roscpp 
    std_msgs
    sensor_msgs
    geometry_msgs
    tf
    tf_conversions
    eigen_conversions
    pcl_ros
    pcl_conversions
    cv_bridge
    image_transport
    message_filters
    OpenCV
    yumi_vision_srv
)

also in the package.xml

  <depend>tf</depend>  
  <depend>tf_conversions</depend>
  <depend>eigen_conversions</depend>

Does anybody know why is this happening? Thank you so much for your help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-17 02:45:14 -0500

Albtech gravatar image

This seems to be a linker problem. Therefore make sure that you have properly installed the library files or you are doing right the target_link_libraries() part inside you CMakeLists.txt.
Try this just in case: sudo apt-get install ros-$ROS_DISTRO-eigen-conversions

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-07-23 12:29:29 -0500

Seen: 914 times

Last updated: Apr 17 '20