-
Notifications
You must be signed in to change notification settings - Fork 914
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TOPIC TOOLS: add tests for initial_topic param
- Loading branch information
1 parent
92dca54
commit 0c072a2
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<launch> | ||
<node pkg="rostopic" type="rostopic" name="rostopic_pub1" | ||
args="pub -r 10 input1 std_msgs/String input1"/> | ||
<node pkg="rostopic" type="rostopic" name="rostopic_pub2" | ||
args="pub -r 5 input2 std_msgs/String input2"/> | ||
|
||
<!-- Initial topic is __none --> | ||
<node pkg="topic_tools" type="mux" name="mux_initial_none" output="screen" | ||
args="output input1 input2"> | ||
<param name="initial_topic" value="__none" /> | ||
</node> | ||
|
||
<!-- Test that mux initially has no input because initial_topic param is set to __none --> | ||
<test test-name="mux_initial_topic_none_test" pkg="rostest" type="hztest"> | ||
<param name="topic" value="output"/> | ||
<param name="hz" value="0"/> | ||
<param name="hzerror" value="0"/> | ||
<param name="test_duration" value="1.0" /> | ||
</test> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<launch> | ||
<node pkg="rostopic" type="rostopic" name="rostopic_pub1" | ||
args="pub -r 10 input1 std_msgs/String input1"/> | ||
<node pkg="rostopic" type="rostopic" name="rostopic_pub2" | ||
args="pub -r 5 input2 std_msgs/String input2"/> | ||
|
||
<!-- Initial topic non default --> | ||
<node pkg="topic_tools" type="mux" name="mux_explicit" output="screen" | ||
args="output input1 input2"> | ||
<param name="initial_topic" value="input2" /> | ||
</node> | ||
|
||
<!-- Test that initialy mux chooses input2 as specified in param --> | ||
<test test-name="mux_hztest_explicit" pkg="rostest" type="hztest"> | ||
<param name="topic" value="output"/> | ||
<param name="hz" value="5.0"/> | ||
<param name="hzerror" value="0.5"/> | ||
<param name="test_duration" value="1.0" /> | ||
</test> | ||
|
||
</launch> |