robotology / whole-body-estimators

YARP devices that implement estimators for humanoid robots.
24 stars 12 forks source link

pixi: Cleanup handling of dependencies built from source and showcase pixi+colcon integration to install dependencies from source #184

Closed traversaro closed 4 months ago

traversaro commented 4 months ago

Inspired by a comment by @S-Dafarra at the latest "Research Methods and Tools", I realized that I was being a bit sloppy in handling the installation of dependencies from source in the pixi workflow I added in this repo. Instead, it was a perfect occasion of how pixi and vcstool/colcon can work together, pixi handling binary dependencies, while vcstool/colcon handling (in a bit more manual way) the dependencies installed from source.

The download_deps and install_deps steps drastically simplifying by using vcstool and colcon (the tools typically used in ROS 2 workflow). I feel that maintenance is also greatly improved in this way, as if one needs to add a source dependencies it is just needed to add an entry in the pixi_source_deps.yaml file, and optionally add the CMake options used in pixi_source_deps_options.meta.

To keep the nice pattern of using pixi_ prefix for pixi-related files, I renamed the set_install_prefix.* script to pixi_activation.*, that also reflects better what they do as I integrated as I integrated setting the CMAKE_PREFIX_PATH and PYTHONPATH env variables that as @martinaxgloria discovered in https://github.com/robotology/icub-tests/pull/71 can be used to ensure isolation w.r.t. robotology-superbuild's setup.sh sourced in the terminal.

The final result is that there are a lot of pixi_* files hanging around in the root directory of the repo. I am unsure if it make sense to move them in a dedicated directory, for now let's leave them in the root directory of the repo.