Install ROS-Melodic on Ubuntu 18.04

Install ROS-Melodic on Ubuntu 18.04

1. Download ubuntu18.04 mirror, mirror download URL

2. Open the downloaded image with virtual machine vmware and install ubuntu18.04 system

Insert picture description here

1. First change the software source to a domestic software source to a domestic source

Insert picture description here

2. Click to select the best server

Insert picture description here
Insert picture description here
Here we choose the software source of Alibaba Cloud,
Insert picture description here
enter the command in the terminal

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
在终端输入指令
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116

Insert picture description here
Enter commands in the terminal

sudo apt-get update

When the following problems occur

Insert picture description here
Enter commands in the terminal

sudo gpg --keyserver keyserver.ubuntu.com --recv F42ED6FBAB17C654 
sudo gpg --export --armor F42ED6FBAB17C654 | sudo apt-key add -

Insert picture description here
Enter commands in the terminal

sudo apt-get update

The error just now disappears,
Insert picture description here
enter the command in the terminal

sudo apt-get upgrade

This problem occurs,
Insert picture description here
enter the command in the terminal

sudo apt-get update --fix-missing
sudo apt-get upgrade

Install ROS and
enter instructions in the terminal

sudo apt-get install ros-melodic-desktop-full

Insert picture description here
Initialize the ROS problem
Insert picture description here
Method one: Determine the scientific Internet
method Method two:

sudo gedit /etc/hosts

Add the real IP address at the end of the file

151.101.84.133  raw.githubusercontent.com

Use the ladder to restart and enter the command in the terminal

sudo apt-get update --fix-missing
sudo apt install python-rosdep
sudo rosdep init

Insert picture description here

rosdep update

Insert picture description here
Initialize environment variables:

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall

After the installation is complete, you can enter roscore to check that the current version of ros is melodic and
Insert picture description here
make the Ubuntu 18.04 system backup into an iso mirror
https://blog.csdn.net/rechardchen123/article/details/90649208
https://blog.csdn.net/ chekongfu/article/details/86479917

Guess you like

Origin blog.csdn.net/weixin_41281151/article/details/107974920
Recommended