环境
Ubuntu: 20.04
ROS 版本: noetic
(按照官网安装)
Installation
打开终端(快捷键 ctrl
+alt
+t
)
Setup your sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Set up your keys
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Installation
sudo apt update
Desktop-Full Install: (Recommended) : Everything in Desktop plus 2D/3D simulators and 2D/3D perception packages
sudo apt install ros-noetic-desktop-full
Environment setup
source /opt/ros/noetic/setup.bashecho "source /opt/ros/noetic/setup.bash" >> ~/.bashrcsource ~/.bashrc
Dependencies for building packages
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo rosdep initrosdep update
报错:
若之前有安装过可能会出现以下错误
ERROR: default sources list file already exists: /etc/ros/rosdep/sources.list.d/20-default.listPlease delete if you wish to re-initialize
解决:sudo rm /etc/ros/rosdep/sources.list.d/20-default.list