提示:该文档中包含了一些特定问题的解决方案,仔细阅读对解决问题会有帮助
任务:安装ROS Noetic
sudo sh -c 'echo "deb <http://packages.ros.org/ros/ubuntu> $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s <https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc> | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
如果出现依赖相关问题,可尝试如下解决方案:
sudo apt install aptitude
sudo aptitude install ros-noetic-desktop-full
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
安装额外依赖:
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-vcstool build-essential python3-catkin-tools python-is-python3
sudo rosdep init
rosdep update
初始化超时问题:
解决方案:为 https://raw.githubusercontent.com/ 设置hosts
解决方法:使用 https://ipw.cn/dns/ 解析raw.githubusercontent.com在大陆可访问的IPv4地址,并添加记录到/etc/hosts/文件中,示例如下

Ⅰ. ROS file system structure
General structure