如果你在执行 rosdep init 过程中出现以下错误
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
这是由于raw.githubusercontent.com
被墙,程序无法下载相应的文件导致的。解决方法就是使得raw.githubusercontent.com能够被正常访问。这个网站被墙的方式是dns污染,所以我们只要能够找到这个网站的正确ip就可以了。
199.232.28.133 raw.githubusercontent.com
添加到自己电脑的hosts文件里面,文件路径为/etc/hosts
此时再次执行 rosdep init
如果执行rosdep update出现问题
https://blog.csdn.net/super_sean/article/details/105433250 2.(a)/(b)(c)
先是
更改 /usr/lib/python2.7/dist-packages/rosdep2/
下的三个文件sources_list.py
、gbpdistro_support.py
、rep3.py
中的DOWNLOAD_TIMEOUT = 15.0
值,改大一点就可以了。改到大概60.0,但还是不行。于是索性直接写了个一直重复运行rosdep update命令的bash脚本:
#!/bin/bash
for i in $(seq 1 10000)
do
rosdep update
done
运行一晚上就成了
读nav_msgs::Path的数据,需要在->poses后加[0]否则是会有报错的。
poses.pose.position.x改成poses[0].pose.position.x