autoverse-cli 0.5.0__tar.gz → 0.6.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/PKG-INFO +1 -1
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/pyproject.toml +1 -1
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/PKG-INFO +1 -1
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/SOURCES.txt +2 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/app_version.py +1 -1
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/avrs.py +4 -0
- autoverse_cli-0.6.0/src/avrs/requests/change_camera.py +11 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/fault_injection.py +31 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/request.py +1 -1
- autoverse_cli-0.6.0/src/avrs/requests/toggle_hud.py +11 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/vehicle_replay.py +46 -2
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/LICENSE +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/README.md +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/setup.cfg +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/requires.txt +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/autoverse_cli.egg-info/top_level.txt +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/__init__.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/argparse_help.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/can_tool.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/can_tool_util.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/cfg.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/launcher.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/launcher_util.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/code_booz.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/demo.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/environment.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/list_sim_objects.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/log_path.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/move_to_landmark.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/npc.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/reserve_mv_slot.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/reset_to_track.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/restart.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/scenario_control.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/teleport.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/vd.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/requests/vehicle_input.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/simconfig.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/simconfig_util.py +0 -0
- {autoverse_cli-0.5.0 → autoverse_cli-0.6.0}/src/avrs/tests.py +0 -0
@@ -19,6 +19,7 @@ src/avrs/launcher_util.py
|
|
19
19
|
src/avrs/simconfig.py
|
20
20
|
src/avrs/simconfig_util.py
|
21
21
|
src/avrs/tests.py
|
22
|
+
src/avrs/requests/change_camera.py
|
22
23
|
src/avrs/requests/code_booz.py
|
23
24
|
src/avrs/requests/demo.py
|
24
25
|
src/avrs/requests/environment.py
|
@@ -33,6 +34,7 @@ src/avrs/requests/reset_to_track.py
|
|
33
34
|
src/avrs/requests/restart.py
|
34
35
|
src/avrs/requests/scenario_control.py
|
35
36
|
src/avrs/requests/teleport.py
|
37
|
+
src/avrs/requests/toggle_hud.py
|
36
38
|
src/avrs/requests/vd.py
|
37
39
|
src/avrs/requests/vehicle_input.py
|
38
40
|
src/avrs/requests/vehicle_replay.py
|
@@ -25,6 +25,8 @@ from avrs.requests.vehicle_replay import *
|
|
25
25
|
from avrs.requests.scenario_control import *
|
26
26
|
from avrs.requests.list_sim_objects import *
|
27
27
|
from avrs.requests.fault_injection import *
|
28
|
+
from avrs.requests.change_camera import *
|
29
|
+
from avrs.requests.toggle_hud import *
|
28
30
|
from avrs.simconfig import *
|
29
31
|
|
30
32
|
|
@@ -74,6 +76,8 @@ def main():
|
|
74
76
|
AvrsScenarioRequests(sps, cfg)
|
75
77
|
AvrsListSimObjectsRequest(sps, cfg)
|
76
78
|
AvrsFaultInjectionRequests(sps, cfg)
|
79
|
+
AvrsChangeCameraRequest(sps, cfg)
|
80
|
+
AvrsToggleHudRequest(sps, cfg)
|
77
81
|
|
78
82
|
if os.environ.get('AVRS_WITH_DEMO', '0') == '1':
|
79
83
|
AvrsDemoRequest(sps, cfg)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from avrs.requests.request import AvrsApiRequest
|
2
|
+
|
3
|
+
class AvrsChangeCameraRequest(AvrsApiRequest):
|
4
|
+
def __init__(self, parser, cfg):
|
5
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'ChangeCamera', '')
|
6
|
+
psr = parser.add_parser('change-camera', help='changes the active camera on an object')
|
7
|
+
psr.set_defaults(func=self.send_request)
|
8
|
+
|
9
|
+
def get_request_body(self, args):
|
10
|
+
return {
|
11
|
+
}
|
@@ -9,6 +9,7 @@ class AvrsFaultInjectionRequests():
|
|
9
9
|
AvrsGnssFaultRequest(sps, cfg)
|
10
10
|
AvrsLidarFaultRequest(sps, cfg)
|
11
11
|
AvrsImuFaultRequest(sps, cfg)
|
12
|
+
AvrsCanFaultRequest(sps, cfg)
|
12
13
|
|
13
14
|
def add_base_injection_args(psr):
|
14
15
|
|
@@ -152,4 +153,34 @@ class AvrsLidarFaultRequest(AvrsApiRequest):
|
|
152
153
|
'JsonBody': {
|
153
154
|
'pointDensityReduction': args.point_density_reduction
|
154
155
|
}
|
156
|
+
}
|
157
|
+
|
158
|
+
class AvrsCanFaultRequest(AvrsApiRequest):
|
159
|
+
def __init__(self, parser, cfg):
|
160
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'FaultInjection', '')
|
161
|
+
|
162
|
+
psr = parser.add_parser(
|
163
|
+
'can',
|
164
|
+
help='inject a can',
|
165
|
+
formatter_class=RawTextHelpFormatter)
|
166
|
+
|
167
|
+
psr.add_argument(
|
168
|
+
'can_type',
|
169
|
+
choices = ['bsu', 'badenia', 'kistler', 'all'],
|
170
|
+
help='what type of the can interface you wish to apply the fault to')
|
171
|
+
|
172
|
+
add_base_injection_args(psr)
|
173
|
+
psr.set_defaults(func=self.send_request)
|
174
|
+
|
175
|
+
def get_request_body(self, args):
|
176
|
+
self.target_object_id = args.target
|
177
|
+
self.verbose = args.verbose
|
178
|
+
return {
|
179
|
+
'faultType': 'CanFault',
|
180
|
+
'duration': args.duration,
|
181
|
+
'bIsDropout': True,
|
182
|
+
'bIsFreeze': args.freeze,
|
183
|
+
'JsonBody': {
|
184
|
+
'canType': args.can_type
|
185
|
+
}
|
155
186
|
}
|
@@ -14,7 +14,7 @@ class AvrsApiRequest:
|
|
14
14
|
self.verbose = False
|
15
15
|
|
16
16
|
def get_request(self, args):
|
17
|
-
body =
|
17
|
+
body = self.get_request_body(args)
|
18
18
|
return {
|
19
19
|
'TargetObjectId': self.target_object_id,
|
20
20
|
'RequestType': self.request_type,
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from avrs.requests.request import AvrsApiRequest
|
2
|
+
|
3
|
+
class AvrsToggleHudRequest(AvrsApiRequest):
|
4
|
+
def __init__(self, parser, cfg):
|
5
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'ToggleHud', 'Ego')
|
6
|
+
psr = parser.add_parser('toggle-hud', help='toggles the HUD on or off')
|
7
|
+
psr.set_defaults(func=self.send_request)
|
8
|
+
|
9
|
+
def get_request_body(self, args):
|
10
|
+
return {
|
11
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import random
|
1
2
|
from avrs.requests.request import AvrsApiRequest
|
2
3
|
from argparse import RawDescriptionHelpFormatter
|
3
4
|
from argparse import RawTextHelpFormatter
|
@@ -9,6 +10,7 @@ class AvrsVehicleReplayRequests():
|
|
9
10
|
SpawnReplayVehicle(sps, cfg)
|
10
11
|
StartVehicleReplayRecording(sps, cfg)
|
11
12
|
StopVehicleReplayRecording(sps, cfg)
|
13
|
+
DespawnReplayVehicle(sps, cfg)
|
12
14
|
|
13
15
|
class SpawnReplayVehicle(AvrsApiRequest):
|
14
16
|
def __init__(self, parser, cfg):
|
@@ -23,7 +25,7 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
23
25
|
|
24
26
|
psr.add_argument(
|
25
27
|
'--name',
|
26
|
-
default='
|
28
|
+
default='',
|
27
29
|
help='name of the replay vehicle to spawn')
|
28
30
|
|
29
31
|
psr.add_argument(
|
@@ -71,6 +73,12 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
71
73
|
action='store_true',
|
72
74
|
help='if set, the npc will begin moving immediately')
|
73
75
|
|
76
|
+
psr.add_argument(
|
77
|
+
'--count',
|
78
|
+
type=int,
|
79
|
+
default=1,
|
80
|
+
help='the number of npcs to spawn (only works with automatic name)')
|
81
|
+
|
74
82
|
# psr.add_argument(
|
75
83
|
# '--enable-sensors',
|
76
84
|
# type=bool,
|
@@ -84,6 +92,9 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
84
92
|
|
85
93
|
psr.set_defaults(func=self.send_request)
|
86
94
|
|
95
|
+
def send_request(self, args):
|
96
|
+
for i in range(args.count):
|
97
|
+
self.send_http_request(args)
|
87
98
|
|
88
99
|
def get_request_body(self, args):
|
89
100
|
|
@@ -139,8 +150,13 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
139
150
|
}
|
140
151
|
})
|
141
152
|
|
153
|
+
# Create time based name if not specified
|
154
|
+
name = args.name
|
155
|
+
if name == '':
|
156
|
+
name = 'npc_{}'.format(random.randint(0, 100000))
|
157
|
+
|
142
158
|
return {
|
143
|
-
'Name':
|
159
|
+
'Name': name,
|
144
160
|
'Type': args.vehicle_type,
|
145
161
|
'Location': {},
|
146
162
|
'Rotation': {},
|
@@ -189,3 +205,31 @@ class StopVehicleReplayRecording(AvrsApiRequest):
|
|
189
205
|
return {
|
190
206
|
'recordAction': 'stop',
|
191
207
|
}
|
208
|
+
|
209
|
+
class DespawnReplayVehicle(AvrsApiRequest):
|
210
|
+
def __init__(self, parser, cfg):
|
211
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'DespawnObject', 'Ego')
|
212
|
+
psr = parser.add_parser(
|
213
|
+
'despawn', help='despawn a replay vehicle or all replay vehicles', formatter_class=RawTextHelpFormatter)
|
214
|
+
|
215
|
+
psr.add_argument(
|
216
|
+
'--name',
|
217
|
+
default='',
|
218
|
+
help='name of the replay vehicle to despawn')
|
219
|
+
|
220
|
+
psr.add_argument(
|
221
|
+
'--all',
|
222
|
+
action='store_true',
|
223
|
+
help='if set, will despawn all replay vehicles')
|
224
|
+
|
225
|
+
psr.set_defaults(func=self.send_request)
|
226
|
+
|
227
|
+
|
228
|
+
def get_request_body(self, args):
|
229
|
+
self.target_object_id = args.name
|
230
|
+
tags = ["Npc"] if args.all else []
|
231
|
+
|
232
|
+
return {
|
233
|
+
'tags': tags,
|
234
|
+
'bMatchAnyTag': True
|
235
|
+
}
|
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
|