问题解决:Ubuntu安装ROS依赖出现ERROR: the following packages/stacks could not have their rosdep keys resolvedt

一、具体问题

电脑硬盘不够用了,故加装硬盘重装系统和ROS,在执行

sudo rosdep init
rosdep update

这两步时都很顺利,下面需要安装一些ROS依赖,却遇到了如下报错:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
simple_models_description: Cannot locate rosdep definition for [urdf_test]
pmb2_rgbd_sensors: Cannot locate rosdep definition for [openni2_launch]
omni_base_description: Cannot locate rosdep definition for [urdf_test]
pmb2_description: Cannot locate rosdep definition for [urdf_test]
pal_navigation_cfg_pmb2: Cannot locate rosdep definition for [spatio_temporal_voxel_layer]
pal_navigation_cfg_pmb3: Cannot locate rosdep definition for [spatio_temporal_voxel_layer]
pal_navigation_cfg_ari: Cannot locate rosdep definition for [slam_toolbox]
pal_gripper_description: Cannot locate rosdep definition for [urdf_test]
tiago_description: Cannot locate rosdep definition for [urdf_test]
omni_base_laser_sensors: Cannot locate rosdep definition for [ira_laser_tools]
social_navigation_layers: Cannot locate rosdep definition for [people_msgs]
pal_navigation_cfg_tiago: Cannot locate rosdep definition for [spatio_temporal_voxel_layer]
pmb2_laser_sensors: Cannot locate rosdep definition for [depthimage_to_laserscan]
tiago_bringup: Cannot locate rosdep definition for [usb_cam]
tiago_laser_sensors: Cannot locate rosdep definition for [ira_laser_tools]
tiago_rgbd_sensors: Cannot locate rosdep definition for [openni2_launch]
omni_base_bringup: Cannot locate rosdep definition for [twist_mux]
pmb2_bringup: Cannot locate rosdep definition for [twist_mux]
pal_robotiq_controller_configuration_gazebo: Cannot locate rosdep definition for [roboticsgroup_upatras_gazebo_plugins]
pal_navigation_cfg_tiago_dual: Cannot locate rosdep definition for [spatio_temporal_voxel_layer]
four_wheel_steering_controller: Cannot locate rosdep definition for [urdf_geometry_parser]

起初怀疑过是不是网络问题、rosdep的问题、conda环境的问题,但都没有解决,甚至卸载重装了一遍rosdep,最终找到解决方案

二、具体环境

Ubuntu 18.04 + ROS melodic

三、解决方法

上述问题其实和之前提到的想法没有关系,是在安装ROS的过程中遗漏了很多包没有安装,我意识到是因为缺少了报错中【】中的内容

因此拿第一行报错举例

simple_models_description: Cannot locate rosdep definition for [urdf_test]

解决这行的问题,就使用

sudo apt-get install ros-melodic-urdf-test

来进行安装,如何以此类推,将报错中所有的框框里的包,用

sudo apt-get install ros-你的ROS版本-包名

的方式进行单独安装,记住,报错中包名里面的下划线“_”,在安装时需要改成短横线“-”

在全部安装完成后,重新执行安装依赖的指令

最后出现#All required rosdeps installed successfully就没问题了

 

猜你喜欢

转载自blog.csdn.net/weixin_45498383/article/details/131779941
今日推荐