Files installed to CATKIN_PACKAGE_SHARE_DESTINATION do not appear in devel/share
See original GitHub issueI specify additional resources to install:
install(
DIRECTORY resources/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/resources )
They do appear in share/my_pkg/resources
when I install the package.
They don’t, however, appear in the devel
space during development.
That is, devel/share/mypkg
does not contain resources
.
How to go about this? I would like to access these resources in a predictable way both during development and after installation.
Edit after comment:
An executable my_node
needs some binary resource files during run-time. I have these files in a /resources
directory under my package root.
I specified the install(...)
command above to have them installed.
During development, I would like to use these resources too. So it would be wonderful to have a method getResourcesDir()
that would return me the path to the corresponding folder. That is, /opt/ros/melodic/share/my_pkg/resources
or $SOURCE_PATH/my_pkg/resources
, depending on whether the pkg is installed or not.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
See https://answers.ros.org/question/354779/locate-catkin_package_share_destination-in-devel-space/
I answered this specific aspect above: Files are intentionally not being copied into the
devel
space. That is the whole point of it - being able to iterate on source files and immediately using them - without the need to run a build.You can layout the source space in a way that it is possible to make the lookup the from devel space as well as install space the same.
If the
resources
are in the root of your source space I would expect them to be installed toshare/<pkgname>
and in that case the location relative to thepackage.xml
file is the same.