Hello, I am a small fish blogging with great Compassion Mantra. Moving some time ago, fairy let me clean up their electronic waste. Inside actually found a piece of old raspberry pie, actually not long, two or three years ago raspberry pie 3B, just eat too long ash, little fairy let fish hanging on the salt fish to buy. Small fish heart must be refused, so deliberately write the price is very high, so certainly can’t sell.

Recently, the fish is engaged in ROS2, so I want to transfer ROS2 on the raspberry pie, and play with the communication of ROS2 and ROS2, so there is today’s article.

Small fish eat grey raspberry pie

1. Preparation

Software Tools:

The burn tool: downloads.raspberrypi.org/imager/imag… Ubuntu20 Image: ubuntu.com/download/ra…

Hardware tools:

A computer with WIndows system installed, virtual machine or Ubuntu dual system installed, used to burn images and modify raspberry PI wifi address reader, used to burn images for memory card eat ash raspberry PI, model 3B, bought many years ago and forgot the price

2. Burn the image

The first step is to install the burning software. After the installation, open the interface like the following. A total of three buttons, the first to choose the image, we have just downloaded the ubuntu20 image can be.

The second choice device is to insert our memory card into the card reader, and then insert the card reader into the computer to choose

After the first two options click Write to Write, wait for a while to complete.

3. Change the raspberry PI wifi account and password

Once the flash drive has been burned, Windows can’t recognize it because the format of the usb flash drive has changed. This is when the Ubuntu VIRTUAL machine or dual system comes in handy.

Here fish to virtual machine as an example, plug in the U disk, virtual machine will jump out of a window

Since Windows can’t recognize it, we’ll mount it in Ubuntu. Open the Ubuntu file and you can see the two mounted partition folders.

Choose the one with more files and directories

Open the /etc/netplan/ folder inside and right click in the blank to open it in terminal

Then enter it in the terminal

sudo gedit 50-cloud-init.yaml
Copy the code

Open the text editor and add wifIS Settings to the text editor.

network:    
    ethernets:        
        eth0:            
            dhcp4: true            
            optional: true    
        version: 2    
        wifis:        
            wlan0:            
                access-points:                
                    "m":                    
                        password: "88888888"            
                dhcp4: true            
                optional: true
Copy the code

The name of the hot spot used by the fish here is M, and the password is 88888888

Then we can open the user-data file on another disk and look at the system default username and password:

chpasswd:  
    expire: false  
    list:  
    - ubuntu:ubuntu
Copy the code

You can see it’s Ubuntu: Ubuntu

3. Insert the memory card into the raspberry PI and start it

Eject the USB flash drive, pull out the memory card and plug it into the Raspberry PI, then power on the Raspberry PI!! Connect the PI to the monitor if you have a monitor to connect to, so you can see the full boot process, otherwise just wait for the PI to connect itself to our wifi, then use the wifi to operate the PI. Fry turns on wifi and waits for the raspberry PI to come online. Fry’s Raspberry PI only supports 2.4 GIGABytes

After a while, it’s online, and now you can SSH to our raspberry PI

4. Remote connection

Open terminal, username @IP address

SSH [email protected]Copy the code

You can use PowerShell on Windows, and it’s a good package to use

With the remote connection, we can next install ROS2

5. Install ROS2

Here had to put the fish a line of code to install ROS2 to take out the use

curl http://fishros.com/tools/install/ros-foxy-raspi | bash
Copy the code

After installation

6. Summary

There are some minor problems with the script due to HTTPS, xiaoyu will try to fix them today. Finally, I wish you a happy weekend