栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

ROS安装问题总结

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ROS安装问题总结

rosdep找不到命令

解决办法:

  1. ubuntu18.04:sudo apt install python-rosdep2
  2. ubuntu20.04:sudo apt install python3-rosdep2
default sources list file already exists

解决办法:

sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
删除之后重新初始化

rosdep update失败

原因:https://raw.githubusercontent.com国内无法访问
解决办法(ubuntu18.04涉及python处为python2.7,更高版本为python3):

  1. 克隆rosdistro到本地:

git clone https://gitee.com/francois_WAN/rosdistro.git

  1. 修改20-default.list内的路径变为git的:

cd /home/yourname/rosdistro/rosdep/sources.list.d/
sudo gedit 20-default.list

替换后的内容为(yourname为ubuntu用户名):

# os-specific listings first
yaml file:///home/yourname/rosdistro/rosdep/osx-homebrew.yaml osx

# generic
yaml file:///home/yourname/rosdistro/rosdep/base.yaml
yaml file:///home/yourname/rosdistro/rosdep/python.yaml
yaml file:///home/yourname/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/yourname/rosdistro/releases/fuerte.yaml fuerte
  1. 修改gedit gbpdistro_support.py

    cd /usr/lib/python2.7/dist-packages/rosdep2/
    sudo gedit gbpdistro_support.py

    替换内容:

FUERTE_GBPDISTRO_URL = 'file:///home/yourname/rosdistro/' 
    'releases/fuerte.yaml'
  1. 修改rep3.py

    cd /usr/lib/python2.7/dist-packages/rosdep2/
    sudo gedit rep3.py

    替换内容:

REP3_TARGETS_URL = 'file:///home/yourname/rosdistro/releases/targets.yaml'
  1. 修改_init_.py

    cd /usr/lib/python2.7/dist-packages/rosdistro/
    sudo gedit __init__.py

    替换内容:

DEFAULT_INDEX_URL = 'file:///home/yourname/rosdistro/index-v4.yaml'
  1. 修改 20-default.list

    cd /etc/ros/rosdep/sources.list.d
    sudo gedit 20-default.list

    替换内容:

#os-specific listings first
yaml file:///home/yourname/rosdistro/rosdep/osx-homebrew.yaml osx
#generic
yaml file:///home/yourname/rosdistro/rosdep/base.yaml
yaml file:///home/yourname/rosdistro/rosdep/python.yaml
yaml file:///home/yourname/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/yourname/rosdistro/releases/fuerte.yaml fuerte

#newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

最后重新rosdep update即可

roscore not found

解决办法:重新安装ROS桌面版来补充缺少文件
sudo apt-get install ros-melodic-desktop
然后执行:source ~/.bashrc

暑期编程PK赛 得CSDN机械键盘等精美礼品!
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1016057.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号