File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
launch_testing_ros/launch_testing_ros Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def method_3():
6363 topic_list = [('topic_1', String), ('topic_2', String)]
6464 wait_for_topics = WaitForTopics(topic_list, timeout=5.0, trigger=trigger_function)
6565 # The trigger function will be called inside the wait() method after the
66- # subscribers are created and before the publishers are connected.
66+ # subscribers are created and the publishers are connected.
6767 assert wait_for_topics.wait("Hello World!")
6868 print('Given topics are receiving messages !')
6969 wait_for_topics.shutdown()
@@ -108,9 +108,9 @@ def _prepare_ros_node(self):
108108
109109 def wait (self , * args , ** kwargs ):
110110 self .__ros_node .start_subscribers (self .topic_tuples )
111+ self .__ros_node .any_publisher_connected .wait (self .timeout )
111112 if self .trigger :
112113 self .trigger (self .__ros_node , * args , ** kwargs )
113- self .__ros_node .any_publisher_connected .wait (self .timeout )
114114 return self .__ros_node .msg_event_object .wait (self .timeout )
115115
116116 def shutdown (self ):
You can’t perform that action at this time.
0 commit comments