rosbuild_add_roslaunch_check fails for included files using launch file arguments
Hi,
maybe this is a very special usecase but I encountered some missmatching between the behaviour of roslaunch and the result of rosbuild_add_roslaunch_check.
In detail: I tried to setup a launch file with
<?xml version="1.0"?>
<launch>
<!-- define arg -->
<arg name="pkg_arg" default="$(find my_pkg)"/>
<!-- use arg -->
<param name="param1" value="$(arg pkg_arg)"/> <!-- this is working, test is ok -->
<include file="$(arg pkg_arg)/included.launch"/> <!-- this is working too, but test fails-->
</launch>
trying to use a launch file argument to find an include file. The behaviour when roslaunching the file is fine, the parameter gets uploaded and the included.launch file gets included. Perfect. But when I add a rosbuild_add_roslaunch_check for that file I get
Traceback (most recent call last):
File "/opt/ros/electric/stacks/ros_comm/tools/rostest/bin/roslaunch-check.py", line 86, in <module>
error_msg = check_roslaunch_file(roslaunch_path)
File "/opt/ros/electric/stacks/ros_comm/tools/rostest/bin/roslaunch-check.py", line 48, in check_roslaunch_file
error_msg = roslaunch.rlutil.check_roslaunch(roslaunch_file)
File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/rlutil.py", line 206, in check_roslaunch
base_pkg, file_deps, missing = roslaunch.depends.roslaunch_deps([f])
File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/depends.py", line 239, in roslaunch_deps
rl_file_deps(file_deps, launch_file, verbose)
File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/depends.py", line 146, in rl_file_deps
parse_launch(launch_file, file_deps, verbose)
File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/depends.py", line 131, in parse_launch
_parse_launch(launch_tag.childNodes, launch_file, file_deps, verbose)
File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/depends.py", line 82, in _parse_launch
sub_launch_file = resolve_args(tag.attributes['file'].value)
File "/opt/ros/electric/ros/core/roslib/src/roslib/substitution_args.py", line 216, in resolve_args
resolved = _arg(resolved, a, args, context)
File "/opt/ros/electric/ros/core/roslib/src/roslib/substitution_args.py", line 167, in _arg
raise ArgException(arg_name)
roslib.substitution_args.ArgException: pkg_arg
My guess is that something in the cmake macro for checking roslaunch files is wrong. Can somebody point me to the right location?
Best, Florian