ORB-SLAM3 ROS 编译报错:Failed to invoke rospack to get compile flags for package ‘ORB_SLAM3‘. Look abov.

ORB-SLAM3 ROS 编译报错:

Failed to invoke /opt/ros/melodic/bin/rospack deps-manifests ORB_SLAM3
[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'


CMake Error at /opt/ros/melodic/share/ros/core/rosbuild/public.cmake:129 (message):
 

  Failed to invoke rospack to get compile flags for package 'ORB_SLAM3'.
  Look above for errors from rospack itself.  Aborting.  Please fix the
  broken dependency!

即使将ROS的路径正确添加在.bashrc文件中依然报错

如图:

ORB-SLAM3 ROS 编译报错:Failed to invoke rospack to get compile flags for package ‘ORB_SLAM3‘. Look abov._第1张图片

 

根据提示,说让我们 sudo rosdep init 之后rosdep update,但是会报错!

这时候,首先查看 /etc/ros/rosdep/sources.list.d/路径下有没有20-default.list这个文件,如果没有,请按以下步骤更新:(是否是使用鱼香ROS一键安装的ros都适用以下方法:)

sudo apt-get install python3-pip 
sudo pip3 install rosdepc
sudo rosdepc init

ORB-SLAM3 ROS 编译报错:Failed to invoke rospack to get compile flags for package ‘ORB_SLAM3‘. Look abov._第2张图片

 

rosdepc update

搞定!

ORB-SLAM3 ROS 编译报错:Failed to invoke rospack to get compile flags for package ‘ORB_SLAM3‘. Look abov._第3张图片

 

之后再去.build_ros.sh就没问题了!

你可能感兴趣的:(ORB-SLAM3,机器人,ubuntu,c++)