Select the corresponding ros version according to the Ubuntu system. For the corresponding relationship, please refer to [1. ROS Introduction]-[1.5. Release Version] to select.This course takes the installation of ROS-Noetic on Ubuntu20.04 as an example to explain how to install ros.
Terminal input,
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'Terminal input,
xxxxxxxxxxsudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654Terminal input,
xxxxxxxxxxsudo apt updateWhat is installed here is the basic desktop version, terminal input,
xxxxxxxxxxsudo apt install ros-noetic-desktop -yAdd the path of ROS to the environment variable so that when you open the terminal in the future, you can find the running environment of ROS and enter it in the terminal.
xxxxxxxxxxecho "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
Then reopen the terminal or source to refresh the environment variables, and enter in the terminal,
xxxxxxxxxxsource ~/.bashrc
Terminal input,
xxxxxxxxxxroscore
If the following screen appears, the installation can be successful.
