ROS Noetic版本中关于“使用rospack命令工具来查看这些一级依赖包“报错解决方法
问题描述:
在跟随ROS初级教程-创建ROS软件包这一步骤,可能会遇见下面问题:
smw@smw-Lenovo-G400:~/catkin_ws$ rospack depends1 beginner_tutorials
[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
smw@smw-Lenovo-G400:~/catkin_ws$ sudo rosdep init
sudo: rosdep:找不到命令
个人解决过程:
首先根据网上其他版本解决方式得到下述结果:
smw@smw-Lenovo-G400:~/catkin_ws$ sudo apt-get install python-rosdep
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 python-rosdep,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 python-rosdep 没有可安装候选
新版本中软件包 python-rosdep不可用,因此需要换一个适合当前版本的软件包:python3-rosdep和python3-rosdep2。
前者是ros维基官网推荐的命令,建议使用第一个命令:
smw@smw-Lenovo-G400:~/catkin_ws$ sudo apt-get install python3-rosdep
smw@smw-Lenovo-G400:~/catkin_ws$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
rosdep update
smw@smw-Lenovo-G400:~/catkin_ws$ rosdep update
smw@smw-Lenovo-G400:~/catkin_ws$ rospack depends1 beginner_tutorials
roscpp
rospy
std_msgs
困扰我这个新手一天的问题解决。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)