0
$\begingroup$

Rosanswers logo

My ROS node has some data files (specifically, GLSL shaders), that it needs to run. How can I configure catkin to copy these files over to the devel space from src, so that when rosrun or roslaunch is called, the files are in the proper place?

EDIT: Let me clarify. I have a couple of files in my src directory. My executable is assuming that these files are going to be in some path relative to itself (in this case, it is in the devel) directory. i.e, I have "./some_path_to_file" in places in my code. Right now, I manually copy these files into the devel space so the executable can access them. What are better alternatives to this?


Originally posted by mklingen on ROS Answers with karma: 38 on 2015-02-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You don't need to copy any files from source to devel space. rosrun as well as roslaunch are able to find your files in source space if you reference them correctly.

Please post more information in order to get more specific help what might need to be changed in your package.


Originally posted by Dirk Thomas with karma: 16276 on 2015-02-09

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by mklingen on 2015-02-09:
I see. So I should, for instance, use roslib itself to find the files in source space?

Comment by mklingen on 2015-02-09:
Thank you, I simply used ros::package::getPath to find the files in the source space instead

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.