Ubuntu18.04安装ROS-1的流程记录

Ubuntu18.04安装ROS-1的流程记录

参考资料

ROS官网
博客

流程

  1. 设置镜像源(这里用的清华)

    sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
    
  2. 设置秘钥(卡住了,试试终端走外网)

    curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
    
  3. 安装(遇到依赖问题错,解决方式是将软件更新器打开,把更新都打开)

    sudo apt update
    sudo apt install ros-melodic-desktop-full
    
  4. 初始化 rosdep

    sudo rosdep init
    rosdep update
    

    (第一条命令报错了看这里1!!!!)

    rosdep: command not found

    这是因为没有安装python-rosdep

    sudo apt install python-rosdep

    (第一条命令报错了看这里2!!!!)

    在这里插入图片描述

    1. 在打开的网站中将“raw.githubusercontent.com”复制到查询栏中进行搜索,可以看到域名对应的IP地址信息

    2. 在这里插入图片描述

    3. 将搜索结果中展示的Ip地址和域名拷贝系统hosts文件中:
      sudo gedit /etc/hosts

      185.199.111.133 raw.githubusercontent.com

      在这里插入图片描述

    4. 保存退出后,就可以正常使用了。

    (第二条命令报错了看这里!!!!)
    在这里插入图片描述
    解决办法:
    sudo apt-get install python-rosdep
    终端走代理

  5. 设置环境

    echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  6. 构建工厂依赖

    sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
    

conda环境的构建

  1. 新建个环境:conda create -n Python27 python=2.7
  2. pip install pyyaml
  3. pip install rospkg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值