Add testing condition in launch file
I wonder if there is a option for me to change a node parameter whenever I run a rostest using catkin_make run_tests
. For example, say my launch file is:
<launch>
<node name="visual"
pkg="robot_visual"
type="visual"
respawn="false"
output="screen"
required="false">
</node>
<test pkg="robot_visual"
test-name="visual_testnode"
type="visual_testnode"/>
</launch>
Is there a way to change this required="false"
parameter to true
whenever I run catkin_make run_tests
? But when I roslaunch
this launch file normally, required
will be false
?
Is this launch file added to the
CMakeLists.txt
in a way such that it is actually tested (e.g. usingadd_rostest
)?What you could do is to use a launch arg, set to false, in this launch file and use another launch file that you call with
add_rostest
that includes the above launch file and passes the arg as true.