Add testing condition in launch file

asked 2019-07-10 14:04:53 -0500

Kolohe113 gravatar image

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?

edit retag flag offensive close merge delete

Comments

1

Is this launch file added to the CMakeLists.txt in a way such that it is actually tested (e.g. using add_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.

mgruhler gravatar imagemgruhler ( 2019-07-12 01:27:51 -0500 )edit