autoverse-cli 0.8.0__py3-none-any.whl → 0.10.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/METADATA +1 -1
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/RECORD +11 -10
- avrs/app_version.py +1 -1
- avrs/avrs.py +3 -1
- avrs/launcher.py +29 -1
- avrs/launcher_util.py +4 -0
- avrs/requests/spawn_object.py +44 -0
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/LICENSE +0 -0
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/WHEEL +0 -0
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/entry_points.txt +0 -0
- {autoverse_cli-0.8.0.dist-info → autoverse_cli-0.10.0.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
avrs/app_version.py,sha256=
|
2
|
+
avrs/app_version.py,sha256=AOyanFCJzC352Nm64jJhV2ixpf1BYBVkZlsqrBeemjw,856
|
3
3
|
avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
|
4
|
-
avrs/avrs.py,sha256=
|
4
|
+
avrs/avrs.py,sha256=pRwNvYXIA7hREVv5kHIIRP5J6694Q4TSmpIznz1I_a8,2994
|
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
|
-
avrs/launcher.py,sha256=
|
9
|
-
avrs/launcher_util.py,sha256=
|
8
|
+
avrs/launcher.py,sha256=LkqaYMSCE12eB7xMkKF-TsLiCMymHgJlkCl0kgPk0Sc,8883
|
9
|
+
avrs/launcher_util.py,sha256=sO3k_z3A-HIQdJVkVXNXUAE_MGFwAYiZUqQBoFwOqew,5325
|
10
10
|
avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
|
11
11
|
avrs/simconfig_util.py,sha256=0LKYr6pS1CAHQq0esIWEEvhAa6-BB5-jQ9mnVBY5eq4,4839
|
12
12
|
avrs/tests.py,sha256=3JeYBjn0tRqHXERDROfzmYuW1KXeCcKur5Bw-EIegto,153
|
@@ -26,14 +26,15 @@ avrs/requests/reserve_mv_slot.py,sha256=ejB_RSZBXCpxY7B_2f66Or8twKdMI1gn9nEQgZ2Y
|
|
26
26
|
avrs/requests/reset_to_track.py,sha256=lSd2YavBxDV_hQMhVoi08_TpTFEq7G2MA18xosFYa1g,450
|
27
27
|
avrs/requests/restart.py,sha256=ih5mnWiU34q3-xhOth45CtOUXxKI0PoMDCnFJV0JbwE,415
|
28
28
|
avrs/requests/scenario_control.py,sha256=u-KQx-mdCm6IE_c88a6iEgWUsZZVOayxBo58Ocjg0ZI,1502
|
29
|
+
avrs/requests/spawn_object.py,sha256=RzTJprcyPpNIesu4s_GMuEYbHII-sopw1sDcbTDgvrY,1429
|
29
30
|
avrs/requests/teleport.py,sha256=fzBmlqaCuV6-R79co__Q8Wpu4ozmEXFh8EGZKs8l8Io,1140
|
30
31
|
avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,397
|
31
32
|
avrs/requests/vd.py,sha256=at6oUAGY2h0OxYU6MLOi1gnxyUn6i24vL9DUAj0L880,1600
|
32
33
|
avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
|
33
34
|
avrs/requests/vehicle_replay.py,sha256=nCAE21VNyKoeIjjXBGAihgOLO7zYHcu-HWvPZYxdQ2c,11099
|
34
|
-
autoverse_cli-0.
|
35
|
-
autoverse_cli-0.
|
36
|
-
autoverse_cli-0.
|
37
|
-
autoverse_cli-0.
|
38
|
-
autoverse_cli-0.
|
39
|
-
autoverse_cli-0.
|
35
|
+
autoverse_cli-0.10.0.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
|
36
|
+
autoverse_cli-0.10.0.dist-info/METADATA,sha256=ApGIsL2ajsYeIsjksGT7htWTZzIyk0K6lIUfEGN4XGs,3342
|
37
|
+
autoverse_cli-0.10.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
38
|
+
autoverse_cli-0.10.0.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
|
39
|
+
autoverse_cli-0.10.0.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
|
40
|
+
autoverse_cli-0.10.0.dist-info/RECORD,,
|
avrs/app_version.py
CHANGED
avrs/avrs.py
CHANGED
@@ -30,6 +30,7 @@ from avrs.requests.toggle_hud import *
|
|
30
30
|
from avrs.simconfig import *
|
31
31
|
from avrs.requests.get_object_config import *
|
32
32
|
from avrs.requests.misc import *
|
33
|
+
from avrs.requests.spawn_object import *
|
33
34
|
|
34
35
|
|
35
36
|
def get_version():
|
@@ -66,7 +67,7 @@ def main():
|
|
66
67
|
ResetToTrack(sps, cfg)
|
67
68
|
Teleport(sps, cfg)
|
68
69
|
#Npc(sps, cfg)
|
69
|
-
ReserveMvSlot(sps, cfg)
|
70
|
+
#ReserveMvSlot(sps, cfg)
|
70
71
|
Vd(sps, cfg)
|
71
72
|
AvrsConfigureVehicleInputRequest(sps, cfg)
|
72
73
|
LogPath(sps, cfg)
|
@@ -84,6 +85,7 @@ def main():
|
|
84
85
|
AvrsGetSimVersionRequest(sps, cfg)
|
85
86
|
AvrsPingRequest(sps, cfg)
|
86
87
|
AvrsConfigureSimLodRequest(sps, cfg)
|
88
|
+
AvrsSpawnObjectRequest(sps, cfg)
|
87
89
|
|
88
90
|
if os.environ.get('AVRS_WITH_DEMO', '0') == '1':
|
89
91
|
AvrsDemoRequest(sps, cfg)
|
avrs/launcher.py
CHANGED
@@ -32,7 +32,13 @@ class AvrsLauncher:
|
|
32
32
|
help='ask the build info api for the latest sim version')
|
33
33
|
get_latest_psr.set_defaults(func=self.get_latest_sim_version)
|
34
34
|
|
35
|
+
get_variants_psr = sps.add_parser(
|
36
|
+
'list-variants',
|
37
|
+
help='lists the available variants of the simulator that can be downloaded')
|
38
|
+
get_variants_psr.set_defaults(func=self.get_variants)
|
39
|
+
|
35
40
|
download_sim_psr = sps.add_parser('download-simulator', help='download the simulator')
|
41
|
+
download_sim_psr.add_argument('variant', help='which variant of the simulator to download (eg, \"a2rl-iron\" or \"a2rl-humble\")')
|
36
42
|
download_sim_psr.add_argument('install_path', help='path to install the simulator')
|
37
43
|
download_sim_psr.add_argument(
|
38
44
|
'--copy-saved-from',
|
@@ -80,6 +86,19 @@ class AvrsLauncher:
|
|
80
86
|
|
81
87
|
# query something to find out what versions of the sim we can download
|
82
88
|
|
89
|
+
def get_variants(self, args):
|
90
|
+
if 'license' not in self.cfg:
|
91
|
+
status += 'no license has been registered\n'
|
92
|
+
return
|
93
|
+
|
94
|
+
(dl_keys_ok, dl_keys_status, self.cfg) = try_get_launcher_download_keys(self.cfg)
|
95
|
+
if not dl_keys_ok:
|
96
|
+
print('Error Getting Launcher Download Keys: {}'.format(dl_keys_status))
|
97
|
+
return
|
98
|
+
save_cfg('avrs', self.cfg)
|
99
|
+
print('{}'.format(self.cfg['variants']))
|
100
|
+
|
101
|
+
|
83
102
|
def get_latest_sim_version(self, args):
|
84
103
|
# Validate status of download keys
|
85
104
|
dl_keys_ok, dl_keys_status = has_launcher_download_keys(self.cfg)
|
@@ -96,6 +115,15 @@ class AvrsLauncher:
|
|
96
115
|
|
97
116
|
def download_simulator(self, args):
|
98
117
|
|
118
|
+
# update variants before each download. also updates download keys
|
119
|
+
print('Updating Variants...')
|
120
|
+
self.get_variants(args)
|
121
|
+
|
122
|
+
if args.variant not in self.cfg['variants']:
|
123
|
+
print('\"{}\" is not a known variant, try one of: {}'.format(
|
124
|
+
args.variant, self.cfg['variants']))
|
125
|
+
return
|
126
|
+
|
99
127
|
file_path = args.install_path
|
100
128
|
if not os.path.exists(file_path):
|
101
129
|
print('Cannot Install Simulator at: {} (Invalid Path, Specify a Directory)'.format(file_path))
|
@@ -131,7 +159,7 @@ class AvrsLauncher:
|
|
131
159
|
|
132
160
|
package_zip_name = 'autoverse-linux-{}.zip'.format(latest_version)
|
133
161
|
package_name = 'autoverse-linux'
|
134
|
-
bucket_path = '
|
162
|
+
bucket_path = '{}/{}'.format(args.variant, package_zip_name)
|
135
163
|
dl_path = os.path.join(args.install_path, package_zip_name)
|
136
164
|
unzip_path = os.path.join(args.install_path, package_name)
|
137
165
|
|
avrs/launcher_util.py
CHANGED
@@ -58,6 +58,10 @@ def try_get_launcher_download_keys(cfg):
|
|
58
58
|
|
59
59
|
out_cfg['dlkey_id'] = dlinfo['dlkey_id']
|
60
60
|
out_cfg['dlkey'] = dlinfo['dlkey']
|
61
|
+
out_cfg['variants'] = dlinfo['variants']
|
62
|
+
|
63
|
+
# set available variants here as well
|
64
|
+
|
61
65
|
return (True, status, out_cfg)
|
62
66
|
|
63
67
|
def has_launcher_download_keys(cfg):
|
@@ -0,0 +1,44 @@
|
|
1
|
+
from avrs.requests.request import AvrsApiRequest
|
2
|
+
from argparse import RawTextHelpFormatter
|
3
|
+
|
4
|
+
SPAWN_OBJECT_HELP = '''
|
5
|
+
spawn an object with the specified configuration, optionally overriding its name
|
6
|
+
'''
|
7
|
+
|
8
|
+
class AvrsSpawnObjectRequest(AvrsApiRequest):
|
9
|
+
def __init__(self, parser, cfg):
|
10
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'SpawnObject', 0)
|
11
|
+
psr = parser.add_parser('spawn-object', help=SPAWN_OBJECT_HELP, formatter_class=RawTextHelpFormatter)
|
12
|
+
|
13
|
+
psr.add_argument(
|
14
|
+
'--object-type',
|
15
|
+
default='Eav24',
|
16
|
+
help='the type of object to spawn')
|
17
|
+
|
18
|
+
psr.add_argument(
|
19
|
+
'spec',
|
20
|
+
help='the specialization of the object (eg eav24_mv0)')
|
21
|
+
|
22
|
+
psr.add_argument(
|
23
|
+
'--name-override',
|
24
|
+
default='',
|
25
|
+
help='if not empty, will override the name given to the spawned object')
|
26
|
+
|
27
|
+
psr.add_argument(
|
28
|
+
'spawn_landmark',
|
29
|
+
help='what landmark to spawn at (eg MvStart0, MvStart1, MvStart2, or MvStart3)')
|
30
|
+
|
31
|
+
psr.set_defaults(func=self.send_request)
|
32
|
+
|
33
|
+
def get_request_body(self, args):
|
34
|
+
|
35
|
+
return {
|
36
|
+
'name': args.name_override,
|
37
|
+
'type': args.object_type,
|
38
|
+
'spec': args.spec,
|
39
|
+
'bUseStoredInitializer': True,
|
40
|
+
'location': {},
|
41
|
+
'rotation': {},
|
42
|
+
'landmark': args.spawn_landmark,
|
43
|
+
'payloads': []
|
44
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|