personalrobotics / aikido

Artificial Intelligence for Kinematics, Dynamics, and Optimization
https://personalrobotics.github.io/aikido/
BSD 3-Clause "New" or "Revised" License
213 stars 30 forks source link

Update CatkinResourceRetriever to use ROS Package Framework #608

Open egordon opened 2 years ago

egordon commented 2 years ago

Currently, CatkinResourceRetriever builds up the list of packages from scratch using environment variables (e.g. CMAKE_PREFIX_PATH).

This takes a while. But ROS already has a built-in way to resolve packages: https://wiki.ros.org/Packages

Ideally, we can modify CatkinResourceRetriever (or create a new RosResourceRetriever if we insist on keeping ros deps separate) to lazily check for package resolution when a resource is requested (and optionally cache the resolution so we minimize calls to rospack, though my guess is calls to rospack will be fast enough that this won't be necessary) rather than building it beforehand.