ubuntu18 installation ROS Melodic Morenia Tutorial

A, VMware15 installation

VMware Chinese official website: https://www.vmware.com/cn.html

Preparation VMware15 installation package (not support 32-bit systems):

1, Point download - "Free product trials and demo -" Workstastion Pro

image

2, install the corresponding version depending on your system. Here is the latest VMwre15.

image

3, download and save it.

installation:

1, double-click the installation package.

image

2, click Next.

image

3, point license, the next step.

image

4, select the installation location, select the next step.

image

5, choose the next step

image

6, the installation point.

image


7, the next step.

image

8, enter the installation, wait.

image

9, the installation is complete, break point license.

image

10, after opening the copy key (a line):

ZZLPZ-Z8EHY-A1ZZW-LZPXG-EY5LZ

CG392-4PX5J-H816Z-HYZNG-PQRG2

note:

After accidentally click Finish, you can open the virtual machine to select the input license key in helping the bar.

In the help section on VMware Workstation can view the break state.

image

Two, Ubuntu18.04 installation

Ubuntu Chinese official website: https://cn.ubuntu.com/

Installation Preparation:

Open official website, click download, download to use their own version, I downloaded the desktop version.

Note: The latest to Ubuntu19.04, but there is no corresponding version of ROS, many problems can occur when ROS after installation, the installation fails, I pro-test. .

image

Ubuntu18.04 installation:

1, before the virtual machine, create a new virtual machine.

image

2, custom advanced, the next step.

image

3, the election workstation15.x, the next step.

image

4, the election later install the operating system, the next step.

image

5, selected from the linux (L) version Ubuntu 64 bits next step.

image

6, select the location, the next step.

image

7, the case of the foundation footprint configuration of the computer processor, the faster the more runs the next step.

image

8, memory configuration, the next step.

image

9, selecting the network type, the next step.

image

10, select the I / O controller type, default recommendation, the next step.

image

11, create a disk, the next step.

image

12, select the virtual disk, the next step.

image

13、选择磁盘大小,最好大点,40G或60G,下一步。

image

14、指定磁盘文件。

image

15、点击完成。

image

16、打开虚拟机-》虚拟机设置-》镜像文件找到之前Ubuntu18.04的下载路径,点确定。

image

17、开启虚拟机。

image

18、选语言选中文,安装。

image

19、键盘布局,汉语,继续。

image

20、创建用户名,继续。

image

21、重启。

image

22、Ubuntu安装完成。

image

三、ROS Melodic Morenia 的安装。

官网安装教程:http://wiki.ros.org/melodic/Installation/Ubuntu

根据官网的安装教程国内安装时可能会有许多问题,一般都会成功。

本人在国内,安装的是清华源。速度会快一点。

清华源网址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

1、添加源,把清华源每条分别添加进来。

如下图所示。

或是网上资源:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

image

2、在终端设置keys。

按ctrl+alt+t打开终端输入。

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

更新后的。

3、更新,确保软件在最新版。

sudo apt-get update

4、安装ROS所有功能。

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

5、ROS初始化。

sudo rosdep init
rosdep update

6、环境配置

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

7、安装rosinstall,是一种常用的命令行工具

sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

8、打开一个终端执行,开一个master

roscore

9、在打开一个终端执行(会出现小海龟)

rosrun turtlesim turtlesim_node

10、在打开第三个终端执行

rosrun turtlesim turtle_teleop_key

在第三个终端就可以通过上下左右控制小海龟移动了。

注意:

安装过程中可能会出现各式各样的问题,如果在sudo rosdep init时出现

ERROR:cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down

To perform the following code to solve:

sudo c_rehash /etc/ssl/certs
sudo -E rosdep init

Since I do not have experience before, and take a lot of detours, during the installation process also appeared many errors, which is a mistake to say there is a file you want to delete vegetables can continue with the installation, this is my rm -f file [that] fail , due to insufficient privileges with sudo rm -f on it.

For ease of operation, it will be very easy to install VMware tools. After the hair, that is very simple, a little security can be based, and there are problems in communication.

Released four original articles · won praise 8 · views 9093

Guess you like

Origin blog.csdn.net/u012254599/article/details/104390455