Robotics StackExchange | Archived questions

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

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/baselocalplanner/CMakeFiles/baselocalplanner.dir/src/footprinthelper.cpp.o **/opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)« collect2: error: ld returned 1 exit status turtlebot3simulations/turtlebot3fake/CMakeFiles/turtlebot3fakenode.dir/build.make:118: recipe for target '/home/lslabon/catkinws/devel/lib/turtlebot3fake/turtlebot3fakenode' failed make[2]: *** [/home/lslabon/catkinws/devel/lib/turtlebot3fake/turtlebot3fakenode] Error 1 CMakeFiles/Makefile2:17628: recipe for target 'turtlebot3simulations/turtlebot3fake/CMakeFiles/turtlebot3fakenode.dir/all' failed make[1]: *** [turtlebot3simulations/turtlebot3fake/CMakeFiles/turtlebot3fakenode.dir/all] Error 2** make[1]: *** Auf noch nicht beendete Prozesse wird gewartet … [ 89%] Building CXX object navigation/baselocalplanner/CMakeFiles/baselocalplanner.dir/src/goalfunctions.cpp.o /opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)« collect2: error: ld returned 1 exit status slamgmapping/gmapping/CMakeFiles/slamgmapping.dir/build.make:166: recipe for target '/home/lslabon/catkinws/devel/lib/gmapping/slamgmapping' failed make[2]: *** [/home/lslabon/catkinws/devel/lib/gmapping/slamgmapping] Error 1 CMakeFiles/Makefile2:11899: recipe for target 'slamgmapping/gmapping/CMakeFiles/slamgmapping.dir/all' failed make[1]: *** [slamgmapping/gmapping/CMakeFiles/slamgmapping.dir/all] Error 2 [ 89%] Building CXX object navigation/baselocalplanner/CMakeFiles/baselocalplanner.dir/src/mapcell.cpp.o /opt/ros/melodic/lib/libtf.so: Warnung: undefinierter Verweis auf »tf2ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)« collect2: error: ld returned 1 exit status slamgmapping/gmapping/CMakeFiles/slamgmappingreplay.dir/build.make:166: recipe for target '/home/lslabon/catkinws/devel/lib/gmapping/slamgmappingreplay' failed make[2]: *** [/home/lslabon/catkinws/devel/lib/gmapping/slamgmappingreplay] Error 1 CMakeFiles/Makefile2:12046: recipe for target 'slamgmapping/gmapping/CMakeFiles/slamgmappingreplay.dir/all' failed make[1]: *** [slamgmapping/gmapping/CMakeFiles/slamgmapping_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: ROSETCDIR=/opt/ros/melodic/etc/ros ROSROOT=/opt/ros/melodic/share/ros ROSMASTERURI=http://localhost:11311 ROSVERSION=1 ROSPYTHONVERSION=2 ROSPACKAGEPATH=/home/lslabon/catkinws/src:/home/lslabon/mybotws/src:/opt/ros/melodic/share ROSLISPPACKAGEDIRECTORIES=/home/lslabon/catkinws/devel/share/common-lisp:/home/lslabon/mybotws/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 movebase file was build bad, cause I could not find the file in opt/ros/melodic/lib - only in my catkinws:

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

ERROR: cannot launch node of type [movebase/movebase]: Cannot locate node of type [movebase] in package [movebase]. Make sure file exists in package path and permission is set to executable (chmod +x)

Asked by lslabon on 2020-09-07 09:58:12 UTC

Comments

Answers