Installation guide: Unterschied zwischen den Versionen

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 108: Zeile 108:
In this project, we installed ROS2 using Debian packages (from binary packages) on RPi 4. Installing using Debian packages is more convenient because it automatically installs all of the required dependencies. It also receives updates at the same time as the rest of the system. However, in order to install Debian packages, we'll need root access.
In this project, we installed ROS2 using Debian packages (from binary packages) on RPi 4. Installing using Debian packages is more convenient because it automatically installs all of the required dependencies. It also receives updates at the same time as the rest of the system. However, in order to install Debian packages, we'll need root access.


==== (Difficult) Steps ====
==== Complex Steps ====
 
In this section, the confusions or errors during the installation are

Version vom 18. Februar 2022, 11:40 Uhr

Ubuntu

In addition to Windows 10, Ubuntu 20.04 is installed on the laboratory computers in the control engineering laboratory. The computers automatically start the Windows operating system. To start Ubuntu, the F12 key must be pressed at the beginning of the boot process. This opens the start menu. In the start menu, a boot option can be selected using the arrow keys. Two hard disks are available in the Legacy Boot area. The Windows operating system is installed on the 240GB SSD and a partition with Ubuntu is on the 1000GB HDD. After selecting the HDD, confirm with Enter and the Ubuntu operating system is loaded. The password under Ubuntu is Hshl2021 for all lab computers.

We'll show you how to install Ubuntu Server on a Raspberry Pi 4, connect it to the internet, and use it remotely in this article. There are two ways to set up your Pi: with an external HDMI screen and USB keyboard, or without. We utilized the first one, which came with an additional HDMI screen and a USB keyboard.

Installation of Ubuntu on RPi 4

Step 01

In the beginning, we have to insert the microSD card into our computer.

We must be careful to install the suitable Imager program for our operating system.

When we are on Ubuntu (as operating system), we can simply run the following command to install the Raspberry Pi Imager:

sudo snap install rpi-imager


Step 02

After the installation of Imager, open the application and go to the "CHOOSE OS" option.

Now, look for the “Other general-purpose OS” option and select it.

After that, you can choose Ubuntu from a list of download alternatives. Ubuntu 20.04.3 LTS (RPi 3/4/400) is recommended for this purpose. This will work for the Raspberry Pi 2,3, 3+, and any of the 4's, as mentioned in the imager.

Abb.1


We open the "SD Card" menu after selecting the image. Then choose the microSD card that we have inserted.

Abb.2


Step 03

Until this point, we have selected the right operating system and SD card. In the last step, we just click on "WRITE" option to begin the intallation of Ubuntu server in our Rpi 4. It may take few minutes and below it is shown how your screen will look like after clicking on "WRITE" and it means that we have come all good so far.

Abb.3


Congratulations! We have finally installed Ubuntu server completely. Now, we will configure WiFi on our Raspberry Pi 4 with Ubuntu 20.04 LTS 64-bit ARM Server.

Configuration of WiFi on Rpi 4

After working with our Rpi using Ethernet for couple of days, we wanted to get rid of connecting our microprocessor each time with Ethernet cable, so we came up with idea of connecting WiFi with it. In order to configure wifi, we need following information:

(i) Raspberry Pi wireless card name on your system;

(ii) WiFi router name you are trying to login (SSID), and

(iii) WiFi login password

Step 01

The first step is to figure out what your wireless network interface's name is. To do so, execute this:

$ ls /sys/class/net
enp0s25  lo  wlp3s0

The wireless network interface name on an Ubuntu 20.04 machine could be something like wlan0 or wlp3s0. In our case, it was wlan0.

Step 02

Next, go to the /etc/netplan directory and find the Netplan configuration files you need. 01-network-manager-all.yaml or 50-cloud-init.yaml are examples of configuration files.

$ ls /etc/netplan/

Step 03

Edit network configuration file to add WiFi info:

$ sudoedit /etc/netplan/50-cloud-init.yaml

After executing this, you will see the following screen:

Abb.1


Now add the following details as shown in the image below:

Abb.2


Step 04

By using the ip command, we will be able to see our wireless adapter linked to the wireless network if everything went well:

$ ip a

Hence, we have successfully configured WiFi on our RPi 4.

ROS2

The creation of ROS2 was proposed to solve the performance constraints of ROS1 due to its lack of support for real-time performance.

Any robot platform's software stack requires a number of software tools, including hardware drivers, networking modules, communication architecture, and a number of robot algorithms. ROS brings all of these tools together in one place, eliminating the need for developers to recreate the wheel. ROS is more than just a middleware, and the numerous solutions and packages available for robot navigation, perception, control, motion planning, simulation, and more make it impossible to ignore.

Installation of ROS2 on RPi4

We can install ROS2 in two ways:

i) from binary packages

ii) building from source.

In this project, we installed ROS2 using Debian packages (from binary packages) on RPi 4. Installing using Debian packages is more convenient because it automatically installs all of the required dependencies. It also receives updates at the same time as the rest of the system. However, in order to install Debian packages, we'll need root access.

Complex Steps

In this section, the confusions or errors during the installation are