ORB-SLAM3 ROS compilation error:
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!
Even if the path to ROS is correctly added to the .bashrc file, an error still occurs
As shown in the picture:
According to the prompt, let us sudo rosdep init and then rosdep update, but an error will be reported!
At this time, first check if there is a file 20-default.list in the /etc/ros/rosdep/sources.list.d/ path. If not, please update it according to the following steps: (Whether it was installed with one click of Yuxiang ROS The following methods are applicable to ros:)
sudo apt-get install python3-pip
sudo pip3 install rosdepc
sudo rosdepc init
rosdepc update
Done!