-
Notifications
You must be signed in to change notification settings - Fork 24
3) Raspberry Pi setup
The prerequisites for this stage are:
- Internet connection on a Wireless LAN
- microSD card from the Bill of materials
- Raspberry Pi from the Bill of materials
- Install the Raspberry Pi Imager on your computer, for instance on Ubuntu:
sudo snap install rpi-imager
. - Launch it, select the Raspberry Pi OS Lite (64-bit) image and write it to the microSD card.
On Ubuntu 20.04, note that the imager seems to only work from GNOME (otherwise it fails to get root privileges).
Ask questions about this step in Software discussions.
- Connect a keyboard and screen to the Raspberry Pi (hereafter "raspi" for short).
- Power it up and log in. By default the user would be
pi
and the passwordraspberry
. We will assume these values in what follows. - Set your own password with
passwd
. - Run
sudo raspi-config
- Go to "System Options", "Wireless LAN" and configure your Wi-Fi access.
- Optionally, go to "System Options", "Hostname" and set a custom host name.
- Exit
raspi-config
and reboot to apply wireless settings. - Update Debian packages:
sudo apt update && sudo apt upgrade -y && sudo apt install vim
Ask questions about this step in Software discussions.
- Run
sudo raspi-config
- Go to "Interface Options", "SSH" and enable the SSH server
- Exit
raspi-config
- Run
ifconfig
and locate the IP address of the raspi underwlan0
- Let's say the address is 192.168.XXX.YYY: from your computer, run
ssh pi@192.168.XXX.YYY
- For convenience, now is a good time to upload your SSH public key.
Ask questions about this step in Software discussions.
Following step 1.4) from 1) Getting started, you should already have cloned the main upkie
repository.
- Go to
tools/setup
in your local copy of the repository - Copy the setup script to your raspi:
scp setup-raspi.py pi@192.168.XXX.YYY:~
- Run the setup script on the raspi:
pi@raspberrypi:~$ sudo ./setup-raspi.py
If you want, you can turn your raspi into its own Wi-Fi access point. This way, your robot will carry its own Wi-Fi network, making sure you can always connect to it.
NB: if you have anything else to download to the raspi from the Internet, better do it now. After the following steps, the raspi will turn into its own Wi-Fi access point (with no Internet access).
- Go to
tools/setup
in your local copy of the repository - Copy the Wi-Fi configuration script to your raspi:
scp setup-wifi-ap.py pi@192.168.XXX.YYY:~
- Run the setup script on the raspi:
pi@raspberrypi:~$ sudo ./setup-wifi-ap.py
where:
-
XXX
andYYY
come from the previous step -
SSID
will be the SSID for the robot's Wi-Fi network -
WIFIPASSWORD
will be the password of the robot's Wi-Fi network -
COUNTRY
should be your two-letter country code for Wi-Fi compliance (e.g. FR or UK) -
192.168.0
will be the IPv4 prefix for the robot's Wi-Fi network interface- The IP address of the robot itself will be
192.168.0.42
- The IP address of the robot itself will be
-
192.168.1
will be the IPv4 prefix for the robot's wired network interface
The script will download and install software packages, configure CPU isolation and turn the raspi into its own Wi-Fi access point.
Ask questions about this step in Software discussions.
You may have to reboot the Pi after this step. An access point should be created with your specified SSID.
You should now be able to log into to the robot by connecting to its Wi-Fi access point and running:
$ ssh pi@192.168.0.42
For convenience, you can add the following to your ~/.ssh/config
file, replacing "upkie" with your preferred nickname:
Host upkie
Hostname 192.168.0.42
User pi
Ask questions about this step in Software discussions.
Next: 4) Electronics testing