where to download extra files needed at runtime?
With rosbuild, I used to download data when building and place them in the src folder. I could them find them at runtime with ros::package::getPath().
This is usually data that is too large to be hosted in the repository, like large binary configuration files. They are needed by some of our nodes, and they usually load them when they start. As such they must be accessible at run time.
Now in catkin, I am wondering where to download them and how to retrieve them at runtime. I created a cmake function based on download_checkmd5.py that creates a new target (download_extra_data). Each package CMakeLists can declare some data to be downloaded, which happens when I make that target. What's the best strategy?
I can download them to the source folder and retrieve them with ros::package::getPath(), but that goes against the principle of not touching the source folder. Also, this would probably not work if I were to distribute my package in binary form (as the ros packages are), so it does not seem like a good solution.
I can download them to the build folder, but then how to retrieve them at runtime?
I believe the best would be to download them to the devel space, right? How can I do that? Then how to retrieve them at runtime?
For the moment, as a temporary solution, I am downloading to a path specified by an environment variable, but I am looking for a cleaner solution.
My question before answering would be what kind of data are you downloading during the build?