Is it possible to containerize the GoPiGo libraries in such a way that they can be “plopped” into any version of any Raspberry Pi operating system software, and have a working robot that can be used and developed against.
The more I think about it, the more I become convinced that the biggest problem is the fact that Python is a moving target and being tied to a particular version is what’s hurting us.
If I remember correctly, @cyclicalobsessive mentioned that most, if not all, of the robot’s primitives were already implemented in C/C++.
Idea:
Scrap Python per se and leverage the non-Python libraries and interfaces.
If possible, develop version agnostic Python “hooks” into the C(++) libraries.
Develop a version of the gopigo and easy_ gopigo libraries, leveraging the existing low-level code so that existing code can use them.
This is a thought experiment at the present time, but I sincerely believe that we need to get outside chasing Python versions every time someone sneezes.
No, that is not what hurt me at all. The move from Python2.7 to Python3.x for GoPiGo3 API was a “nothing to do”.
Not even close. The GoPiGo3 class is implemented in C++ and MR accepted my update to honor 16-tick encoders.
All the goodies for the GoPiGo3 that make the programming easy to learn are actually in the EasyGoPiGo3 class which was not implemented by DI/MR. When I thought Python on Pi5 was going to be a problem, I started building a C++ EasyGoPiGo3 class, but when the going got hard I discovered that Python worked fine on the Pi5 by commenting out some obsolete SPI GPIO hardware dependant lines. I abandoned my C++ EasyGoPiGo3 effort.
Not without adding a bunch of “what processor AND OS am I running on” tests and a Docker device configuration guru handy. Docker containers are very nice when all the software executes software actions inside the container. As soon as software wants to reach out of the container to real hardware on a variety of base operating systems - oh boy, uncharted chaos. (I’m talking audio, USB, GPIO, SPI, UART, and camera specifically. Network hardware is not configured by default but is a one-liner in most cases: “–net-host”. Oh, and user authentication on files and devices is serious PITA bread.)
I have tried to create dedicated install scripts for each major “latest PiOS” flavor and three Ubuntu major releases. A universal “Works On Any Raspberry Pi model and any supported OS” would not be a small dev effort, and would not be a small test effort. Considering the number of folks that come asking “How do I install on ____”, I think we’re doing just fine.