Currently our macros & build.rs provide mechanisms for either explicitly passing in search paths for packages or using the ROS_PACKAGE_PATH environment variable.
ROS2 appears to use a combination of AMENT_PREFIX_PATH, COLCON_PREFIX_PATH, and some kind of stored index to discover packages at runtime.
We should do a little research and expand build.rs API and macros to be able to automatically search for packages in the ROS2 idiomatic way.
A small standalone rust crate that does this searching in a way matching ROS2's expectations is probably worth contributing to broader ecosystem. Heck some research should be done to see if anything already exists.
Currently our macros & build.rs provide mechanisms for either explicitly passing in search paths for packages or using the ROS_PACKAGE_PATH environment variable.
ROS2 appears to use a combination of AMENT_PREFIX_PATH, COLCON_PREFIX_PATH, and some kind of stored index to discover packages at runtime.
We should do a little research and expand build.rs API and macros to be able to automatically search for packages in the ROS2 idiomatic way.
A small standalone rust crate that does this searching in a way matching ROS2's expectations is probably worth contributing to broader ecosystem. Heck some research should be done to see if anything already exists.