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

asked 2020-09-07 09:58:12 -0500

lslabon 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 duplicate question by lslabon
close date 2020-09-10 08:44:54.116835