For that, I have a question and if anyone could provide some experience / hints, that would be fantastic!
The lbr_fri_ros2_stack is a driver for the KUKA LBR and can be compiled against multiple SDK versions. Does the ROS tooling facilitate distributing different versions of the same library?
In short, no. The ROS tooling generally follows the Debian distribution model, where there can only be one version of an application/shared library installed.
If you want to be able to ship a library that supports several different backend versions, my best suggestion is to change the build process in GitHub - lbr-stack/lbr_fri_ros2_stack: ROS 2 integration for KUKA LBR IIWA 7/14 and Med 7/14. In particular, what I’d suggest is that the CMakeLists.txt build for all supported versions, in libraries called like lbr_fri_<version>.so. Then you install all of them, and have some mechanism (environment variable or something else) so that users can choose between those libraries at runtime instead. That should allow it to be released more easily, and should also work for those building from source.