我正在尝试安装 Google Cartographer(它用于安装在 Ubuntu 中的 ROS),但是尝试时出现了一些错误。
当我输入时,catkin_make_isolated
出现以下错误:
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Found Google Flags header in: /usr/include, in namespace: google
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if availab
Scanning dependencies of target cartographer_rosbag_validate
[ 77%] Building CXX object cartographer_ros/CMakeFiles/cartographer_rosbag_validate.dir/rosbag_validate_main.cc.o
/opt/ros/kinetic/lib/liburdf.so: undefined reference to `rosconsole_bridge::RegisterOutputHandlerProxy::~RegisterOutputHandlerProxy()'
collect2: error: ld returned 1 exit status
cartographer_ros/CMakeFiles/cartographer_offline_node.dir/build.make:215: recipe for target '/home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_offline_node' failed
make[2]: *** [/home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_offline_node] Error 1
CMakeFiles/Makefile2:3532: recipe for target 'cartographer_ros/CMakeFiles/cartographer_offline_node.dir/all' failed
make[1]: *** [cartographer_ros/CMakeFiles/cartographer_offline_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 80%] Linking CXX executable /home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_assets_writer
/opt/ros/kinetic/lib/liburdf.so: undefined reference to `rosconsole_bridge::RegisterOutputHandlerProxy::~RegisterOutputHandlerProxy()'
collect2: error: ld returned 1 exit status
cartographer_ros/CMakeFiles/cartographer_assets_writer.dir/build.make:241: recipe for target '/home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_assets_writer' failed
make[2]: *** [/home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_assets_writer] Error 1
CMakeFiles/Makefile2:3643: recipe for target 'cartographer_ros/CMakeFiles/cartographer_assets_writer.dir/all' failed
make[1]: *** [cartographer_ros/CMakeFiles/cartographer_assets_writer.dir/all] Error 2
[ 82%] Linking CXX executable /home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_node
[ 82%] Built target cartographer_node
[ 85%] Linking CXX executable /home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_pbstream_map_publisher
[ 85%] Built target cartographer_pbstream_map_publisher
[ 87%] Linking CXX executable /home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_occupancy_grid_node
[ 87%] Built target cartographer_occupancy_grid_node
[ 90%] Linking CXX executable /home/nvidia/catkin_ws/devel_isolated/cartographer_ros/lib/cartographer_ros/cartographer_rosbag_validate
[ 90%] Built target cartographer_rosbag_validate
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'cartographer_ros':
Command '['/home/nvidia/catkin_ws/devel_isolated/cartographer/env.sh', 'make', '-j6', '-l6']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/nvidia/catkin_ws/build_isolated/cartographer_ros && /home/nvidia/catkin_ws/devel_isolated/cartographer/env.sh make -j6 -l6
Command failed, exiting.
catkin_make_isolated 2668.78s user 146.34s system 407% cpu 11:30.08 total
我已经在 ROS 论坛上问过这个问题,并得到了以下答案:
最佳猜测是,您的 liburdf 和 rosconsole_bridge 版本存在 ABI 不匹配。也许可以尝试升级或重建这两个软件包?
因为现在没工作所以没法测试,所以就想到处问,想得到尽可能多的答案。(在NVIDIA Jetson TX2板上)你知道这是怎么回事吗?
答案1
就我而言,我使用以下命令安装了一些 rosconsole 包:
sudo apt-get install ros-kinetic-rosconsole*