File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
clearpath_tests/clearpath_tests Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 26
26
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
27
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
28
# POSSIBILITY OF SUCH DAMAGE.
29
- import threading
30
-
31
29
from clearpath_tests .test_node import ClearpathTestNode , ClearpathTestResult
32
30
33
31
from geometry_msgs .msg import TwistStamped
@@ -101,11 +99,9 @@ def run_test(self):
101
99
102
100
self .results = []
103
101
self .test_done = False
104
- ui_thread = threading .Thread (target = self .run_ui )
105
- ui_thread .start ()
106
- while not self .test_done :
107
- pass
108
- ui_thread .join ()
102
+
103
+ self .run_ui ()
104
+
109
105
return self .results
110
106
111
107
def cmd_vel_timer_callback (self ):
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def get_firmware_version(self):
185
185
def mcu_callback (status ):
186
186
self .mcu_status = status
187
187
188
- mcu_sub = self .node .create_subscription (
188
+ self . mcu_sub = self .node .create_subscription (
189
189
Status ,
190
190
f'/{ self .namespace } /platform/mcu/status' ,
191
191
mcu_callback ,
@@ -196,7 +196,6 @@ def mcu_callback(status):
196
196
timeout_duration = Duration (seconds = 10 )
197
197
while self .get_clock ().now () - start_at <= timeout_duration and self .mcu_status is None :
198
198
pass
199
- mcu_sub .destroy ()
200
199
201
200
if self .mcu_status is None :
202
201
return (None , None )
You can’t perform that action at this time.
0 commit comments