ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Copying Files into Devel Space?

asked 2015-02-09 15:52:45 -0600

mklingen gravatar image

updated 2015-02-09 16:40:03 -0600

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-02-09 16:16:22 -0600

Dirk Thomas gravatar image

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.

edit flag offensive delete link more

Comments

I see. So I should, for instance, use roslib itself to find the files in source space?

mklingen gravatar image mklingen  ( 2015-02-09 16:28:33 -0600 )edit

Thank you, I simply used ros::package::getPath to find the files in the source space instead

mklingen gravatar image mklingen  ( 2015-02-09 16:41:11 -0600 )edit

Question Tools

Stats

Asked: 2015-02-09 15:52:45 -0600

Seen: 599 times

Last updated: Feb 09 '15