How to split ros2 humble into build and runtime dependencies

asked 2023-03-31 08:34:31 -0500

industrialrosuser gravatar image

In our company we are using conan as a package manager and we are currently working on a ros2 conan package. We need to build that package for x86 and arm. Since we don't want to use python bindings on our target platform and we allow every developer to install whatever python version he/she wants, we wanted to remove everything python related from that ros2 conan package.

Unfortunately, we have noticed, that ament and rosidl are heavily relying on python, so we wanted to split the ros2 sources into build and runtime dependencies in order to not run into conflicts during cross compilation. In that build package we are just packaging all the ament and rosidl generation packages and and all python dependencies required by them as well as a python interpreter to avoid the python version hell. Conan provides the necessary functionalities to distinguish between build requirements and runtime requirements during cross compilation. We need to allow every developer to rebuild the ros2 runtime package so we can't just leave ament and rosidl away. That build package is also required to build other message packages, containing some additional ros2 messages.

While doing this we was facing the next problem. For ament it works fine but the rosidl packages seems to be not splittable into runtime and generation packages, since the rosidl_generators packages are relying on the rosidl_runtime packages. Beside that, i have no clue what these typesupport stuff is about and if they are build or runtime requirements. All of these rosidl packages come with some python code which I want to put all in the build package.

So, can someone help me with how I could split the ros2 repositories into build and runtime dependencies, whereas the runtime package has none python code inside? Is that even possible?

Thanks!

edit retag flag offensive close merge delete