- Creates a 64-bit bootable disk image and corresponding docker cross-compiling environment for the Raspberry Pi.
- Takes a minimal and layered approach: various intermediate steps can be used and customized.
- The primary example is a disk image suitable for use on the Turtlebot3 and a docker environment that enables cross-compilation.
- It includes slightly-modified Turtlebot3 OpenCR firmware that enables low-level access to the motors and encoders from ROS
- In the latest example ROS 2 Iron and Ubuntu 22.04 is used.
- Install docker:
sudo apt install docker.io
- This step is done once per computer
- In the base of a ROS workspace you wish to cross compile run ~docker run reem17/rosberrypi-xcompile:iron > aarch64 && chmod 755 aarch64
- This step is done once per workspace
- Compile your code with ./aarch64 colcon_aarch64
- This step is done whenever you wish to cross compile
- It invokes
colcon build
(plus any additional arguments you provide) inside the cross compiling environment - The resulting install space is
aarch64_install
and can be transferred to the remote platform to be used
- These steps are for if you want to build or customize the Raspberrypi disk image or the cross compiling docker container.
- Most MSR students do not need to perform these steps!
- Install
docker
andqemu-user-static-binfmt
- Ubuntu:
apt install qemu-user-static binfmt-support docker.io
- Arch Linux:
pacman -S qemu-user-static-binfmt docker
- Ubuntu:
- Build the rosberrypi docker containers
./build_docker_images.sh [<target>]
<target>
(optional): which base docker image to createrosberrypi-turtlebot3
(default) A Full turtlebot3 environment with custom NU-MSR firmware availablerosberrypi-ros
A Full ROS 2 installation.rosberrypi-base
A minimal Ubuntu image from debootstrap.
- Images can be built on top of the
rosberrypi-turtlebot3
.numsr_image.sh
will build a custom (example) imagerosberrypi-numsr
that sets up anmsr
user and connects to a wifi network
./create_disk_image.sh <docker_img> <file>
- Creates a bootable raspberry pi disk image from
<docker_img>
and writes it to<file>
- This works with any compatible docker image. Compatible images can be built by extending one of the built-in images
- Creates a bootable raspberry pi disk image from
./write_sd <disk_file> <sdcard> <hostname>
- Writes the
<disk_file>
(the disk iamge) to the sdcard at<sdcard>
. - The
<hostname>
will be the hostname of the machine - The system partition will be expanded to fit the whole card
- Writes the
- The opencr firmware is built in the
opencr/
docker container - On the turtlebot, with the OpenCR board plugged in, running
opencr_install_firmware
will install the firmware on the OpenCR board