Turtlebot3 SBC Raspberry Pi Humble Setup 20240114
From wikidb
Contents
References
- SBC Setup
- Note: Humble tab should be selected.
Environment - Support Computer
- Note: I ran the following on Linux Linux support computer (sisters). This computer may or mau not be part of the robot execution environment.
Load Ubuntu on SD Card
Download and Install the Rashberry Pi Imager
- See section 3.2.2 of the SBC Setup page.
- Install Raspberry Pi OS using Raspberry Pi Imager
Failed: Webpage said run this command
$ sudo apt install rpi-imager [sudo] password for eepp: Reading package lists... Done Building dependency tree Reading state information... Done No apt package "rpi-imager", but there is a snap with that name. Try "snap install rpi-imager" E: Unable to locate package rpi-imager
Succeeded: Note the instruction above to use snap.
$ snap install rpi-imager rpi-imager 1.8.4 from Dave Jones (waveform) installed
Execute the rpi-imager utility
Choose the OS to be Loadnd on an SD card
$ rpi-imager Gtk-Message: 15:21:31.585: Failed to load module "canberra-gtk-module" Gtk-Message: 15:21:31.586: Failed to load module "canberra-gtk-module" Qt: Session management error: Could not open network socket propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.133\" (uid=1000 pid=4592 comm=\"/snap/rpi-imager/584/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=860 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")" nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.133\" (uid=1000 pid=4592 comm=\"/snap/rpi-imager/584/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=860 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")" "Object path cannot be empty" qrc:/main.qml:785:9: QML QQuickItem: Binding loop detected for property "height" qrc:/main.qml:785:9: QML QQuickItem: Binding loop detected for property "height" qrc:/main.qml:785:9: QML QQuickItem: Binding loop detected for property "height" qrc:/main.qml:785:9: QML QQuickItem: Binding loop detected for property "height"
See section 3.2.3 of the SBC Setup page (Install Ubuntu 22.04).
- Raspberry Pi Device
- Operating System
- Other general-purpose operating system
- Ubuntu
- Ubuntu Server 20.04.5 LTS(64-bit)
- Ubuntu
- Other general-purpose operating system
- Storage
- Generic-SD/MMC/MS PRO - 15.9 GB
Save the OS to the SD Card
Install Ubuntu 22.04 on the Raspberry Pi
Environment - The SBC (Single Board Computer). The Raspberry Pi that will be mounted on the robot/
- Note: I ran this on Raspberry Pi Model 4 B hardware.
Standard linux install
A little playing
- "ifconfig" not installed - need to do a "sudo apt install net-tools"
- couldn't "statx" - I tried an "sudo apt install xinit". didn't work
- Changed password to my default
Configuring the Network
cd /etc/netplan
Original
$ cat 50-cloud-init.yaml # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: true optional: true version: 2
new
$ cat 50-cloud-init.yaml # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: true optional: true version: 2 wifis: wlan0: dhcp4: true access-points: zdome: password: ********
Test
$ ifconfig eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether dc:a6:32:e9:74:8a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 108 bytes 8874 (8.8 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 108 bytes 8874 (8.8 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.214 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::dea6:32ff:fee9:748b prefixlen 64 scopeid 0x20<link> ether dc:a6:32:e9:74:8b txqueuelen 1000 (Ethernet) RX packets 2278 bytes 265543 (265.5 KB) RX errors 0 dropped 1712 overruns 0 frame 0 TX packets 428 bytes 65789 (65.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 $
Configure Updates
change
$ cat /etc/apt/apt.conf.d/20auto-upgrades APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1";
to
$ cat /etc/apt/apt.conf.d/20auto-upgrades APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
Configure Bootup Delay
Set the systemd to prevent boot-up delay even if there is no network at startup.
$ sudo systemctl mask systemd-networkd-wait-online.service Created symlink /etc/systemd/system/systemd-networkd-wait-online.service → /dev/null.
Disable Suspend and Hibernation
$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target Created symlink /etc/systemd/system/sleep.target → /dev/null. Created symlink /etc/systemd/system/suspend.target → /dev/null. Created symlink /etc/systemd/system/hibernate.target → /dev/null. Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.