ROS MelodicでTurtlebot3をGazeboで動かしてついでにSLAMする
https://qiita.com/protocol1964/items/1e63aebddd7d5bfd0d1b
上記サイトを実行中、最後のgmappingの環境構築でgmapping関連のパッケージをcloneしました。
その後、catkin_makeで下記エラーが出ます。
ご教授願います。
[ 79%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping_nodelet.dir/src/slam_gmapping.cpp.o
Scanning dependencies of target slam_gmapping
[ 80%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/src/slam_gmapping.cpp.o
[ 80%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping_nodelet.dir/src/nodelet.cpp.o
[ 80%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/src/main.cpp.o
[ 81%] Linking CXX shared library /home/yoshi/catkin_ws/devel/lib/libslam_gmapping_nodelet.so
[ 81%] Built target slam_gmapping_nodelet
Scanning dependencies of target slam_gmapping_replay
[ 81%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/src/slam_gmapping.cpp.o
[ 81%] Linking CXX executable /home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping
/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 slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/build.make:165: recipe for target '/home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping' failed make[2]: *** [/home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping] Error 1 CMakeFiles/Makefile2:9702: recipe for target 'slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/all' failed make[1]: *** [slam_gmapping/gmapping/CMakeFiles/slam_gmapping.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 81%] Building CXX object slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/src/replay.cpp.o [ 81%] Linking CXX executable /home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping_replay /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
slam_gmapping/gmapping/CMakeFiles/slam_gmapping_replay.dir/build.make:165: recipe for target '/home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping_replay' failed
make[2]: *** [/home/yoshi/catkin_ws/devel/lib/gmapping/slam_gmapping_replay] Error 1
CMakeFiles/Makefile2:9849: 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
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。