question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Files installed to CATKIN_PACKAGE_SHARE_DESTINATION do not appear in devel/share

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dirk-thomascommented, 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/

0reactions
dirk-thomascommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

install destination error with my catkin package - ROS Answers
I run catkin_make, failed about install DESTINATION. ... cv_bridge DEPENDS opencv ) Where is ${CATKIN_PACKAGE_BIN_DESTINATION}?
Read more >
catkin_install_python() called without required DESTINATION ...
First, while catkin is a generic enough tool, it's typically used for the robotics framework ROS. So by asking on ROS' question community ......
Read more >
Open Source Q&A Forum - RSS feed - ROS Answers
But it seems like based on ros_make, not catkin_make. My question is: can I install 3rd party package from binary? Or Can I...
Read more >
ROS Tutorial: How to solve the error "ImportError : No module ...
A common scenario is that my ROS Messages are identified with rosmsg list but when we try to use the message on our...
Read more >
Catkin and Packages
Ideally, the install directory contains a full directory tree with all the files that come with your project and are needed to run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found