autoverse-cli 0.15.0__py3-none-any.whl → 0.15.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: autoverse-cli
3
- Version: 0.15.0
3
+ Version: 0.15.2
4
4
  Summary: The Autoverse CLI
5
5
  Author-email: Dan Kamrath <dan.kamrath@autonomalabs.com>
6
6
  License: # End-User License Agreement (EULA) of the Autonoma AutoVerse CLI
@@ -1,5 +1,5 @@
1
1
  avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- avrs/app_version.py,sha256=59Na2yuqMGePrUbQYBadd_1kANo4tl9ULmjNC8g2WQg,856
2
+ avrs/app_version.py,sha256=zch6t3zwjlpQ6D4xpDRHK_MIF80vDkncCaUJg1iZbJs,856
3
3
  avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
4
4
  avrs/avrs.py,sha256=bGF35a72MZU41OVWnFHmchqmgKXBKh9djokzGA_4pL4,4621
5
5
  avrs/can_tool.py,sha256=IBoctKobBJ3wCq4ZdtuXuXH4AMEUxazCfYT6YP0Luw8,7161
@@ -7,10 +7,10 @@ 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=XwwSfrSMaCxOaBSmxqDeC7Jlg5mRZnVBUo7cFFaKcso,18863
11
- avrs/race_cloud_cfg_util.py,sha256=IV_bKylgfAj5g8aRf817pP-0x55A_jIX-rZYgRJlzxQ,6059
10
+ avrs/race_cloud.py,sha256=hJRqinF6bRogJYYprIXKx6txFGWT6fqEHIhHAryc_gw,18961
11
+ avrs/race_cloud_cfg_util.py,sha256=PlHhW0PWhxRIA1X9CPMu9HqFcfu14--JwLR6DYr7qX0,6061
12
12
  avrs/race_cloud_fwd_api.py,sha256=HuLE5kfmzVq08aP3tlEh3f8WNjGL5N3K5EbXg9uQomo,1506
13
- avrs/race_cloud_util.py,sha256=ykTFSk9AVDEFAAS7wXBz-By4RnEp_kJKRvvACruv8Sk,10709
13
+ avrs/race_cloud_util.py,sha256=AW2GMvM9DOWJ5cdahlbWZz9ltwEh-2fNeFenKVUGcxw,10708
14
14
  avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
15
15
  avrs/simconfig_util.py,sha256=1RmnmhK5C4HlCicTQeqn-1ORz3Xrku_QMt1Fqr9XjZs,4839
16
16
  avrs/tests.py,sha256=3JeYBjn0tRqHXERDROfzmYuW1KXeCcKur5Bw-EIegto,153
@@ -37,9 +37,9 @@ avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,3
37
37
  avrs/requests/vd.py,sha256=gdt5XCdCCVdECL3qt8y-PKDrlArjeY_lxtT4VpZmAJo,1804
38
38
  avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
39
39
  avrs/requests/vehicle_replay.py,sha256=nCAE21VNyKoeIjjXBGAihgOLO7zYHcu-HWvPZYxdQ2c,11099
40
- autoverse_cli-0.15.0.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
- autoverse_cli-0.15.0.dist-info/METADATA,sha256=eD4w4cQQ9WKA4CkW-_17sgEQkzK8ibJeOdaPZ4Q5Avk,3342
42
- autoverse_cli-0.15.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
- autoverse_cli-0.15.0.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
- autoverse_cli-0.15.0.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
- autoverse_cli-0.15.0.dist-info/RECORD,,
40
+ autoverse_cli-0.15.2.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
+ autoverse_cli-0.15.2.dist-info/METADATA,sha256=5_Hn0sXeQ81j-o9LhhMCXd_5KpcnrVUu1gaF4tWPaGM,3342
42
+ autoverse_cli-0.15.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
+ autoverse_cli-0.15.2.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
+ autoverse_cli-0.15.2.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
+ autoverse_cli-0.15.2.dist-info/RECORD,,
avrs/app_version.py CHANGED
@@ -2,7 +2,7 @@ import http.client
2
2
  import json
3
3
 
4
4
  def get_app_version():
5
- return '0.15.0'
5
+ return '0.15.2'
6
6
 
7
7
  def check_app_is_latest():
8
8
  pass
avrs/race_cloud.py CHANGED
@@ -187,6 +187,11 @@ class AvrsRaceCloud(AvrsApiRequest):
187
187
  print('error reading config file: {}'.format(vcfg_data))
188
188
  return
189
189
 
190
+ print('creating vcan interfaces found in config locally: {}, {}, {} (if they do not exist)'.format(
191
+ bsu_vcan, kistler_vcan, badenia_vcan))
192
+
193
+ setup_vcans(bsu_vcan, kistler_vcan, badenia_vcan)
194
+
190
195
  vcan_ok = True
191
196
  if not check_vcan_exists(bsu_vcan) and not args.no_check_cans:
192
197
  print('bsu vcan {} does not appear to exist'.format(bsu_vcan))
@@ -208,7 +213,7 @@ class AvrsRaceCloud(AvrsApiRequest):
208
213
  'team_name': args.team_name,
209
214
  'sim_id_override': args.instance_id,
210
215
  'ensure_instance_is_running': False,
211
- 'should_restart_sim_program': args.no_restart_sim,
216
+ 'should_restart_sim_program': not args.no_restart_sim,
212
217
  'config_data': vcfg_data
213
218
  }
214
219
 
@@ -243,11 +248,6 @@ class AvrsRaceCloud(AvrsApiRequest):
243
248
  # enable first peer since this is on a client (only will ever have 1, the sim)
244
249
  enable_peer_qos(sim_slot, sim_ip)
245
250
 
246
- print('creating vcan interfaces found in config locally: {}, {}, {} (if they do not exist)'.format(
247
- bsu_vcan, kistler_vcan, badenia_vcan))
248
-
249
- setup_vcans(bsu_vcan, kistler_vcan, badenia_vcan)
250
-
251
251
  # will need to get port from received slot id to connect peer vcans
252
252
  connect_peer_vcan(sim_slot, sim_ip, 0, bsu_vcan)
253
253
  connect_peer_vcan(sim_slot, sim_ip, 1, kistler_vcan)
@@ -339,7 +339,7 @@ class AvrsRaceCloud(AvrsApiRequest):
339
339
  start_result = start_fwd_api(30333, 30313)
340
340
  logger.info('started fwd-api: {}'.format(start_result))
341
341
 
342
- if args.should_restart_sim_program:
342
+ if args.restart:
343
343
  logger.info('restarting sim program for new connection')
344
344
  print('stopping sim program on sim instance')
345
345
  bash_kill_process('Autoverse')
@@ -348,6 +348,8 @@ class AvrsRaceCloud(AvrsApiRequest):
348
348
  start_exe(exe_path)
349
349
  extra_msg += '\n' if len(extra_msg) > 0 else ''
350
350
  extra_msg += 'automatically restarting sim program on sim instance'
351
+ else:
352
+ logger.info('--restart not specified, not restarting sim program for this connection')
351
353
 
352
354
  print(json.dumps(response)) # print this so that when called from the ssh lambda we can get the result
353
355
 
@@ -28,7 +28,7 @@ def clear_autospawns():
28
28
  return
29
29
 
30
30
  # also remove all configs from Objects dir
31
- files = glob.glob(os.path.join(sim_saved, 'Objects'))
31
+ files = glob.glob(os.path.join(sim_saved, 'Objects/*'))
32
32
  for f in files:
33
33
  logger.info('removing object config: {}'.format(f))
34
34
  os.remove(f)
avrs/race_cloud_util.py CHANGED
@@ -119,7 +119,7 @@ CREATE_VCANS_SCRIPT = '''
119
119
  sudo ip link add name "{a}" type vcan
120
120
  sudo ip link set dev "{a}" up
121
121
  sudo ip link add name "{b}" type vcan
122
- sudo ip link set dev "{b}"" up
122
+ sudo ip link set dev "{b}" up
123
123
  sudo ip link add name "{c}" type vcan
124
124
  sudo ip link set dev "{c}" up
125
125
  '''
@@ -203,8 +203,8 @@ def setup_vcans(vcan0, vcan1, vcan2):
203
203
  'b': vcan1,
204
204
  'c': vcan2
205
205
  }
206
- pres = run_process(['bash'], '-c',
207
- CREATE_VCANS_SCRIPT.format(**pargs))
206
+ pres = run_process(['bash', '-c',
207
+ CREATE_VCANS_SCRIPT.format(**pargs)])
208
208
  return pres.out + ' ' + pres.err
209
209
 
210
210
  def start_fwd_api(source_port, target_port):