Ubuntu16中安装ROS

编程入门 行业动态 更新时间:2024-10-07 09:21:20

Ubuntu16中安装<a href=https://www.elefans.com/category/jswz/34/1768665.html style=ROS"/>

Ubuntu16中安装ROS

1、更换Ubuntu国内源

cd /etc/apt/
备份sources.list

打开文件sources.list
vim sources.list

将其中内容全部替换为以下内容(本次使用阿里源,之前使用清华源apt update报错过):

deb / xenial main restricted universe multiverse

deb / xenial-security main restricted universe multiverse

deb / xenial-updates main restricted universe multiverse

deb / xenial-proposed main restricted universe multiverse

deb / xenial-backports main restricted universe multiverse

deb-src / xenial main restricted universe multiverse

deb-src / xenial-security main restricted universe multiverse

deb-src / xenial-updates main restricted universe multiverse

deb-src / xenial-proposed main restricted universe multiverse

deb-src / xenial-backports main restricted universe multiverse

保存退出

apt update
下载更新成功!(上次使用清华源到这一步更新失败)

2、替换ROS国内源
sudo sh -c '. /etc/lsb-release && echo "deb / `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

设置key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

再次更新apt
apt update

3、安装ROS
sudo apt-get install ros-kinetic-desktop-full
安装成功!

设置环境变量

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

source ~/.bashrc
 

4、初始化rosdep
rosdep init
失败!
报错信息如下:

ERROR: cannot download default sources list from:

.list.d/20-default.list

Website may be down.

 

cd /etc

sudo mkdir ros

cd ros

sudo mkdir rosdep

cd rosdep

sudo mkdir source.list.d

cd source.list.d

sudo touch 20-default.list


vim 20-default.list
粘贴如下内容:

#os-specific listings first

yaml .yaml osx

#generic

yaml .yaml

yaml .yaml

yaml .yaml

gbpdistro .yaml fuerte

#newer distributions (Groovy, Hydro, …) must not be listed anymore, they are being 

#fetched from the rosdistro index.yaml instead

保存退出

rosdep update
更新成功!

O了!
以前在Ubuntu18下面安装ROS很顺利啊,怎么在Ubuntu16下面安装就这么费劲呢,沃尼玛!

更多推荐

Ubuntu16中安装ROS

本文发布于:2024-03-09 17:42:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1725629.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ROS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!