autoverse-cli 0.22.0__tar.gz → 0.23.2__tar.gz
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.22.0 → autoverse_cli-0.23.2}/PKG-INFO +1 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/pyproject.toml +1 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/PKG-INFO +1 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/app_version.py +1 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/launcher.py +1 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/launcher_util.py +50 -25
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/race_cloud_cfg_util.py +2 -2
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/simconfig_util.py +23 -1
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/LICENSE +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/README.md +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/setup.cfg +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/SOURCES.txt +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/requires.txt +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/top_level.txt +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/__init__.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/argparse_help.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/avrs.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/can_tool.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/can_tool_util.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/cfg.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/race_cloud.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/race_cloud_bridge_can.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/race_cloud_fwd_api.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/race_cloud_util.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/change_camera.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/code_booz.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/demo.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/dump_sim_config.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/environment.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/fault_injection.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/get_object_config.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/leaderboard.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/list_sim_objects.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/log_path.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/misc.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/move_to_landmark.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/npc.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/race_control.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/request.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/reset_to_track.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/rest_request.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/restart.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/scenario_control.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/spawn_object.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/teleport.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/toggle_hud.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/vd.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/vehicle_input.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/requests/vehicle_replay.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/simconfig.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/tests.py +0 -0
- {autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/avrs/util.py +0 -0
@@ -91,7 +91,7 @@ class AvrsLauncher:
|
|
91
91
|
|
92
92
|
def get_variants(self, args):
|
93
93
|
if 'license' not in self.cfg:
|
94
|
-
|
94
|
+
print('no license has been registered\n')
|
95
95
|
return
|
96
96
|
|
97
97
|
(dl_keys_ok, dl_keys_status, self.cfg) = try_get_launcher_download_keys(self.cfg)
|
@@ -51,18 +51,41 @@ def try_get_launcher_download_keys(cfg):
|
|
51
51
|
}).encode('utf-8')
|
52
52
|
connection.request('POST', '/test', body, headers)
|
53
53
|
response = connection.getresponse()
|
54
|
-
if response.status != 200:
|
55
|
-
status = 'response had status code {}'.format(response)
|
56
|
-
return (False, status, out_cfg)
|
57
|
-
dlinfo = json.loads(json.loads(response.read().decode('utf-8'))['body'])
|
58
|
-
|
59
|
-
out_cfg['dlkey_id'] = dlinfo['dlkey_id']
|
60
|
-
out_cfg['dlkey'] = dlinfo['dlkey']
|
61
|
-
out_cfg['variants'] = dlinfo['variants']
|
62
|
-
|
63
|
-
# set available variants here as well
|
64
54
|
|
65
|
-
|
55
|
+
api_ok = False
|
56
|
+
api_status = ""
|
57
|
+
|
58
|
+
if response.status == 200:
|
59
|
+
res_full = json.loads(response.read().decode('utf-8'))
|
60
|
+
status += "primary api response: {}".format(res_full)
|
61
|
+
dlinfo = json.loads(res_full['body'])
|
62
|
+
code = res_full['statusCode']
|
63
|
+
if code == 200:
|
64
|
+
api_ok = True
|
65
|
+
for k, v in dlinfo.items():
|
66
|
+
out_cfg[k] = v
|
67
|
+
|
68
|
+
if not api_ok:
|
69
|
+
#try other api
|
70
|
+
alt_api_url = 'uu6fmbvrhk.execute-api.us-east-1.amazonaws.com'
|
71
|
+
connection = http.client.HTTPSConnection(alt_api_url)
|
72
|
+
connection.request('POST', '/test/alt', body, headers)
|
73
|
+
response = connection.getresponse()
|
74
|
+
if response.status == 200:
|
75
|
+
res_full = json.loads(response.read().decode('utf-8'))
|
76
|
+
status += "alt api response: {}".format(res_full)
|
77
|
+
dlinfo = json.loads(res_full.get('body', "{}"))
|
78
|
+
code = res_full['statusCode']
|
79
|
+
if code == 200:
|
80
|
+
api_ok = True
|
81
|
+
for k, v in dlinfo.items():
|
82
|
+
out_cfg[k] = v
|
83
|
+
else:
|
84
|
+
status += "primary and alt returned non 200"
|
85
|
+
else:
|
86
|
+
status += "primary and alt returned non 200"
|
87
|
+
|
88
|
+
return (api_ok, status, out_cfg)
|
66
89
|
|
67
90
|
def has_launcher_download_keys(cfg):
|
68
91
|
"""
|
@@ -100,23 +123,25 @@ def get_launcher_build_info(cfg):
|
|
100
123
|
"""
|
101
124
|
Contacts API to discover the current latest build version
|
102
125
|
"""
|
103
|
-
status = ''
|
104
|
-
db_resource = boto3.resource(
|
105
|
-
'dynamodb',
|
106
|
-
'us-east-1',
|
107
|
-
aws_access_key_id=cfg['dlkey_id'],
|
108
|
-
aws_secret_access_key=cfg['dlkey'])
|
109
126
|
|
110
|
-
|
111
|
-
|
127
|
+
api_url = 'zn5boqqk60.execute-api.us-east-1.amazonaws.com'
|
128
|
+
connection = http.client.HTTPSConnection(api_url)
|
129
|
+
headers = {'Content-type': 'application/json'}
|
130
|
+
connection.request('POST', '/test', {}, headers)
|
131
|
+
response = connection.getresponse()
|
132
|
+
|
133
|
+
if response.status != 200:
|
134
|
+
return (False, "get build info api returned {}".format(response.status), "", "")
|
112
135
|
|
113
|
-
|
114
|
-
|
115
|
-
|
136
|
+
res_full = json.loads(response.read().decode('utf-8'))
|
137
|
+
info = json.loads(res_full['body'])
|
138
|
+
code = res_full['statusCode']
|
139
|
+
if code != 200:
|
140
|
+
return (False, "get build info api returned {}".format(code), "", "")
|
116
141
|
|
117
|
-
latest_version =
|
118
|
-
staged_version =
|
119
|
-
return (True,
|
142
|
+
latest_version = info['prod']
|
143
|
+
staged_version = info.get('staging', latest_version)
|
144
|
+
return (True, "ok", latest_version, staged_version)
|
120
145
|
|
121
146
|
def download_simulator_archive(cfg, source_path, target_path):
|
122
147
|
"""
|
@@ -13,7 +13,8 @@ from avrs.simconfig_util import *
|
|
13
13
|
# inside SimConfigFiles instead of doing it manually
|
14
14
|
EXPECTED_ENV_NAMES = [
|
15
15
|
"yas",
|
16
|
-
"adrome"
|
16
|
+
"adrome",
|
17
|
+
"suzuka"
|
17
18
|
]
|
18
19
|
|
19
20
|
def get_payload(cfg_object, payload_name):
|
@@ -24,7 +25,6 @@ def get_payload(cfg_object, payload_name):
|
|
24
25
|
|
25
26
|
def clear_autospawns():
|
26
27
|
logger = logging.getLogger('avrs')
|
27
|
-
# also need to edit the yas_marina_env.json to have autospawn for this config
|
28
28
|
sim_path = os.environ.get('AVRS_INSTALL_PATH',
|
29
29
|
os.path.join(os.environ['HOME'], 'autoverse-linux'))
|
30
30
|
sim_saved = os.path.join(sim_path, 'Linux', 'Autoverse', 'Saved')
|
@@ -1,15 +1,37 @@
|
|
1
1
|
import os
|
2
2
|
import json
|
3
|
+
import logging
|
3
4
|
|
4
5
|
class SimConfigFiles():
|
5
6
|
def __init__(self, saved_dir):
|
6
7
|
|
8
|
+
logger = logging.getLogger('avrs')
|
9
|
+
|
7
10
|
self.required_files = {
|
8
11
|
'main': os.path.join(saved_dir, 'simconfig.json'),
|
9
12
|
'eav24': os.path.join(saved_dir, 'Objects', 'Eav24_default.json'),
|
10
13
|
'yas': os.path.join(saved_dir, 'Environments', 'yasmarina_env.json'),
|
11
|
-
'adrome': os.path.join(saved_dir, 'Environments', 'autonodrome.json')
|
14
|
+
'adrome': os.path.join(saved_dir, 'Environments', 'autonodrome.json'),
|
15
|
+
'suzuka': os.path.join(saved_dir, "Environments", "Suzuka", "suzuka.json")
|
16
|
+
}
|
17
|
+
|
18
|
+
self.alt_paths = {
|
19
|
+
"main": [],
|
20
|
+
"eav24": [],
|
21
|
+
"yas": [os.path.join(saved_dir, 'Environments', "YasMarina", 'yasmarina_env.json')],
|
22
|
+
"adrome": [os.path.join(saved_dir, 'Environments', "Autonodrome", 'autonodrome.json')],
|
23
|
+
"suzuka": [os.path.join(saved_dir, "Environments", "Suzuka", "suzuka.json")]
|
12
24
|
}
|
25
|
+
|
26
|
+
# support alternative paths for new directory structure, but retain backward compat
|
27
|
+
for k, v in self.required_files.items():
|
28
|
+
if not os.path.exists(v):
|
29
|
+
for alt_path in self.alt_paths.get(k, []):
|
30
|
+
if os.path.exists(alt_path):
|
31
|
+
logger.info("could not find file under {} but found under alt path {}".format(
|
32
|
+
v, alt_path))
|
33
|
+
self.required_files[k] = alt_path
|
34
|
+
|
13
35
|
self.files = {}
|
14
36
|
|
15
37
|
ok, status = self.validate()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autoverse_cli-0.22.0 → autoverse_cli-0.23.2}/src/autoverse_cli.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|