小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
cartographer用catkin_make_isolated --install --use-ninja编译报错
-
在一键下载cartographer后(感谢小鱼)用catkin_make_isolated --install --use-ninja编译,
编译到cartographer_ros时出现报错
报错信息如下:
FAILED: /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME="cartographer_ros" -DURDFDOM_HEADERS_HAS_SHARED_PTR_DEFS -I/opt/ros/foxy/lib/x86_64-linux-gnu/urdfdom_headers/cmake/../../../../include -I. -I/home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros -I/usr/src/googletest/googlemock/include -isystem /usr/include/pcl-1.10 -isystem /usr/include/eigen3 -isystem /home/chenyikeng/cartographer_ws/install_isolated/include -isystem /opt/ros/noetic/include -isystem /opt/ros/noetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -isystem /usr/include/vtk-7.1 -isystem /usr/include/freetype2 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -MD -MT CMakeFiles/cartographer_ros.dir/cartographer_ros/offline_node.cc.o -MF CMakeFiles/cartographer_ros.dir/cartographer_ros/offline_node.cc.o.d -o CMakeFiles/cartographer_ros.dir/cartographer_ros/offline_node.cc.o -c /home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/offline_node.cc
/home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/offline_node.cc: In function ‘void cartographer_ros::RunOfflineNode(const MapBuilderFactory&)’:
/home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/offline_node.cc:130:19: error: no matching function for call to ‘tf2_ros::Buffer::Buffer()’
130 | tf2_ros::Buffer tf_buffer;
| ^~~~~~~~~
In file included from /home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/tf_bridge.h:24,
from /home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.h:28,
from /home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/map_builder_bridge.h:31,
from /home/chenyikeng/cartographer_ws/src/car!tographer_ros/cartographer_ros/cartographer_ros/node.h:31,
from /home/chenyikeng/cartographer_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/offline_node.cc:29:
-
看着像你的ros环境不完整
你是ros1 还是ros2