Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files installed to CATKIN_PACKAGE_SHARE_DESTINATION do not appear in devel/share #1099

Closed
tomlankhorst opened this issue Jun 11, 2020 · 6 comments
Labels

Comments

@tomlankhorst
Copy link

tomlankhorst commented Jun 11, 2020

I 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.

@dirk-thomas
Copy link
Member

Files are intentionally not being copied into the develspace. 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 should be able to access the resources from the src space when using the devel space. If you provide more specific information what you want to do we might be able to give specific suggestions.

@tomlankhorst
Copy link
Author

Thanks @dirk-thomas , I've updated the issue/question.

@dirk-thomas
Copy link
Member

I am not sure if you have seen the ROS support guidelines but we kindly ask to raise questions like this on answers.ros.org instead.

The rational for asking all kind of questions in a single place is:

  • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
  • In the future other users will search there for similar problems and can find your question and the potential answers.
  • The issue tracker in this repo is used to track bugs, feature requests, etc. But your question is not such an action item.

Therefore I will close this ticket here for now. If you have asked your question on answers.ros.org please feel free to add a link to the question to this ticket so that future readers can find the related question.

@tomlankhorst
Copy link
Author

@dirk-thomas Thank you for your reply. I did raise this as an issue, not a question. I think it's inconsistent that not all resources are copied to the devel space. The issue is that during development the layout of files is different from the layout after installation. I'll discuss this somewhere else then. Again, thanks for your time.

@dirk-thomas
Copy link
Member

dirk-thomas commented Jun 12, 2020

I think it's inconsistent that not all resources are copied to the 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.

The issue is that during development the layout of files is different from the layout after installation.

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 to share/<pkgname> and in that case the location relative to the package.xml file is the same.

@dirk-thomas
Copy link
Member

dirk-thomas commented Jun 12, 2020

If you have asked your question on answers.ros.org please feel free to add a link to the question to this ticket so that future readers can find the related question.

See https://answers.ros.org/question/354779/locate-catkin_package_share_destination-in-devel-space/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants