Categories: Beginner
This port was developed as a project at university. Because of this specific use case, the focus was on rescuing the core features required to pass our hardware tests on modern OS images.
The original librobotcontrol is an essential library for robotics on the BeagleBone, but it relied on deprecated Sysfs interfaces (like /sys/class/gpio and old PWM paths). On modern kernels (6.x), these interfaces were removed or changed, leading to Errors when trying to run the library on newer Debian images.
To bring the library back to life for the course hardware, I implemented a targeted modernization of the hardware abstraction layer:
-
Updated Device Paths: Replaced broken hardcoded paths for PWM and hardware encoders with the
/dev/bone/symlinks provided by BeagleBoard udev rules. -
Dynamic Motor Pin Detection: Instead of relying on hardcoded pin paths, the motor initialization now dynamically finds the correct pins using
gpio-line-namesdefined in a custom Device Tree Overlay (RoboticsCape.dtbo). -
libgpiod Integration: Updated specific GPIO calls that were necessary for our tests to use the modern
libgpiodstandard instead of the deprecated/sys/class/gpio.
Since this originated as a focused project for specific course requirements, it is not a 100% complete rewrite of every single library feature just yet. However, the most critical core functionalities, such as the MPU/DMP (IMU), motor PWM control, eQEP encoders, and backend math filters, are successfully working again on Kernel 6.12.45!
For a detailed breakdown of what is fully tested, what currently still fails, and instructions on how to use it, please check out the README.md and VALIDATION.md in the GitHub repository.
Link: https://github.com/Jako-b/librobotcontrol-crossbuild
Comments are not currently available for this post.