Add testing condition in launch file

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

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 image mgruhler  ( 2019-07-12 01:27:51 -0600 )edit