Accessing data downloaded via catkin_download_test_data
Catkin's document "Downloading test data" recommends to specify the location to store the downloaded data by DESTINATION
option in catkin_download_test_data
macro, so that the data can be accessed in roslaunch
by $(find your_package)
during the tests.
While using CATKIN_DEVEL_PREFIX
in DESTINATION certainly downloads the data at the intended location under devel
folder, however, in the workspaces built by normal ways (e.g. catkin_make
, catkin build
with limited options etc.), rospack find
looks for the specified package under src
instead of devel
AFAIK, which results in the test not being able to find the downloaded data.
Is there a way to access the data without changing much of workspace build process?
I'm pretty sure the catkin doc above is using velodyne package as an example, where the tests successfully access the downloaded data by a chain of complicated catkin_make_isolated
commands, which is not ideal in my case.
UPDATE1. Is catkin run_tests
not enough to run test target? That's what I do in this PR (build script is here) and fails (e.g. here saying the file is not found).
UPDATE2. I conclude in the end that the way mentioned in Catkin's doc I referenced at the top should work as expected. In my very own case, rospack
had not been able to find the downloaded file simply because there was a typo in the path name :/
I don't think it is enough to say just
catkin run_tests
. Instead you can trycatkin build
and thencatkin run_tests
. It could also be that your test targets do not depend on the download target, so the file is not downloaded by make before trying to run the test.