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

Revision history [back]

click to hide/show revision 1
initial version

Have you tried adding $(find my_package) to find the file relative to the my_package in your test's launchfile? Here's an example of what your pc_merger test would look like assuming the package name was 'my_package':

<test pkg="my_package" test="pc_merger_test_1" test="pc_merger_node" >
    <param name="sample_pointcloud" value="$(find my_package)/data/cloud1.pcd" />
</test>

Have you tried adding $(find my_package) to find the file relative to the my_package in your test's launchfile? You will also have to add the associated parameter for specifying the file location to the test. Here's an example of what your pc_merger test would look like assuming the package name was 'my_package':'my_package' and the test node had a local ros parameter called 'sample_pointcloud':

<test pkg="my_package" test="pc_merger_test_1" test="pc_merger_node" test-name="pc_merger_test_1" type="pc_merger_node" >
    <param name="sample_pointcloud" value="$(find my_package)/data/cloud1.pcd" />
</test>

Have you tried adding $(find my_package) to find the file relative to the my_package in your test's launchfile? You will also have to add the associated parameter for specifying the file location to the test. Here's an example of what your pc_merger test would look like assuming the package name was 'my_package' and the test node had a local ros parameter called 'sample_pointcloud':

<test pkg="my_package" test-name="pc_merger_test_1" type="pc_merger_node" >
    <param name="sample_pointcloud" value="$(find my_package)/data/cloud1.pcd" />
</test>

Another way to handle this would be to specify the current working directory the test is launched in using the cwd attribute. This would allow you to keep a hardcoded relative path to the test file in your test. Here's what that would look like:

 <test pkg="my_package" test-name="pc_merger_test_1" type="pc_merger_node"  cwd="$(find my_package)"/>