This commit is contained in:
Ivan
2022-04-05 11:42:28 +03:00
commit 6dc0eb0fcf
5565 changed files with 1200500 additions and 0 deletions

View File

@@ -0,0 +1 @@
<blah>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- roslaunch file that loads no nodes, and thus should exit immediately -->
<param name="noop" value="noop" />
</launch>

View File

@@ -0,0 +1 @@
<foo />

View File

@@ -0,0 +1,48 @@
<launch>
<arg name="required" />
<arg name="optional" default="not_set" />
<arg name="grounded" value="parent" />
<arg name="include_arg" value="dontcare" />
<arg name="if_test" value="dontcare" />
<arg name="param1_name" value="p1" />
<arg name="param2_name" value="p2" />
<arg name="param3_name" value="p3" />
<arg name="param1_value" value="$(arg required)" />
<arg name="param2_value" value="$(arg optional)" />
<arg name="param3_value" value="$(arg grounded)" />
<param name="$(arg param1_name)_test" value="$(arg param1_value)" />
<param name="$(arg param2_name)_test" value="$(arg param2_value)" />
<param name="$(arg param3_name)_test" value="$(arg param3_value)" />
<!-- Normal include: explicitly set args -->
<include ns="notall" file="$(find roslaunch)/test/xml/test-arg-include.xml">
<arg name="required" value="$(arg required)" />
<arg name="include_arg" value="$(arg include_arg)" />
<arg name="if_test" value="$(arg if_test)" />
</include>
<!-- Normal include: explicitly set args, including an optional one -->
<include ns="notall_optional" file="$(find roslaunch)/test/xml/test-arg-include.xml">
<arg name="required" value="$(arg required)" />
<arg name="optional" value="$(arg optional)" />
<arg name="include_arg" value="$(arg include_arg)" />
<arg name="if_test" value="$(arg if_test)" />
</include>
<!-- Include with passing in all args in my namespace -->
<include ns="all" file="$(find roslaunch)/test/xml/test-arg-include.xml"
pass_all_args="true">
</include>
<!-- Include with passing in all args in my namespace, and then override one
of them explicitly -->
<include ns="all_override" file="$(find roslaunch)/test/xml/test-arg-include.xml"
pass_all_args="true">
<arg name="required" value="override" />
</include>
</launch>

View File

@@ -0,0 +1,26 @@
<launch>
<arg name="required" />
<arg name="if_test" />
<arg name="include_arg" />
<arg name="optional" default="not_set" />
<arg name="grounded" value="set" />
<arg name="param1_name" value="p1" />
<arg name="param2_name" value="p2" />
<arg name="param3_name" value="p3" />
<arg name="param4_name" value="p4" />
<arg name="param1_value" value="$(arg required)" />
<arg name="param2_value" value="$(arg optional)" />
<arg name="param3_value" value="$(arg grounded)" />
<group ns="include_test">
<param name="$(arg param1_name)_test" value="$(arg param1_value)" />
<param name="$(arg param2_name)_test" value="$(arg param2_value)" />
<param name="$(arg param3_name)_test" value="$(arg param3_value)" />
<param name="$(arg param4_name)_test" value="$(arg include_arg)" />
</group>
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<include file="$(find roslaunch)/test/xml/test-arg-invalid-included.xml">
<arg name="grounded" value="not_set"/>
</include>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<include file="$(find roslaunch)/test/xml/test-arg-invalid-included.xml" pass_all_args="true">
<arg name="grounded" value="not_set"/>
</include>
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<arg name="grounded" value="set"/>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<arg name="grounded" value="1"/>
<arg name="grounded" value="regrounded"/>
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<arg name="invalid" value="$(arg missing)"/>
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<arg name="grounded" value="not_set"/>
<include file="$(find roslaunch)/test/xml/test-arg-invalid-included.xml" pass_all_args="true"/>
</launch>

View File

@@ -0,0 +1,98 @@
<launch>
<arg name="required" />
<arg name="if_test" />
<arg name="optional" default="not_set" />
<arg name="grounded" value="set" />
<arg name="include_arg" value="initial" />
<arg name="param1_name" value="p1" />
<arg name="param2_name" value="p2" />
<arg name="param3_name" value="p3" />
<arg name="param1_value" value="$(arg required)" />
<arg name="param2_value" value="$(arg optional)" />
<arg name="param3_value" value="$(arg grounded)" />
<arg name="int_value" value="1234" />
<arg name="float_value" value="3.0" />
<arg if="$(arg if_test)" name="if_param_value" value="true" />
<arg unless="$(arg if_test)" name="if_param_value" value="false" />
<arg if="$(arg if_test)" name="py_if_param_value" value="$(eval 1 == 1)"/>
<arg unless="$(arg if_test)" name="py_if_param_value" value="$(eval 1 == 0)"/>
<param name="$(arg param1_name)_test" value="$(arg param1_value)" />
<param name="$(arg param2_name)_test" value="$(arg param2_value)" />
<param name="$(arg param3_name)_test" value="$(arg param3_value)" />
<param name="if_param" value="$(arg if_param_value)" />
<param name="py_if_param" value="$(arg py_if_param_value)" />
<param name="int_param" value="$(arg int_value)" />
<param name="float_param" value="$(arg float_value)" />
<group>
<arg name="context" value="group1" />
<param name="context1" value="$(arg context)" />
</group>
<group>
<arg name="context" value="group2" />
<param name="context2" value="$(arg context)" />
</group>
<arg name="fail" value="0" />
<group if="$(arg fail)">
<param name="fail" value="fail" />
</group>
<group unless="$(arg fail)">
<param name="succeed" value="yes" />
</group>
<group if="$(arg if_test)">
<param name="if_test" value="ran" />
</group>
<group unless="$(arg if_test)">
<param name="if_test" value="not_ran" />
</group>
<arg name="py_fail" value="$(eval 0 &gt; 1)"/>
<group if="$(eval py_fail == True)">
<param name="py_fail" value="fail" />
</group>
<group unless="$(eval arg('py_fail') == True)">
<param name="py_succeed" value="yes" />
</group>
<group if="$(eval if_test == True)">
<param name="py_if_test" value="ran" />
</group>
<group unless="$(eval arg('if_test') == True)">
<param name="py_if_test" value="not_ran" />
</group>
<include file="$(find roslaunch)/test/xml/test-arg-include.xml">
<arg name="required" value="required1" />
<arg name="include_arg" value="$(arg include_arg)" />
</include>
<include ns="include2" file="$(find roslaunch)/test/xml/test-arg-include.xml">
<arg name="required" value="required2" />
<arg name="optional" value="optional2" />
<arg name="include_arg" value="new2" />
</include>
<include if="$(arg if_test)" ns="include3" file="$(find roslaunch)/test/xml/test-arg-include.xml">
<arg name="required" value="required3" />
<arg name="optional" value="optional3" />
<arg name="include_arg" value="new3" />
</include>
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<!-- intentionally empty -->
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" type="test_clear_params_no_name" clear_params="true" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- group with no 'ns' attribute -->
<group clear_params="true" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- include with no 'ns' attribute -->
<include clear_params="true" file="$(find roslaunch)/test/xml/test-clear-params-include.xml" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" name="node_name" type="test_clear_params_invalid_clear_params_attr" clear_params="foo" />
</launch>

View File

@@ -0,0 +1,28 @@
<launch>
<node pkg="package" type="type" name="test_clear_params1" clear_params="true" />
<node pkg="package" type="type" name="test_clear_params2" clear_params="True" />
<node pkg="package" type="type" name="test_clear_params_ns" ns="clear_params_ns" clear_params="true"/>
<node pkg="package" type="type" name="test_clear_params_default" ns="clear_params_default" />
<node pkg="package" type="type" name="test_clear_params_false" ns="clear_params_false" clear_params="False"/>
<group ns="group_test" clear_params="true">
</group>
<group ns="group_test_default">
</group>
<group ns="group_test_false" clear_params="false">
</group>
<group ns="embed_group_test">
<group ns="embedded_group" clear_params="true" />
</group>
<include ns="include_test" clear_params="true" file="$(find roslaunch)/test/xml/test-clear-params-include.xml" />
<include ns="include_test_false" clear_params="false" file="$(find roslaunch)/test/xml/test-clear-params-include.xml" />
<include ns="include_test_default" file="$(find roslaunch)/test/xml/test-clear-params-include.xml" />
</launch>

View File

@@ -0,0 +1,41 @@
<launch>
<param name="~tilde1" value="foo" />
<rosparam file="$(find roslaunch)/test/dump-params.yaml" command="load" />
<group ns="rosparam">
<param name="~tilde2" value="bar" />
<rosparam file="$(find roslaunch)/test/dump-params.yaml" command="load" />
</group>
<node pkg="package" type="test_base" name="node_rosparam">
<param name="local_param" value="baz" />
<rosparam file="$(find roslaunch)/test/dump-params.yaml" command="load" />
</node>
<node pkg="package" type="test_base" name="node_rosparam2">
</node>
<rosparam param="inline_str">value1</rosparam>
<rosparam param="inline_list">[1, 2, 3, 4]</rosparam>
<rosparam param="inline_dict">{key1: value1, key2: value2}</rosparam>
<rosparam param="inline_dict2">
key3: value3
key4: value4
</rosparam>
<rosparam param="override">{key1: value1, key2: value2}</rosparam>
<rosparam param="override">{key1: override1}</rosparam>
<!-- no key tests -->
<rosparam>
noparam1: value1
noparam2: value2
</rosparam>
<!-- allow empty files. we test absense of loading in test-rosparam-empty.
Here we include to make sure this doesn't blank out other parameters -->
<rosparam file="$(find roslaunch)/test/params_empty1.yaml" command="load" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n12i" pkg="package" type="test_one_two_include" />
</launch>

View File

@@ -0,0 +1,18 @@
<launch>
<node name="n0" pkg="package" type="test_none" />
<env name="ONE" value="one" />
<node name="n1" pkg="package" type="test_one">
</node>
<env name="TWO" value="two" />
<node name="n2" pkg="package" type="test_one_two_priv">
<env name="PRIVATE_TWO" value="private_two" />
</node>
<node name="n3" pkg="package" type="test_one_two" />
<include file="$(find roslaunch)/test/xml/test-env-include.xml">
<env name="INCLUDE" value="include" />
</include>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<group if="1" unless="1">
</group>
</launch>

View File

@@ -0,0 +1,63 @@
<launch>
<group if="1">
<param name="group_if_pass" value="1" />
</group>
<group if="0">
<param name="group_if_fail" value="1" />
</group>
<group unless="0">
<param name="group_unless_pass" value="1" />
</group>
<group unless="1">
<param name="group_unless_fail" value="1" />
</group>
<param name="param_if_pass" value="1" if="1" />
<param name="param_if_fail" value="1" if="0" />
<param name="param_unless_pass" value="1" unless="0" />
<param name="param_unless_fail" value="1" unless="1" />
<remap from="from_if_pass" to="to_if_pass" if="1" />
<remap from="from_if_fail" to="to_if_fail" if="0" />
<remap from="from_unless_pass" to="to_unless_pass" unless="0" />
<remap from="from_unless_fail" to="to_unless_fail" unless="1" />
<!-- Test Python parsing -->
<group if="$(eval 1 == 1)">
<param name="py_group_if_pass" value="1" />
</group>
<group if="$(eval 0 == 1)">
<param name="py_group_if_fail" value="1" />
</group>
<group unless="$(eval 0 == 1)">
<param name="py_group_unless_pass" value="1" />
</group>
<group unless="$(eval 1 == 1)">
<param name="py_group_unless_fail" value="1" />
</group>
<arg name="true_lower" value="true"/>
<arg name="true_upper" value="True"/>
<arg name="false_lower" value="false"/>
<arg name="false_upper" value="False"/>
<param name="py_param_if_pass" value="1" if="$(eval arg('true_lower') and (40+2) == 42)"/>
<param name="py_param_if_fail" value="1" if="$(eval false_lower or (40-2) != 38)"/>
<param name="py_param_unless_pass" value="1" unless="$(eval arg('false_upper') or 1 &lt; 1)"/>
<param name="py_param_unless_fail" value="1" unless="$(eval true_upper and 1 &gt;= 1)"/>
<remap from="py_from_if_pass" to="py_to_if_pass" if="$(eval arg('true_upper') == True)"/>
<remap from="py_from_if_fail" to="py_to_if_fail" if="$(eval false_upper != False)"/>
<remap from="py_from_unless_pass" to="py_to_unless_pass"
unless="$(eval arg('false_lower') or false_upper or arg('false_upper') != False)"/>
<remap from="py_from_unless_fail" to="py_to_unless_fail"
unless="$(eval arg('true_lower') and true_upper and arg('true_upper') == True)"/>
<node name="remap" pkg="rospy" type="talker.py" />
</launch>

View File

@@ -0,0 +1,20 @@
<launch>
<!-- no local params -->
<node pkg="pkg" type="type0" name="node0"/>
<group ns="group1">
<!-- basic test, named nodes -->
<node pkg="pkg" type="gtype0" name="g1node0" />
<param name="~gparam1" value="val1" />
<node pkg="pkg" type="g1type1" name="g1node1" />
<param name="~gparam2" value="val1" />
<node pkg="pkg" type="g1type2" name="g1node2" />
</group>
<!-- make sure scope is cleared by end of group -->
<param name="~param1" value="val1" />
<node pkg="pkg" type="type1" name="node1" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<machine name="machine3" address="address3" ros-ip="hostname" />
</launch>

View File

@@ -0,0 +1,9 @@
<launch>
<machine name="machine4" address="address4">
<env name="ENV1" value="value1" />
<env name="ENV2" value="value2" />
<env name="ENV3" value="value3" />
</machine>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<!-- if ros-root is explicitly set and ros-package-path is not, ros-package-path should not get a default value -->
<machine name="machine5" address="address5" ros-root="/ros/root" />
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<!-- address is required -->
<machine name="machine1" />
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<!-- name is required -->
<machine address="address1" />
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<!-- timeout must be non-empty -->
<machine timeout="" name="one" address="address1" />
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<!-- timeout must be a number -->
<machine timeout="ten" name="one" address="address1" />
</launch>

View File

@@ -0,0 +1,5 @@
<launch>
<!-- timeout must be a number -->
<machine timeout="-1" name="one" address="address1" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<machine name="machine2" address="address2" ros-root="/ros/root" ros-package-path="/ros/package/path" ros-host-name="hostname" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<machine name="machine1" address="address1" default="foo" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<machine name="$(env NAME)" address="$(env ADDRESS)" />
</launch>

View File

@@ -0,0 +1,17 @@
<launch>
<machine name="machine1" address="address1" default="true" />
<!-- verify ros-ip and ros-host-name alias -->
<machine name="machine6" address="address6">
<!-- fake attrs are okay, but will print warnings to screen -->
<fake name="ENV3" value="value3" />
</machine>
<machine name="machine7" address="address7" timeout="10.0" />
<machine name="machine8" address="address8" timeout="1" />
<machine name="machine9" address="address19" env-loader="/opt/ros/fuerte/env.sh" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="test_cwd_invalid" cwd="foo" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<node name="n" pkg="package" type="env_test_invalid_name">
<env name="" value="env1 value1" />
</node>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<node name="n" pkg="package" type="env_test_invalid_name">
<env value="env1 value1" />
</node>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<node name="n" pkg="package" type="env_test_invalid_value">
<env name="env1" />
</node>
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<!-- should raise exception for node pkg being empty -->
<node name="n" pkg="" type="test_xmlparseexception" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="test_ns_invalid" machine="" />
</launch>

View File

@@ -0,0 +1,9 @@
<launch>
<!-- this test is currently disabled is this is legal right now -->
<!-- name attribute missing with param set -->
<node pkg="package" type="name_test_invalid_value">
<param name="foo" value="bar" />
</node>
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<node pkg="package" type="name_test_invalid_value" name="ns/foo" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- names cannot have namespaces -->
<node pkg="package" type="test_cwd_invalid" name="ns/name" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" type="test_ns_invalid" ns="" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" type="test_ns_invalid" ns="/global" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" type="test_ns_invalid" ns="" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="package" type="type" output="foo" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node pkg="" type="type" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node type="type" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="type" required="" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="type" required="foo" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="type" respawn="true" required="true" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="type" respawn="foo" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" type="" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n" pkg="package" />
</launch>

View File

@@ -0,0 +1,10 @@
<launch>
<group ns="ns1">
<node pkg="package" type="test_node_rosparam_delete" name="rosparam_delete">
<rosparam ns="ns2" param="param" command="delete" />
</node>
</group>
</launch>

View File

@@ -0,0 +1,8 @@
<launch>
<node pkg="package" type="test_node_rosparam_dump" name="rosparam_dump">
<rosparam file="dump.yaml" command="dump" />
</node>
</launch>

View File

@@ -0,0 +1,9 @@
<launch>
<!-- name attribute is required -->
<node pkg="package" type="test_node_rosparam_invalid_name" >
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
</launch>

View File

@@ -0,0 +1,10 @@
<launch>
<node pkg="package" type="test_node_rosparam_multi" name="rosparam_multi">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
<rosparam file="mdump.yaml" command="dump" />
<rosparam ns="msubns" file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
</launch>

View File

@@ -0,0 +1,8 @@
<launch>
<node pkg="package" type="test_node_rosparam_load_ns" name="load_ns">
<rosparam ns="subns" file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
</launch>

View File

@@ -0,0 +1,8 @@
<launch>
<node pkg="package" type="test_node_rosparam_load_param" name="load_param">
<rosparam param="param" file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
</launch>

View File

@@ -0,0 +1,8 @@
<launch>
<node pkg="package" type="test_node_rosparam_load" name="rosparam_load">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<node name="n1" pkg="$(env PACKAGE)" type="$(env TYPE)" output="$(env OUTPUT)" respawn="$(env RESPAWN)"/>
</launch>

View File

@@ -0,0 +1,82 @@
<launch>
<node name="n1" pkg="package" type="test_base" />
<node name="n2" pkg="package" type="test_args" args="args test" />
<node name="n3" pkg="package" type="test_args_empty" args="" />
<!-- TODO: more substitution args? -->
<node name="n4" pkg="package" type="test_output_screen" output="screen" />
<node name="n5" pkg="package" type="test_output_log" output="log" />
<node name="n6" pkg="package" type="test_machine" machine="machine_test" />
<node name="n7" pkg="package" type="test_ns1" ns="ns_test1" />
<node name="n8" pkg="package" type="test_ns2" ns="ns_test2/child2" />
<node name="n9" pkg="package" type="test_ns3" ns="ns_test3/child3/" />
<node name="n10" pkg="package" type="test_respawn_true" respawn="true" />
<node name="n11" pkg="package" type="test_respawn_TRUE" respawn="TRUE" />
<node name="n12" pkg="package" type="test_respawn_false" respawn="false" />
<node name="n13" pkg="package" type="test_respawn_FALSE" respawn="FALSE" />
<node name="n14" pkg="package" type="test_respawn_none" />
<node name="n15" pkg="package" type="test_env">
<env name="env1" value="env1 value1" />
<env name="env2" value="env2 value2" />
</node>
<node name="n16" pkg="package" type="test_fake">
<!-- unrecognized tags are ok, but will print warnings to screen -->
<fake name="env2" value="env2 value2" />
</node>
<node name="n17" pkg="package" type="test_env_empty">
<env name="env1" value="" />
</node>
<!-- base test of private parameter -->
<node name="test_private_param1" pkg="package" type="test_param">
<param name="foo1" value="bar1" />
</node>
<!-- test ns attribute -->
<node name="test_private_param2" ns="ns_test" pkg="package" type="test_param">
<param name="foo2" value="bar2" />
</node>
<!-- test with noop tilde syntax -->
<node name="test_private_param3" pkg="package" type="test_param">
<param name="~foo3" value="bar3" />
</node>
<node name="n21" pkg="package" type="test_cwd_2" cwd="node" />
<node name="n22" pkg="package" type="test_cwd_3" cwd="ROS_HOME" />
<node name="n23" pkg="package" type="test_cwd_3" cwd="ros_home" />
<node pkg="package" type="test_node_rosparam_load" name="rosparam_load">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
<node pkg="package" type="test_node_rosparam_dump" name="rosparam_dump">
<rosparam file="dump.yaml" command="dump" />
</node>
<node pkg="package" type="test_node_rosparam_load_ns" name="load_ns">
<rosparam ns="subns" file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
<node pkg="package" type="test_node_rosparam_multi" name="rosparam_multi">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
<rosparam file="mdump.yaml" command="dump" />
<rosparam ns="msubns" file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
<node name="n26" pkg="package" type="test_required_true_1" required="true" />
<node name="n27" pkg="package" type="test_required_true_2" required="True" />
<node name="n28" pkg="package" type="test_required_false_1" required="false" />
<node name="n29" pkg="package" type="test_required_false_2" required="FALSE" />
<!-- TODO remap args test -->
<node name="n30" pkg="package" type="test_launch_prefix" launch-prefix="xterm -e gdb --args" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<param name="somestring1" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<param value="someval" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<param name="name1" value="someval" textfile="$(find rosparam)/example.yaml" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<param name="~private" val="value" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<param name="name" command="not_a_command" />
</launch>

View File

@@ -0,0 +1,40 @@
<launch>
<!--
Parameter Server parameters. You can omit the 'type' attribute if
value is unambiguous. Supported types are str, int, double, bool.
You can also specify the contents of a file instead using the
'textfile' or 'binfile' attributes.
-->
<param name="somestring1" value="bar2" />
<!-- force to string instead of integer -->
<param name="somestring2" value="10" type="str" />
<param name="someinteger1" value="1" type="int" />
<param name="someinteger2" value="2" />
<param name="somefloat1" value="3.14159" type="double" />
<param name="somefloat2" value="5.0" />
<!-- you can set parameters in child namespaces -->
<param name="wg/wgchildparam" value="a child namespace parameter 1" />
<group ns="wg2">
<param name="wg2childparam1" value="a child namespace parameter 2" />
<param name="wg2childparam2" value="a child namespace parameter 3" />
</group>
<!-- upload the contents of a file as a param -->
<param name="configfile" textfile="$(find roslaunch)/resources/example.launch" />
<!-- upload the contents of a file as base64 binary as a param -->
<param name="binaryfile" binfile="$(find roslaunch)/resources/example.launch" />
<!-- upload the output of a command as a param. -->
<param name="commandoutput" command="cat &quot;$(find roslaunch)/resources/example.launch&quot;" />
<!-- test that we can override params -->
<param name="override" value="fail" />
<param name="override" value="pass" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- missing to -->
<remap from="from" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- missing from -->
<remap to="to" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- to is empty-->
<remap from="from" to="" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- from is empty -->
<remap from="" to="to" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<remap from="from something" to="to" />
</launch>

View File

@@ -0,0 +1,3 @@
<launch>
<remap from="from" to="to something" />
</launch>

View File

@@ -0,0 +1,38 @@
<launch>
<!-- remap tags are evaluated sequentially and are scoped -->
<remap from="foo" to="bar" />
<!-- should just get foo-bar -->
<node name="n1" pkg="pkg" type="node1" />
<group ns="ns1">
<remap from="foo" to="baz" />
<node name="n2" pkg="pkg" type="node2" />
</group>
<!-- foo-baz should leave scope, should get foo-bar -->
<node name="n3" pkg="pkg" type="node3" />
<!-- should override existing, now foo-bar -->
<remap from="foo" to="far" />
<node name="n4" pkg="pkg" type="node4" />
<!-- test remaps within node's scope -->
<node name="n5" pkg="pkg" type="node5">
<remap from="foo" to="fad" />
<remap from="a" to="b" />
<remap from="c" to="d" />
</node>
<!-- test multiple remaps -->
<remap from="old1" to="new1" />
<remap from="old2" to="new2" />
<remap from="old3" to="new3" />
<node name="n6" pkg="pkg" type="node6" />
</launch>

View File

@@ -0,0 +1,9 @@
<launch>
<!-- allow empty files -->
<rosparam file="$(find roslaunch)/test/params_empty1.yaml" command="load" />
<rosparam file="$(find roslaunch)/test/params_empty2.yaml" command="load" />
<rosparam command="load"/>
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<rosparam file="$(find rosparam)/example.yaml" command="foo" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<rosparam file="" command="load" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<rosparam file="$(find rosparam)/foo.yaml" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<rosparam command="bad" />
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<rosparam>1</rosparam>
</launch>

View File

@@ -0,0 +1,66 @@
<launch>
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
<rosparam file="$(find roslaunch)/test/dump.yaml" command="dump" />
<group ns="rosparam">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
<rosparam file="$(find roslaunch)/test/dump2.yaml" command="dump" />
</group>
<node pkg="package" type="test_base" name="node_rosparam">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
</node>
<group ns="rosparam_subst">
<rosparam file="$(find roslaunch)/test/params_subst.yaml" command="load" subst_value="true" />
</group>
<rosparam param="inline_str">value1</rosparam>
<rosparam param="inline_list">[1, 2, 3, 4]</rosparam>
<rosparam param="inline_dict">{key1: value1, key2: value2}</rosparam>
<rosparam param="inline_dict2">
key3: value3
key4: value4
</rosparam>
<rosparam param="inline_subst" subst_value="true">$(anon foo)</rosparam>
<rosparam param="override">{key1: value1, key2: value2}</rosparam>
<rosparam param="override">{key1: override1}</rosparam>
<!-- no key tests -->
<rosparam>
noparam1: value1
noparam2: value2
</rosparam>
<!-- #3580: make sure angle/deg conversions work -->
<rosparam param="dict_degrees">
deg0: deg(0)
deg180: deg(180)
deg360: deg(360)
</rosparam>
<rosparam param="dict_rad">
rad0: rad(0)
radpi: rad(pi)
rad2pi: rad(2*pi)
</rosparam>
<rosparam param="inline_degrees0">deg(0)</rosparam>
<rosparam param="inline_degrees180">deg(180)</rosparam>
<rosparam param="inline_degrees360">deg(360)</rosparam>
<rosparam param="inline_rad0">rad(0)</rosparam>
<rosparam param="inline_radpi">rad(pi)</rosparam>
<rosparam param="inline_rad2pi">rad(2*pi)</rosparam>
<!-- allow empty files. we test absense of loading in test-rosparam-empty.
Here we include to make sure this doesn't blank out other parameters -->
<rosparam file="$(find roslaunch)/test/params_empty1.yaml" command="load" />
<rosparam file="$(find roslaunch)/test/params_empty2.yaml" command="load" />
<rosparam command="load"/>
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<node name="$(anon foo)" pkg="pkg" type="type" />
<node name="$(anon foo)" pkg="pkg" type="type" />
</launch>

View File

@@ -0,0 +1,14 @@
<launch>
<env name="$(anon foo)/bar" value="$(anon foo)/baz" />
<remap from="$(anon foo)/bar" to="$(anon foo)/baz" />
<node name="n1" pkg="$(optenv FOO foo)" type="$(optenv BAR bar)" args="$(find roslib)">
<param name="$(anon foo)/bar" value="$(anon foo)/bar" />
</node>
<node name="n2" pkg="$(anon foo)" type="$(anon bar)" args="$(anon baz)" />
<param name="$(anon foo)/bar" value="$(anon foo)/bar" />
</launch>

View File

@@ -0,0 +1,7 @@
<launch>
<test test-name="test4" pkg="package" type="test_output_screen" output="screen" />
<test test-name="test5" pkg="package" type="test_output_log" output="log" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<test test-name="test10" type="test_missing_pkg" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<test test-name="test10" pkg="test_missing_type" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<test test-name="test10" pkg="package" type="test_respawn_true" respawn="true" />
</launch>

View File

@@ -0,0 +1,7 @@
<launch>
<!-- retry NaN -->
<test test-name="test10" pkg="pkg" type="test" retry="foo" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<test test-name="test4" pkg="package" type="test_time_limit" time-limit="string" />
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<test test-name="test4" pkg="package" type="test_time_limit" time-limit="-1" />
</launch>

View File

@@ -0,0 +1,67 @@
<launch>
<test test-name="test4" pkg="package" type="test_time_limit_int_1" time-limit="1" />
<test test-name="test5" pkg="package" type="test_time_limit_float_10_1" time-limit="10.1" />
<!-- these are just cut and paste from nodes-valid with test-name attrs added and invalid examples removed -->
<test test-name="test1" pkg="package" type="test_base" />
<test test-name="test2" pkg="package" type="test_args" args="args test" />
<test test-name="test3" pkg="package" type="test_args_empty" args="" />
<test test-name="test6" pkg="package" type="test_machine" machine="machine_test" />
<test test-name="test7" pkg="package" type="test_ns1" ns="ns_test1" />
<test test-name="test8" pkg="package" type="test_ns2" ns="ns_test2/child2" />
<test test-name="test9" pkg="package" type="test_ns3" ns="ns_test3/child3/" />
<test test-name="test15" pkg="package" type="test_env">
<env name="env1" value="env1 value1" />
<env name="env2" value="env2 value2" />
</test>
<test test-name="test16" pkg="package" type="test_fake">
<!-- unrecognized tags are ok, but will print warnings to screen -->
<fake name="env2" value="env2 value2" />
</test>
<test test-name="test17" pkg="package" type="test_env_empty">
<env name="env1" value="" />
</test>
<test test-name="test18" name="test_param_name" pkg="package" type="test_param">
<param name="foo" value="bar" />
</test>
<test test-name="test19" name="test_param_name_ns" ns="ns_test" pkg="package" type="test_param">
<param name="foo2" value="bar2" />
</test>
<test test-name="test21" pkg="package" type="test_cwd_2" cwd="node" />
<test test-name="test22" pkg="package" type="test_test_rosparam_load" name="rosparam_load">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
</test>
<test test-name="test23" pkg="package" type="test_test_rosparam_dump" name="rosparam_dump">
<rosparam file="dump.yaml" command="dump" />
</test>
<test test-name="test24" pkg="package" type="test_test_rosparam_load_ns" name="load_ns">
<rosparam ns="subns" file="$(find roslaunch)/test/params.yaml" command="load" />
</test>
<test test-name="test25" pkg="package" type="test_test_rosparam_multi" name="rosparam_multi">
<rosparam file="$(find roslaunch)/test/params.yaml" command="load" />
<rosparam file="mdump.yaml" command="dump" />
<rosparam ns="msubns" file="$(find roslaunch)/test/params.yaml" command="load" />
</test>
<test test-name="test26" pkg="package" type="test_retry" retry="2" />
<!-- TODO remap args test -->
</launch>

View File

@@ -0,0 +1,4 @@
<launch>
<!-- allowed to have new tags, just warns -->
<newtag />
</launch>