-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry PI 4 Setup Instructions
Edward Zhu edited this page Feb 7, 2023
·
7 revisions
Last updated: 2/6/2023
- A Raspberry PI 4
- A MicroSD card with at least 64 GB of capacity
- The Raspberry PI Imager, which can be downloaded here.
- Connect the SD card to your machine.
- Run the Raspberry PI Imager with
sudo
sudo rpi-imager
- Under Operating System, select Ubunutu Server 20.04.5 LTS (64-BIT). This will install a headless (no GUI) version of Ubuntu 20.04. NOTE: As new version of Ubuntun are released, this instruction may need to be updated.
- Under Storage, select the SD card that you connected.
- Click the gear icon for advanced settings.
- Check Enable SSH and select Use password authentication.
- Check Set username and password and set to:
- Username: mpclab
- Password: mpclab
- Scroll to bottom and click SAVE.
- Click Write.
- Insert the SD card into the slot on the Raspberry PI.
- Connect the Raspberry PI to a display, keyboard, and power source.
- On the Raspberry PI, run the command
ip addr show
and make note of the MAC address next tolink/ether
for the wireless network interfacewlan0
. The MAC address is an 8 character string with every two characters separated by a colon. - Follow the instructions in the MPC Lab WiFi instructions document about whitelisting a device for connection to the lab WiFi network.
- Navigate to
/etc/netplan
and open up the configuration file50-cloud-init.yaml
for editing, e.g.cd /etc/netplan vim 50-cloud-init.yaml
- Edit the file so it looks as follows, where you should replace
<IP>
with a static IP address for the Raspberry PI. Make sure that it does not conflict with the IP addresses of any existing devices on the network.network: version: 2 wifis: renderer: networkd wlan0: access-points: MPC_LAB_5G: password: self.barc_h0me dhcp4: true optional: true addresses: [<IP>/24] gateway4: 192.168.50.1
- Apply the settings using
sudo netplan apply
- Check that you have connected to the network by running a command like
sudo apt update
-
Follow the instructions here to install
ros-foxy-ros-base
. -
Follow the instructions here to install
colcon
.
- Install
vcstool
withsudo apt install python3-vcstool
- Install
gcc
andg++
withsudo apt install gcc g++
- Install
pip
withsudo apt install python3-pip
- Install prerequisite Python packages with
python3 -m pip install pip -U python3 -m pip install matplotlib numpy scipy -U
- Clone
barc_core
withgit clone https://github.com/MPC-Berkeley/barc_core.git
- Save your GitHub credentials with
cd barc_core git config --global credential.helper store git pull
- Clone the MPC Lab BARC repositories
cd ws/src vcs import < ../../repos/master.repos
- Build the ROS packages
cd ../ colcon build --symlink-install