版本说明
Ubuntu版本为20.04,对应的ROS版本为Noetic。
Wiki链接: 在Ubuntu上安装ROS Noetic
安装过程
1. 添加 source.list
Wiki链接: ROS镜像源
sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/
lsb_release -cs
main” > /etc/apt/sources.list.d/ros-latest.list’
2. 添加keys
由于使用的是代理服务器,所以可以使用curl命令替换apt-key命令:
sudo apt install curl
curl -sSL ‘http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654’ | sudo apt-key add -
3. 安装
sudo apt update
sudo apt install ros-noetic-desktop-full
4.设置环境
echo “source /opt/ros/noetic/setup.bash” >> ~/.bashrc
source ~/.bashrc
5. 初始化与更新
noetic对应的版本应为python3-rosdep2,执行
sudo apt install python3-rosdep2
执行 rosdep init(这时可能会提示“default sources list file already exists”,则直接略过该步)
sudo rosdep init
执行 rosdep update
rosdep update