问题解决: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就没问题了

 

 

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sagima_sdu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值