Running ROS on Windows 10

1.在Windows10下安装ROS。需要开启WSL。参考

2.修改ubuntu国内源,可以提高安装包下载更新速度。

(1)原文件备份:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

(2)编辑源列表文件:sudo vim /etc/apt/sources.list

(3)将原来的列表删除,添加如下内容(中科大镜像源)参考

         deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
         deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
         deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
         deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
         deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
         deb http://mirrors.aliyun.com/ubuntu/ xenial universe
         deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
         deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
         deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
         deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
         deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
         deb http://archive.canonical.com/ubuntu xenial partner
         deb-src http://archive.canonical.com/ubuntu xenial partner
         deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
         deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
         deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

         deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse

         deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
         deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
         deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
         deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
         deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
         deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
         deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
         deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
         deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
(4)运行sudo apt-get update

3.修改ROS国内源,提高下载安装速度。参考1参考2

         首先打开终端输入:

         sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

         如果上面执行有问题,请使用下面方式

         sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

        设置密钥:wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -

        或者(官方):sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

4.安装ROS。参考



posted @ 2018-12-31 09:18  MrZhangYang  阅读(264)  评论(0编辑  收藏  举报