首先需要安装好ubuntu20.04,可以双系统也可以虚拟机。
Ubuntu20.04 下载地址:https://cn.ubuntu.com/download/alternative-downloads
方法一:官方教程
官网教程链接为:https://wiki.ros.org/noetic/Installation/Ubuntu
可能有墙,因此可参考如下步骤:
-
第一步,换源
考虑使用国内源,如清华源/华为云,推荐使用阿里云,亲测较快。
软件和更新界面
-
第二步,添加ROS软件源
打开终端,输入指令:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
-
第三步,添加密钥
在终端中依次输入以下指令:
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
-
第四步,更新软件源
sudo apt update
-
第五步,安装ROS
sudo apt install ros-noetic-desktop-full
-
第六步,设置/更新环境变量
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
-
第七步,安装ROS所需工具
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall generator python3-wstool build-essential
方法二:参考UMass教程文档
链接为:https://hcr.cs.umass.edu/courses/compsci603/projects/Compsci_603_Project0_Preparation.pdf
方法三:国内一键安装
参考文档链接为:小鱼的一键安装系列 | 鱼香ROS
只需输入一行指令,按照文档操作即可。
wget http://fishros.com/install -O fishros && . fishros
至此,ROS基本安装完毕,可以在ubuntu20.04中愉快地使用ROS玩耍啦!
未完待续。