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

"Undefined reference to »tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)« [closed]

asked 2020-09-07 10:00:34 -0500

lslabon gravatar image

updated 2022-05-23 09:23:53 -0500

lucasw gravatar image

Hello, I am stuck in launching the turtlebot3 navigation. I tried different things to get it run but nothing worked. Now it is even worse and my catkin_make doesn't work anymore.... Maybe this came from uninstalling tf (and reinstalling it).

I get the same two errors for different packages:

[ 88%] Building CXX object navigation/base_local_planner/CMakeFiles/base_local_planner.dir/src/footprint_helper.cpp.o
**/opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)«
collect2: error: ld returned 1 exit status
turtlebot3_simulations/turtlebot3_fake/CMakeFiles/turtlebot3_fake_node.dir/build.make:118: recipe for target '/home/lslabon/catkin_ws/devel/lib/turtlebot3_fake/turtlebot3_fake_node' failed
make[2]: *** [/home/lslabon/catkin_ws/devel/lib/turtlebot3_fake/turtlebot3_fake_node] Error 1
CMakeFiles/Makefile2:17628: recipe for target 'turtlebot3_simulations/turtlebot3_fake/CMakeFiles/turtlebot3_fake_node.dir/all' failed
make[1]: *** [turtlebot3_simulations/turtlebot3_fake/CMakeFiles/turtlebot3_fake_node.dir/all] Error 2**
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
[ 89%] Building CXX object navigation/base_local_planner/CMakeFiles/base_local_planner.dir/src/goal_functions.cpp.o
/opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)«
collect2: error: ld returned 1 exit status
slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/build.make:166: recipe for target '/home/lslabon/catkin_ws/devel/lib/gmapping/slam_gmapping' failed
make[2]: *** [/home/lslabon/catkin_ws/devel/lib/gmapping/slam_gmapping] Error 1
CMakeFiles/Makefile2:11899: recipe for target 'slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/all' failed
make[1]: *** [slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/all] Error 2
[ 89%] Building CXX object navigation/base_local_planner/CMakeFiles/base_local_planner.dir/src/map_cell.cpp.o
/opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)«
collect2: error: ld returned 1 exit status
slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/build.make:166: recipe for target '/home/lslabon/catkin_ws/devel/lib/gmapping/slam_gmapping_replay' failed
make[2]: *** [/home/lslabon/catkin_ws/devel/lib/gmapping/slam_gmapping_replay] Error 1
CMakeFiles/Makefile2:12046: recipe for target 'slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/all' failed
make[1]: *** [slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/all] Error 2

What does this line Undefined reference to »tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool) mean... ? I am kinda frustrated now.

I am using gazebo version 11.1.0 and ros melodic. I already sourced my enviroment setup for like 1000 times and tried to install tf2 again (maybe there was something missing or so)

ROS enviroment variables:

ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_PACKAGE_PATH=/home/lslabon/catkin_ws/src:/home/lslabon/mybot_ws/src:/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/lslabon/catkin_ws/devel/share/common-lisp:/home/lslabon/mybot_ws/devel/share/common-lisp
ROS_DISTRO=melodic

I hope somenody can help me with this.

Thanks a lot! Laura

PS: This was the problem I was actually trying to solve, I guess the move_base file was build bad, cause I could not find the file in opt/ros/melodic/lib - only in my catkin_ws:

$ roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=lslabon@pccad111Ubuntu/map.yaml

ERROR: cannot ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by lslabon
close date 2020-09-10 08:44:10.279847

Comments

It is getting worse... I can not uninstall something from my system. now I have an error that there is the same package multiple ways found. How can I fix this?

lslabon gravatar image lslabon  ( 2020-09-07 10:02:39 -0500 )edit

Please don't answer your question to add more information.

David Lu gravatar image David Lu  ( 2020-09-09 21:01:18 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-09-10 08:42:21 -0500

lslabon gravatar image

updated 2020-09-10 08:43:28 -0500

I've just reinstalled everything from scratch and it worked... There might have been something missing (what must have defined it) - don't know how I can close this thread now ?

edit flag offensive delete link more

Comments

Hi Islabon, I have the same problem with you. But it fails again when I reinstall the tf2_ros package. Do you have any suggestions?

Godbless gravatar image Godbless  ( 2020-12-04 21:12:16 -0500 )edit

I did not only reinstall the tf2_ros package but the whole ros and turtlebot3 Package they provide in their setup tutorial Hope everything works fine for you too then!:)

lslabon gravatar image lslabon  ( 2020-12-05 05:54:15 -0500 )edit
0

answered 2020-09-09 21:02:54 -0500

David Lu gravatar image

Please check which version of the navigation stack you have checked out. Tf2 errors like this often mean that the wrong branch is checked out. You should have the melodic-devel branch.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-07 10:00:34 -0500

Seen: 2,176 times

Last updated: Sep 10 '20