文中引用其他作者的将会有链接:以及引用内容:
1、版本对照表
【嵌入式 · 机器人】在 Linux 下安装 ROS2(机器人操作系统)_linux 机器人_云朵先生_的博客-CSDN博客
2、语言环境
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale
3、修改为国内源并更新索引
ROS Melodic 版本安装+将ROS的源设置为国内的源(Ubuntu18.04)_Doctor_Wu_的博客-CSDN博客_ros国内源
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
更新索引
sudo apt install curl gnupg2
curl http://repo.ros2.org/repos.key | sudo apt-key add -
4、更新软件源并安装工具
sudo apt update && sudo apt install curl gnupg lsb-release
5、安装
sudo apt install ros-eloquenta-desktop
6、配置ROS2环境
echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc