-
Notifications
You must be signed in to change notification settings - Fork 1
Compute ‐ Raspberry Pi
We are using the Raspberry Pi Compute Module 4. We run RasbianOS 64bit light with Debian 12 Bookworm with Kernel 6.1.21-v8+ This allows for native PTP support and we run ROS1 inside a Ubuntu Focal container. Kernel modules are added outside the container directly to the native OS and the buffer files mapped inside the container. The GPIOs are mainly controlled using the pigpio library http://abyz.me.uk/rpi/pigpio/.
- PTP is not straight forward to get running with any Ubuntu Image available
- Therefore using Raspberry Pi OS Lite 64 bit
- Problem here latest version is on Debian Version 12 which does not work with ROS1 Buster - therefore we use the docker container
- On the latest Debian the GPIO API changed which made it tricky to use the existing Debian Kernal Modules.
Kernel modules are quite straight forward to install - we created in all drivers that need kernel modules the corresponding C-Files which require to be built and can then be added to the kernel using insmode. For more details refer to the individual kernel driver modules.
We currently need kernel modules for:
- STIM320
- AP20
- ADIS16475
We followed the following: https://www.jeffgeerling.com/blog/2020/how-flash-raspberry-pi-os-compute-module-4-emmc-usbboot
- Use the development board
- Connect directly to EMMC via USB Micro cable
sudo apt install libusb-1.0-0-dev
cd git
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
make- Set jumper to disable eMMC boot
- Verify good USB micro USB cable which allows for data transmission
- Power cycle the dev board
sudo ./rpibootInstall the RPI Imager:
sudo snap install rpi-imagerRaspberry Pi OS Lite 64 bit
rsl@pi:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
First lets obtain a static IP address.
Copy to sudo vi /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
auto eth0
iface eth0 inet static
address 192.168.2.58
netmask 255.255.255.0
gateway 192.168.2.51
dns-nameservers 8.8.8.8
Restart the networking:
sudo systemctl restart networking
Setup SSH_keys by copying over from other PC
ssh [email protected] -o PubkeyAuthentication=no -o PreferredAuthentications=password
scp -r -o PubkeyAuthentication=no -o PreferredAuthentications=password /home/rsl/.ssh/* [email protected]:/home/rsl/.ssh
ssh-add /home/rsl/.ssh/id_rsa
killall ssh-agent; eval "$(ssh-agent)"
Follow tutorial here: https://github.com/jclark/rpi-cm4-ptp-guide/blob/main/os.md
Make the changes to the sudo raspi-config
enable serial port (under Interface/Serial Port); Answer *No to login shell accessible over serial
- Yes to enable serial port hardware
Then append to /boot/firmware/config.txt
# Enable GPIO pin 18 for PPS (not always necessary, but useful for testing)
dtoverlay=pps-gpio,gpiopin=18
# realtime clock
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
# fan
dtoverlay=i2c-fan,emc2301,i2c_csi_dsi
# Make /dev/ttyAMA0 be connected to GPIO header pins 8 and 10
# This always disables Bluetooth
dtoverlay=disable-btRestart some things
sudo systemctl disable hciuart
sudo dpkg-reconfigure tzdata
Check if this looks good
ethtool -T eth0
sudo hwclock --show
From this point one can follow grand_tour_box/box_configuration/pi/pi_configure.sh
This includes setting up system services for:PTP, PIGPIO, Docker, creating a ROS docker image, Fan Control, Boxi, Modifying the bashrc.
grand_tour_pi_breakout_board.pdf
(Always output trigger - feedback pin)
FAN_PWM_25kHz
- PWM0_0 -> GPIO18
- GPIO16 (feedback for PWM speed) ->
CAM_PWM_30Hz
- PWM0_1 -> GPIO19
- GPIO26
ADIS_CLK_1.6kHz
- GPCLK0 -> GPIO4
- GPIO27
- (SPI)
SAFRAN_CLK_2kHz
- GPCLK1 -> GPIO5
- GPIO22
- (+RS422)
HONEY_CLK_1.2kHz
- GPCLK2 -> GPIO6
- GPIO25
- (+RS422)
NTC (I2C):
- SCL - I2C1_SCL -> GPIO3
- SDA - I2C1_SDA -> GPIO2

Presented by RSL.