Linking error libtf.so

asked 2020-05-02 16:28:15 -0500

ROS__ROS gravatar image

updated 2022-05-28 17:09:16 -0500

lucasw gravatar image

Hi all,

I'm linking the TF library, but somehow I get a linking error in the TF library. I already tried to reinstall the TF package but somehow i can't get it working. This is the error I get:

/opt/ros/melodic/lib/libtf.so: undefined reference to `tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)'
collect2: error: ld returned 1 exit status
edit retag flag offensive close merge delete

Comments

Hello, I have the same problem! Have you managed to solve this issue?

bboylevi89@gmail.com gravatar image bboylevi89@gmail.com  ( 2020-07-19 18:48:53 -0500 )edit

Yes, somehow it was linking against the wrong TF library which was inside of my repo. I removed them from my own repository and got it working.

ROS__ROS gravatar image ROS__ROS  ( 2020-07-21 06:17:20 -0500 )edit

Did u mean the "libtf.so" is the wrong one and the correct one is "libtf2.so"? Thanks!

bboylevi89@gmail.com gravatar image bboylevi89@gmail.com  ( 2020-07-21 06:32:19 -0500 )edit

First test the TF library in a new project and see if it works. In case it works, there is nothing wrong with your ROS installation. In my case it worked in another project, so I knew the fault was in my repository. I'm not really sure what you mean, but in my case I had to remove a lot of TF files which were in my local repository and I linked them from my installation instead.

ROS__ROS gravatar image ROS__ROS  ( 2020-07-29 06:52:31 -0500 )edit

hello, I am having this issue but still do not know how to solve it?

sal gravatar image sal  ( 2022-04-12 15:23:13 -0500 )edit