So you can have your GoPiGo3 up on ROS2 in 1 hour:
Step1: Follow steps to create (headless) GoPiGo3 on Ubuntu 22.04 Server
Step2: Run script to install ROS2, GoPiGo3 ROS nodes, and helper scripts
Step3: Follow Test Plan -
Drive ROS2 GoPiGo via remote control from your keyboard
Inspect ROS2 topics
Publish ROS2 "command" topics to ROS2 GoPiGo3
(only GoPiGo3 and remote ssh shell on your desktop/laptop computer required - no ROS GUI)
I don’t know how to package the completed image - any tips?
You can look into my multi-booting threads where I described how to package things.
I haven’t created a “universal” script but it should be doable.
The big issue is that when you do create the image, you have to preserve all the attributes, including extended attributes and ownership, as well as preserving both soft and hard links.
It’s not difficult, but it’s not trivial.
There are several major steps:
Use something like ddrescue (gddrescue) to make a file that is an exact image of the system.2
Use a “shrinking” utility to reduce the image to the minimum size, removing all the unused part of the partition. Some utilities can set the “expand on boot” option too.
Open it using the system’s image mounter to verify that the image is valid.
Run it through something like gzip to compress the image to a more manageable size.
Thoroughly test the image by re-installing it to various media and run it to death. Insure that every test cycle begins with a full e2fsk on the unmounted image partitions before booting it for the first time.
Once you get that down pat, there are additional steps, like clearing the apt cache, clearing browser cache, cookies and history, system temp, secrets, saved passwords, command cache, network configs, (except for IPv6), and other things you specifically set for yourself that is nobody else’s business. This will also shrink your final image size.
Test your final image by installing it on various Raspberry Pi versions, running e2fsk over it, and beating the living out of it. Don’t forget to e2fsk the images.
There are imaging tools out there for Raspberry Pi images, some claim to automagically clean things up. It will just require some searching.
Right now all the systems here are occupied by the granddaughters this week while they are on their “fall” school holiday. Once that’s done I can help with this.
It took a while, thinking about this … you reminded me of what I forgot about to prepare for imaging - remove the Dexter/gpg3_config.json file! My image, as is, would force 16 tick motors on an unsuspecting user.
The PiShrink log claims to have done all the removals that @jimrh mentioned giving me an image to test now.