-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_table
executable file
·33 lines (30 loc) · 1.33 KB
/
make_table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/env python3
import subprocess
import time
executor_choices = ['single', 'multi']
method_choices = ['lt', 'wft_callback', 'wft_wait_for', 'wft_get']
send_tf_choices = ['before', 'during', 'after']
request_time_choices = ['current', 'newest']
for executor in executor_choices:
for method in method_choices:
for request_time in request_time_choices:
for send_first_tf in send_tf_choices:
for send_second_tf in send_tf_choices:
arguments = [ f'executor:={executor}'
, f'method:={method}'
, f'request_time:={request_time}'
, f'send_first_tf:={send_first_tf}'
, f'send_second_tf:={send_second_tf}'
]
lines = ['ros2 launch wait_for_transform wait_for_transform.launch.xml'] + arguments
print('\033[92m' + ' \\\n\t'.join(lines) + '\033[0m')
# Give the user a chance to read the arguments
time.sleep(1.0)
args = ['ros2', 'launch', 'wait_for_transform', 'wait_for_transform.launch.xml'] + arguments
try:
subprocess.run(args, timeout=8)
except subprocess.TimeoutExpired as e:
pass
finally:
print("Check that grandchild processes are dead, then press Enter for next combination")
input()