autoverse-cli 0.16.2__py3-none-any.whl → 0.16.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/METADATA +1 -1
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/RECORD +11 -11
- avrs/app_version.py +1 -1
- avrs/avrs.py +1 -0
- avrs/race_cloud.py +6 -3
- avrs/race_cloud_util.py +21 -8
- avrs/requests/misc.py +10 -0
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/LICENSE +0 -0
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/WHEEL +0 -0
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/entry_points.txt +0 -0
- {autoverse_cli-0.16.2.dist-info → autoverse_cli-0.16.4.dist-info}/top_level.txt +0 -0
@@ -1,17 +1,17 @@
|
|
1
1
|
avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
avrs/app_version.py,sha256=
|
2
|
+
avrs/app_version.py,sha256=TCx0wneM1rI5cI2G875TCRlLz6sDG68_IiDyp7wySi0,856
|
3
3
|
avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
|
4
|
-
avrs/avrs.py,sha256=
|
4
|
+
avrs/avrs.py,sha256=DtiZYOpQ5KzbQmf4oigQ34VGefaOkTRpATDeAGkd6UQ,4657
|
5
5
|
avrs/can_tool.py,sha256=IBoctKobBJ3wCq4ZdtuXuXH4AMEUxazCfYT6YP0Luw8,7161
|
6
6
|
avrs/can_tool_util.py,sha256=G3q21dTGMLc09SDq_RieoW7kSn-kXPkXxPDjavPh4hQ,7710
|
7
7
|
avrs/cfg.py,sha256=kMn08Z4Ms1PAu2-U1QI8weEJeIVEppP4A4_tFfwnjtg,2924
|
8
8
|
avrs/launcher.py,sha256=kk1lyHHLgFZ4zsFfa_zV5f1kYbUODT6wEILJ8TZ16rQ,9353
|
9
9
|
avrs/launcher_util.py,sha256=sO3k_z3A-HIQdJVkVXNXUAE_MGFwAYiZUqQBoFwOqew,5325
|
10
|
-
avrs/race_cloud.py,sha256=
|
10
|
+
avrs/race_cloud.py,sha256=W6qdevbEeu2k-qaUmvx4cQTbIIcd6qBzX-T-9rqmbgw,20124
|
11
11
|
avrs/race_cloud_bridge_can.py,sha256=QXdJxGwkdL9ZNLs4EquHEmF1fU3P8rsjc4uekFPHlw8,2349
|
12
12
|
avrs/race_cloud_cfg_util.py,sha256=H3MLxkb-PBwFVXdA5IBGzWGjLeD-uBvPqIgkh7RGjfo,7214
|
13
13
|
avrs/race_cloud_fwd_api.py,sha256=HuLE5kfmzVq08aP3tlEh3f8WNjGL5N3K5EbXg9uQomo,1506
|
14
|
-
avrs/race_cloud_util.py,sha256=
|
14
|
+
avrs/race_cloud_util.py,sha256=WwhmqxKIQJMxf4L4ReAJrW1Reu1A8tLfmYeEwTZDl-k,13184
|
15
15
|
avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
|
16
16
|
avrs/simconfig_util.py,sha256=1RmnmhK5C4HlCicTQeqn-1ORz3Xrku_QMt1Fqr9XjZs,4839
|
17
17
|
avrs/tests.py,sha256=3JeYBjn0tRqHXERDROfzmYuW1KXeCcKur5Bw-EIegto,153
|
@@ -25,7 +25,7 @@ avrs/requests/fault_injection.py,sha256=EkpjPCx-UtrNbAR_vQS1zaGKN49UDCyYOoVcdlP1
|
|
25
25
|
avrs/requests/get_object_config.py,sha256=Mkwp32lfskQERsqfmAgHi4vf4C0hfjg6Ru8UjyMt3cw,654
|
26
26
|
avrs/requests/list_sim_objects.py,sha256=YWpqHdCHijerPxI5606_KjeFvezcLFN33wO4YOr9G3U,977
|
27
27
|
avrs/requests/log_path.py,sha256=Ur24C9VqPVx78MfpicgQu2uOEe-0dXbGoWF_7dzMtZE,1326
|
28
|
-
avrs/requests/misc.py,sha256=
|
28
|
+
avrs/requests/misc.py,sha256=995yXxzVS35X3CLqm4OtkJhWvFrqEhV1cPwbWxlFeHs,1779
|
29
29
|
avrs/requests/move_to_landmark.py,sha256=cLRBKu9XEDsmCoftBJ8JwoBLqzb0IZsxFMBnus4T-kc,702
|
30
30
|
avrs/requests/npc.py,sha256=Y_WovbcLomCCcOLAMMO_DHZtc1crAzWo97qEIGS3SvU,9691
|
31
31
|
avrs/requests/request.py,sha256=uUAndVZPbTQgbiXqrd4S3l3TQ0J_3STBtghEFlVr5GA,2058
|
@@ -38,9 +38,9 @@ avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,3
|
|
38
38
|
avrs/requests/vd.py,sha256=gdt5XCdCCVdECL3qt8y-PKDrlArjeY_lxtT4VpZmAJo,1804
|
39
39
|
avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
|
40
40
|
avrs/requests/vehicle_replay.py,sha256=nCAE21VNyKoeIjjXBGAihgOLO7zYHcu-HWvPZYxdQ2c,11099
|
41
|
-
autoverse_cli-0.16.
|
42
|
-
autoverse_cli-0.16.
|
43
|
-
autoverse_cli-0.16.
|
44
|
-
autoverse_cli-0.16.
|
45
|
-
autoverse_cli-0.16.
|
46
|
-
autoverse_cli-0.16.
|
41
|
+
autoverse_cli-0.16.4.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
|
42
|
+
autoverse_cli-0.16.4.dist-info/METADATA,sha256=WTipNzL49juTJHXzDeJX7xZ_phmV4IOVbY2uRtFkI3I,3342
|
43
|
+
autoverse_cli-0.16.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
44
|
+
autoverse_cli-0.16.4.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
|
45
|
+
autoverse_cli-0.16.4.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
|
46
|
+
autoverse_cli-0.16.4.dist-info/RECORD,,
|
avrs/app_version.py
CHANGED
avrs/avrs.py
CHANGED
@@ -125,6 +125,7 @@ def main():
|
|
125
125
|
AvrsToggleHudRequest(sps, cfg)
|
126
126
|
AvrsGetObjectConfigRequest(sps, cfg)
|
127
127
|
AvrsGetSimVersionRequest(sps, cfg)
|
128
|
+
AvrsGetExitSimRequest(sps, cfg)
|
128
129
|
AvrsPingRequest(sps, cfg)
|
129
130
|
AvrsConfigureSimLodRequest(sps, cfg)
|
130
131
|
AvrsSpawnObjectRequest(sps, cfg)
|
avrs/race_cloud.py
CHANGED
@@ -331,9 +331,12 @@ class AvrsRaceCloud(AvrsApiRequest):
|
|
331
331
|
logger.info('enabling qos for slot {} with ip {}'.format(slot, args.ip))
|
332
332
|
enable_peer_qos(slot, args.ip)
|
333
333
|
logger.info('connecting vcans for incoming connection')
|
334
|
-
connect_peer_vcan(slot, args.ip, 0)
|
335
|
-
|
336
|
-
connect_peer_vcan(slot, args.ip,
|
334
|
+
out = connect_peer_vcan(slot, args.ip, 0)
|
335
|
+
logger.info('connected first vcan result: {} {}'.format(out.out, out.err))
|
336
|
+
out = connect_peer_vcan(slot, args.ip, 1)
|
337
|
+
logger.info('connected second vcan result: {} {}'.format(out.out, out.err))
|
338
|
+
out = connect_peer_vcan(slot, args.ip, 2)
|
339
|
+
logger.info('connected second vcan result: {} {}'.format(out.out, out.err))
|
337
340
|
|
338
341
|
# go ahead and restart forwarding script here
|
339
342
|
# stop it if its already running
|
avrs/race_cloud_util.py
CHANGED
@@ -27,6 +27,10 @@ BASH_KILL_PROCESS_SCRIPT = '''
|
|
27
27
|
done
|
28
28
|
'''
|
29
29
|
|
30
|
+
BASH_KILL_BY_LAUNCH_SCRIPT = '''
|
31
|
+
ps -x | grep "{launch_phrase}" | awk '{{ print $1 }}' | xargs -L1 kill
|
32
|
+
'''
|
33
|
+
|
30
34
|
DEFAULT_RMW_QOS = '''
|
31
35
|
<?xml version="1.0" encoding="UTF-8" ?>
|
32
36
|
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
|
@@ -94,10 +98,10 @@ DISABLE_PEER_QOS_SCRIPT = '''
|
|
94
98
|
sed -i -E "s,(<Peer address=')(.+)('/>)<!--(PEER$PEER_ID-->),<!--\\1PEER$PEER_ID\\3\\4,g" $CYCLONE_PATH
|
95
99
|
|
96
100
|
VCAN_NAME=vcan$PEER_ID
|
97
|
-
if [[ -e $VCAN_NAME.
|
98
|
-
echo "stopping existing cannelloni connection with pid $(cat $VCAN_NAME.
|
99
|
-
kill $(cat $VCAN_NAME.
|
100
|
-
rm $VCAN_NAME.
|
101
|
+
if [[ -e $VCAN_NAME.vcanlock ]]; then
|
102
|
+
echo "stopping existing cannelloni connection with pid $(cat $VCAN_NAME.vcanlock)"
|
103
|
+
kill $(cat $VCAN_NAME.vcanlock)
|
104
|
+
rm $VCAN_NAME.vcanlock
|
101
105
|
fi
|
102
106
|
'''
|
103
107
|
|
@@ -120,8 +124,8 @@ CONNECT_PEER_VCAN_SCRIPT = '''
|
|
120
124
|
REMOTE_PORT={remote_port}
|
121
125
|
LOCAL_PORT={local_port}
|
122
126
|
VCAN_NAME={vcan_name}
|
123
|
-
LOCK_FILE
|
124
|
-
LOG_FILE="$HOME/.$VCAN_NAME.
|
127
|
+
LOCK_FILE="$HOME/.$VCAN_NAME.vcanlock"
|
128
|
+
LOG_FILE="$HOME/.$VCAN_NAME.vcanlog"
|
125
129
|
if [[ -z $VCAN_NAME ]]; then
|
126
130
|
VCAN_NAME=vcan$PEER_ID
|
127
131
|
fi
|
@@ -177,6 +181,10 @@ def bash_kill_process(pname):
|
|
177
181
|
return run_process(['bash', '-c',
|
178
182
|
BASH_KILL_PROCESS_SCRIPT.format(**{'pname': pname})])
|
179
183
|
|
184
|
+
def bash_kill_process_by_launch_command(launch_command):
|
185
|
+
return run_process(['bash', '-c',
|
186
|
+
BASH_KILL_BY_LAUNCH_SCRIPT.format(**{'launch_phrase': launch_command})])
|
187
|
+
|
180
188
|
# start an exectuable in the background, sending output to a file
|
181
189
|
# stored at root with its name
|
182
190
|
def start_exe(exe_path):
|
@@ -302,11 +310,16 @@ def get_local_instance_ip():
|
|
302
310
|
return '127.0.0.1'
|
303
311
|
|
304
312
|
def reset_race_cloud_connection():
|
313
|
+
logger = logging.getLogger('avrs')
|
314
|
+
logger.info('resetting connection')
|
305
315
|
reset_rmw_qos()
|
306
316
|
reset_rmw_cyclone_qos()
|
317
|
+
logger.info('removing vcanlog and vcanlock files')
|
307
318
|
run_process(['bash', '-c', 'rm ~/.simslot*']) # remove slot reservations
|
308
|
-
run_process(['bash', '-c', 'rm
|
309
|
-
|
319
|
+
run_process(['bash', '-c', 'rm ~/.*.vcanlog*']) # remove slot reservations
|
320
|
+
run_process(['bash', '-c', 'rm ~/.*.vcanlock']) # remove lock files
|
321
|
+
logger.info('stopping race-cloud bridge-can')
|
322
|
+
bash_kill_process_by_launch_command('avrs race-cloud bridge-can')
|
310
323
|
|
311
324
|
def try_get_open_slot(team_name, ip):
|
312
325
|
logger = logging.getLogger('avrs')
|
avrs/requests/misc.py
CHANGED
@@ -10,6 +10,16 @@ class AvrsGetSimVersionRequest(AvrsApiRequest):
|
|
10
10
|
return {
|
11
11
|
}
|
12
12
|
|
13
|
+
class AvrsGetExitSimRequest(AvrsApiRequest):
|
14
|
+
def __init__(self, parser, cfg):
|
15
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'ExitSim', 0)
|
16
|
+
psr = parser.add_parser('exit-sim', help='exit the currently running simulator')
|
17
|
+
psr.set_defaults(func=self.send_request)
|
18
|
+
|
19
|
+
def get_request_body(self, args):
|
20
|
+
return {
|
21
|
+
}
|
22
|
+
|
13
23
|
class AvrsPingRequest(AvrsApiRequest):
|
14
24
|
def __init__(self, parser, cfg):
|
15
25
|
AvrsApiRequest.__init__(self, parser, cfg, 'GetVersion', 0)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|