cartographer编译报错

问题描述:在我修改了lua文件重新编译之后,报了如下的错,翻找了一些资料也没发现问题具体在哪,报错信息不是很有价值,感觉是因为版本不匹配的问题。

[1/41] Building CXX object CMakeFiles/...rtographer_ros/map_builder_bridge.cc.o
FAILED: CMakeFiles/cartographer_ros.dir/cartographer_ros/map_builder_bridge.cc.o 
/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. -I/home/magiclp/Library-Robot/carto_catkin_ws/src/cartographer_ros/cartographer_ros -isystem /usr/include/lua5.2 -isystem /usr/include/pcl-1.10 -isystem /usr/include/eigen3 -isystem /home/magiclp/Library-Robot/carto_catkin_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/map_builder_bridge.cc.o -MF CMakeFiles/cartographer_ros.dir/cartographer_ros/map_builder_bridge.cc.o.d -o CMakeFiles/cartographer_ros.dir/cartographer_ros/map_builder_bridge.cc.o -c /home/magiclp/Library-Robot/carto_catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/map_builder_bridge.cc
In file included from /home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/ceres/ceres.h:65,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/cartographer/common/math.h:25,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/cartographer/mapping/submaps.h:24,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/cartographer/mapping/pose_graph_interface.h:25,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/cartographer/mapping/map_builder_interface.h:29,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/map_builder_bridge.h:26,
                 from /home/magiclp/Library-Robot/carto_catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/map_builder_bridge.cc:17:
/home/magiclp/Library-Robot/carto_catkin_ws/install_isolated/include/ceres/product_manifold.h:315:59: error: expected constructor, destructor, or type conversion before ‘;’ token
  315 |     -> ProductManifold;
解决办法

删除之前编译的这三个文件夹删除,重新进行编译命令

catkin_make_isolated --install --usu-ninja

 问题解决!

你可能感兴趣的:(机器人)