Ubuntu18.04安装ROS问题总结

sudo rosdep init

1. 执行到这一步时报错:

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.

解决办法:

如果提示的是 ERROR: unable to process source  https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/xxxxx  之类的错误,同时保证自己机器可以上百度的前提下,此时可能是因为raw.githubusercontent.com网站被墙了。

解决办法是修改hosts文件,添加这个网站的ip地址

#打开hosts文件

sudo gedit /etc/hosts

#在文件末尾添加

151.101.84.133  raw.githubusercontent.com

#保存后退出再尝试



2.安装anaconda后roscore报错

Command 'roscore' not found, but can be installed with:



以前运行正常,突然报错,roscore ,roslaunch 都不能用  解决办法之一, 

       有可能是环境变量所致, 只需


source /opt/ros/melodic/setup.sh

环境变量默认是anaconda的因此需要使用ROS的时候,在打开终端时输入上面的命令


3.

安装的是anaconda3,python3.8,ROS中pkg依赖包可能用的Python版本不同

解决方法:

conda install setuptools

pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

重新运行

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容