最近在看cn - ROS Wiki上的教程,不曾想刚开始便遇到问题。
【1】运行命令$ rospack depends1
beginner_tutorials 时,提示 :
[rospack] Error: no such package
beginner_tutorials
后来弄明白了,原来在我新建工程后,忘记了source 一下。$ source devel/setup.bash 详细请参见此文最下头:点击打开链接
【2】解决了上述问题后,我接着运行命令$ rospack depends1
beginner_tutorials,提示:
[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
于是,按照提示,需要如下依次执行:
[plain] view plain copy
[if !supportLists]1. [endif]① $ sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
[if !supportLists]2. [endif]② $ sudo rosdep init
[if !supportLists]3. [endif]③ $ rosdep update
然而,在第三步时,出现错误:
ERROR: Rosdep experienced
an internal error: [Errno 13] Permission denied: '/etc/ros/rosdep/sources.list.d'
解决办法(如下依次执行):(详细请见论坛:点击打开链接)
[plain] view plain copy
[if !supportLists]1. [endif]① $ sudo rm -rf $HOME/.ros/rosdep
[if !supportLists]2. [endif]② $ sudo rm -rf /etc/ros/rosdep
然后,重新安装rosdep:
[plain] view plain copy
[if !supportLists]1. [endif]① $ sudo apt-get install python-rosdep
[if !supportLists]2. [endif]② $ sudo rosdep init
[if !supportLists]3. [endif]③ $ rosdep update
注意,第三步,一定不要使用sudo 来执行rosdep update,这是不被允许的,并且会导致权限错误。详细请看官网:
我自己碰到的是source devel/setup.bash一下就可以了
=