autoverse-cli 0.19.4__py3-none-any.whl → 0.19.5__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.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/METADATA +1 -1
- {autoverse_cli-0.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/RECORD +12 -12
- {autoverse_cli-0.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/WHEEL +1 -1
- avrs/app_version.py +1 -1
- avrs/race_cloud.py +1 -1
- avrs/race_cloud_cfg_util.py +9 -2
- avrs/race_cloud_fwd_api.py +4 -0
- avrs/race_cloud_util.py +16 -2
- avrs/requests/vehicle_replay.py +98 -3
- {autoverse_cli-0.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/entry_points.txt +0 -0
- {autoverse_cli-0.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/licenses/LICENSE +0 -0
- {autoverse_cli-0.19.4.dist-info → autoverse_cli-0.19.5.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
autoverse_cli-0.19.
|
1
|
+
autoverse_cli-0.19.5.dist-info/licenses/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
|
2
2
|
avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
avrs/app_version.py,sha256=
|
3
|
+
avrs/app_version.py,sha256=Jnu1h5hX14BcogR5uiQaMmmviWWqv-SW9RoekGUilMM,856
|
4
4
|
avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
|
5
5
|
avrs/avrs.py,sha256=oTtEGdiKJUw03EpKKvgwWahbr9OxxJW3uSrCuFt7DDg,4755
|
6
6
|
avrs/can_tool.py,sha256=IBoctKobBJ3wCq4ZdtuXuXH4AMEUxazCfYT6YP0Luw8,7161
|
@@ -8,11 +8,11 @@ avrs/can_tool_util.py,sha256=G3q21dTGMLc09SDq_RieoW7kSn-kXPkXxPDjavPh4hQ,7710
|
|
8
8
|
avrs/cfg.py,sha256=kMn08Z4Ms1PAu2-U1QI8weEJeIVEppP4A4_tFfwnjtg,2924
|
9
9
|
avrs/launcher.py,sha256=kk1lyHHLgFZ4zsFfa_zV5f1kYbUODT6wEILJ8TZ16rQ,9353
|
10
10
|
avrs/launcher_util.py,sha256=sO3k_z3A-HIQdJVkVXNXUAE_MGFwAYiZUqQBoFwOqew,5325
|
11
|
-
avrs/race_cloud.py,sha256=
|
11
|
+
avrs/race_cloud.py,sha256=0m7BdclKhTrqdAA2kLIobwfoYA8X_PRDCFWoizHtPIQ,20124
|
12
12
|
avrs/race_cloud_bridge_can.py,sha256=K3is7GFzWo2KBojr6V65kz138UfkVFXXofVxSAziArY,2888
|
13
|
-
avrs/race_cloud_cfg_util.py,sha256=
|
14
|
-
avrs/race_cloud_fwd_api.py,sha256=
|
15
|
-
avrs/race_cloud_util.py,sha256=
|
13
|
+
avrs/race_cloud_cfg_util.py,sha256=TImuouwekbl3nfGQBNx_dNMyW0h0Tnl4n_J0-eUwZ_s,11552
|
14
|
+
avrs/race_cloud_fwd_api.py,sha256=jB4kt6Shu9Pj96WPVjK790PZjucYxmuHjjVKczQfyZI,1620
|
15
|
+
avrs/race_cloud_util.py,sha256=g1gCxmK-8n32aNj0NWEiZr79s1rB0EYbGmNLabsIW0U,14297
|
16
16
|
avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
|
17
17
|
avrs/simconfig_util.py,sha256=1RmnmhK5C4HlCicTQeqn-1ORz3Xrku_QMt1Fqr9XjZs,4839
|
18
18
|
avrs/tests.py,sha256=3JeYBjn0tRqHXERDROfzmYuW1KXeCcKur5Bw-EIegto,153
|
@@ -40,9 +40,9 @@ avrs/requests/teleport.py,sha256=5x2eJAv3zloYO27ghCkIiIuvLgVQHhO-UrUMYDfI9Ro,140
|
|
40
40
|
avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,397
|
41
41
|
avrs/requests/vd.py,sha256=Rd0mCc89m2yKjftVf0cMHMFbJG4iFd09KzrI-DsCLgI,2606
|
42
42
|
avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
|
43
|
-
avrs/requests/vehicle_replay.py,sha256=
|
44
|
-
autoverse_cli-0.19.
|
45
|
-
autoverse_cli-0.19.
|
46
|
-
autoverse_cli-0.19.
|
47
|
-
autoverse_cli-0.19.
|
48
|
-
autoverse_cli-0.19.
|
43
|
+
avrs/requests/vehicle_replay.py,sha256=dQ9jQX8UhC5hNbdSu_zTn4gicR2GuTCyOmSBiCYBipI,14696
|
44
|
+
autoverse_cli-0.19.5.dist-info/METADATA,sha256=X-MYLwfngWxnGM3dao5SgPsO-2fTdCcFFEp10Qg5yEM,3364
|
45
|
+
autoverse_cli-0.19.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
46
|
+
autoverse_cli-0.19.5.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
|
47
|
+
autoverse_cli-0.19.5.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
|
48
|
+
autoverse_cli-0.19.5.dist-info/RECORD,,
|
avrs/app_version.py
CHANGED
avrs/race_cloud.py
CHANGED
@@ -336,7 +336,7 @@ class AvrsRaceCloud(AvrsApiRequest):
|
|
336
336
|
out = connect_peer_vcan(slot, args.ip, 1)
|
337
337
|
logger.info('connected second vcan result: {} {}'.format(out.out, out.err))
|
338
338
|
out = connect_peer_vcan(slot, args.ip, 2)
|
339
|
-
logger.info('connected
|
339
|
+
logger.info('connected third vcan result: {} {}'.format(out.out, out.err))
|
340
340
|
|
341
341
|
# go ahead and restart forwarding script here
|
342
342
|
# stop it if its already running
|
avrs/race_cloud_cfg_util.py
CHANGED
@@ -51,6 +51,12 @@ def register_received_vehicle(team_name, slot, cfg_data, bsu_vcan, kistler_vcan,
|
|
51
51
|
cfg_string = base64.b64decode(cfg_data)
|
52
52
|
cfg_object = json.loads(cfg_string.decode('utf-8'))
|
53
53
|
|
54
|
+
# ensure replay for recording is enabled
|
55
|
+
logger.info('ensuring replay component is enabled')
|
56
|
+
replay = get_payload(cfg_object, 'WheeledVehicleReplayIpd')
|
57
|
+
replay['bEnabled'] = True
|
58
|
+
replay['body']['bEnableRecording'] = True
|
59
|
+
|
54
60
|
# ensure perception is disabled
|
55
61
|
eav24 = get_payload(cfg_object, 'Eav24Initializer')
|
56
62
|
if eav24 is None:
|
@@ -62,10 +68,11 @@ def register_received_vehicle(team_name, slot, cfg_data, bsu_vcan, kistler_vcan,
|
|
62
68
|
eav24['body']['bRadarEnabled'] = False
|
63
69
|
eav24['body']['bPublishGroundTruth'] = False
|
64
70
|
eav24['body']['bPublishInputs'] = False
|
71
|
+
eav24['body']['bRenderHudInWorld'] = True
|
65
72
|
|
66
73
|
# do not disable HUD
|
67
74
|
#logger.info('disabling hud for received vehicle config')
|
68
|
-
|
75
|
+
eav24['body']['bHudEnabled'] = True
|
69
76
|
|
70
77
|
logger.info('setting primary vcan to: {}, secondary to: {}, and <unused> to: {}'.format(
|
71
78
|
bsu_vcan, kistler_vcan, badenia_vcan))
|
@@ -77,7 +84,7 @@ def register_received_vehicle(team_name, slot, cfg_data, bsu_vcan, kistler_vcan,
|
|
77
84
|
|
78
85
|
if eav24["body"]["canReceiveRate"] > 10000:
|
79
86
|
logger.info("can rx was > 10000. clamping")
|
80
|
-
eav24["body"]["canReceiveRate"]
|
87
|
+
eav24["body"]["canReceiveRate"] = 10000
|
81
88
|
|
82
89
|
if eav24["body"]["canLowSendRate"] > 10:
|
83
90
|
logger.info("can tx low was > 10. clamping")
|
avrs/race_cloud_fwd_api.py
CHANGED
@@ -22,6 +22,10 @@ class ApiForwardHandler(BaseHTTPRequestHandler):
|
|
22
22
|
length = int(self.headers.get('content-length'))
|
23
23
|
rfile_str = self.rfile.read(length).decode('utf8')
|
24
24
|
sim_response = self.get_fwd_response(rfile_str)
|
25
|
+
try:
|
26
|
+
print("{} : {}".format(self.client_address, rfile_str))
|
27
|
+
except:
|
28
|
+
pass
|
25
29
|
self.send_response(HTTPStatus.OK)
|
26
30
|
self.send_header("Content-Type", "application/json")
|
27
31
|
self.end_headers()
|
avrs/race_cloud_util.py
CHANGED
@@ -55,6 +55,13 @@ DEFAULT_RMW_QOS = '''
|
|
55
55
|
<!--<locator> <udpv4> <address>PEER_3</address> </udpv4> </locator>PEER3-->
|
56
56
|
<!--<locator> <udpv4> <address>PEER_4</address> </udpv4> </locator>PEER4-->
|
57
57
|
<!--<locator> <udpv4> <address>PEER_5</address> </udpv4> </locator>PEER5-->
|
58
|
+
<!--<locator> <udpv4> <address>PEER_6</address> </udpv4> </locator>PEER6-->
|
59
|
+
<!--<locator> <udpv4> <address>PEER_7</address> </udpv4> </locator>PEER7-->
|
60
|
+
<!--<locator> <udpv4> <address>PEER_8</address> </udpv4> </locator>PEER8-->
|
61
|
+
<!--<locator> <udpv4> <address>PEER_9</address> </udpv4> </locator>PEER9-->
|
62
|
+
<!--<locator> <udpv4> <address>PEER_10</address> </udpv4> </locator>PEER10-->
|
63
|
+
<!--<locator> <udpv4> <address>PEER_11</address> </udpv4> </locator>PEER11-->
|
64
|
+
<!--<locator> <udpv4> <address>PEER_12</address> </udpv4> </locator>PEER12-->
|
58
65
|
</initialPeersList>
|
59
66
|
</builtin>
|
60
67
|
<userTransports>
|
@@ -80,6 +87,13 @@ DEFAULT_RMW_CYCLONE = '''
|
|
80
87
|
<!--<Peer address='PEER_3'/>PEER3-->
|
81
88
|
<!--<Peer address='PEER_4'/>PEER4-->
|
82
89
|
<!--<Peer address='PEER_5'/>PEER5-->
|
90
|
+
<!--<Peer address='PEER_6'/>PEER6-->
|
91
|
+
<!--<Peer address='PEER_7'/>PEER7-->
|
92
|
+
<!--<Peer address='PEER_8'/>PEER8-->
|
93
|
+
<!--<Peer address='PEER_9'/>PEER9-->
|
94
|
+
<!--<Peer address='PEER_10'/>PEER10-->
|
95
|
+
<!--<Peer address='PEER_11'/>PEER11-->
|
96
|
+
<!--<Peer address='PEER_12'/>PEER12-->
|
83
97
|
</Peers>
|
84
98
|
</Discovery>
|
85
99
|
</Domain>
|
@@ -161,7 +175,7 @@ CREATE_VCANS_SCRIPT = '''
|
|
161
175
|
'''
|
162
176
|
|
163
177
|
START_FWD_API_SCRIPT = '''
|
164
|
-
nohup avrs race-cloud fwd-api fg {source_port} {target_port}
|
178
|
+
nohup avrs race-cloud fwd-api fg {source_port} {target_port} >> ~/fwd_api.log 2>&1 < /dev/null &
|
165
179
|
echo "$!" > ~/fwd_api_pid
|
166
180
|
'''
|
167
181
|
|
@@ -325,7 +339,7 @@ def try_get_open_slot(team_name, ip):
|
|
325
339
|
logger = logging.getLogger('avrs')
|
326
340
|
slot_file_dir = os.environ['HOME']
|
327
341
|
logger.info('finding a slot for team {}'.format(team_name))
|
328
|
-
for i in range(
|
342
|
+
for i in range(12):
|
329
343
|
slot_file_path = os.path.join(slot_file_dir, '.simslot_{}'.format(i))
|
330
344
|
|
331
345
|
if os.path.isfile(slot_file_path):
|
avrs/requests/vehicle_replay.py
CHANGED
@@ -11,6 +11,7 @@ class AvrsVehicleReplayRequests():
|
|
11
11
|
StartVehicleReplayRecording(sps, cfg)
|
12
12
|
StopVehicleReplayRecording(sps, cfg)
|
13
13
|
DespawnReplayVehicle(sps, cfg)
|
14
|
+
SpawnVehicleReplayGroup(sps, cfg)
|
14
15
|
|
15
16
|
class SpawnReplayVehicle(AvrsApiRequest):
|
16
17
|
def __init__(self, parser, cfg):
|
@@ -79,6 +80,11 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
79
80
|
default=1,
|
80
81
|
help='the number of npcs to spawn (only works with automatic name)')
|
81
82
|
|
83
|
+
psr.add_argument(
|
84
|
+
'--group-name',
|
85
|
+
default="",
|
86
|
+
help="if specified, all vehicles will begin recording with the given group name")
|
87
|
+
|
82
88
|
psr.add_argument(
|
83
89
|
'--enable-front-lidar',
|
84
90
|
action='store_true',
|
@@ -125,7 +131,9 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
125
131
|
'bUseRandomProfile': args.replay_file == 'random',
|
126
132
|
'replayAction': 'start' if args.auto_start else '',
|
127
133
|
'bStartReplayAtRandomTime': args.random_start,
|
128
|
-
'relativeDistance': args.relative_dist
|
134
|
+
'relativeDistance': args.relative_dist,
|
135
|
+
'bRecordAllVehiclesAsGroup': args.group_name != "",
|
136
|
+
'RecordingGroupName': args.group_name
|
129
137
|
}
|
130
138
|
}
|
131
139
|
|
@@ -221,6 +229,21 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
221
229
|
}
|
222
230
|
}
|
223
231
|
|
232
|
+
world_label_pld = {
|
233
|
+
"typeName": "WorldTextComponent",
|
234
|
+
"bEnabled": True,
|
235
|
+
"body": {
|
236
|
+
"bUseObjectName": False,
|
237
|
+
"defaultString": "",
|
238
|
+
"fontSize": 34,
|
239
|
+
"offsetCm": {
|
240
|
+
"x": 0,
|
241
|
+
"y": 0,
|
242
|
+
"z": 150
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
224
247
|
plds = [
|
225
248
|
{
|
226
249
|
'typeName': 'WheeledVehicleReplayIpd',
|
@@ -244,7 +267,8 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
244
267
|
'typeName': 'GenericLidarIpd',
|
245
268
|
'bEnabled': args.enable_right_lidar,
|
246
269
|
'body': lidar_right_pld
|
247
|
-
}
|
270
|
+
},
|
271
|
+
world_label_pld
|
248
272
|
]
|
249
273
|
|
250
274
|
if args.with_view_cameras:
|
@@ -274,6 +298,36 @@ class SpawnReplayVehicle(AvrsApiRequest):
|
|
274
298
|
'Payloads': plds
|
275
299
|
}
|
276
300
|
|
301
|
+
class SpawnVehicleReplayGroup(AvrsApiRequest):
|
302
|
+
def __init__(self, parser, cfg):
|
303
|
+
AvrsApiRequest.__init__(self, parser, cfg, 'ConfigureVehicleReplay', '')
|
304
|
+
psr = parser.add_parser(
|
305
|
+
'spawn-group', help='spawn each replay vehicle for a given group', formatter_class=RawTextHelpFormatter)
|
306
|
+
|
307
|
+
psr.add_argument(
|
308
|
+
'group_name',
|
309
|
+
default="",
|
310
|
+
help="if specified, all vehicles will begin recording with the given group name")
|
311
|
+
|
312
|
+
psr.set_defaults(func=self.send_request)
|
313
|
+
|
314
|
+
def get_request_body(self, args):
|
315
|
+
|
316
|
+
return {
|
317
|
+
'PlayRate': -1.0,
|
318
|
+
'profile': '',
|
319
|
+
'replayAction': 'start',
|
320
|
+
#'teleportLocation': '',
|
321
|
+
'recordAction': '',
|
322
|
+
'bShouldOverrideRecordSingleLap': False,
|
323
|
+
'bRecordSingleLapOverride': False,
|
324
|
+
'bShouldOverrideRecordMinSpeedThresh': False,
|
325
|
+
'RecordMinSpeedThreshOverride': -1.0,
|
326
|
+
'recordFileName': '',
|
327
|
+
'recordRateHz': 100,
|
328
|
+
"RecordingGroupName": args.group_name
|
329
|
+
}
|
330
|
+
|
277
331
|
class StartVehicleReplayRecording(AvrsApiRequest):
|
278
332
|
def __init__(self, parser, cfg):
|
279
333
|
AvrsApiRequest.__init__(self, parser, cfg, 'ConfigureVehicleReplay', 'Ego')
|
@@ -284,24 +338,50 @@ class StartVehicleReplayRecording(AvrsApiRequest):
|
|
284
338
|
'out_file',
|
285
339
|
help='the file name to use for the saved recording')
|
286
340
|
|
341
|
+
psr.add_argument('--object-name', default='Ego', help='the name of the object to record')
|
342
|
+
|
287
343
|
psr.add_argument(
|
288
344
|
'--rate-hz',
|
289
345
|
type=float,
|
290
346
|
default=100.0,
|
291
347
|
help='the rate to record vehicle motion. high rates will produce large files')
|
292
348
|
|
349
|
+
psr.add_argument(
|
350
|
+
'--group-name',
|
351
|
+
default="",
|
352
|
+
help="if specified, all vehicles will begin recording with the given group name")
|
353
|
+
|
354
|
+
psr.add_argument(
|
355
|
+
'--not-single-lap',
|
356
|
+
action='store_true',
|
357
|
+
help='if set, recording will not try to capture exactly one lap and must be stopped by the user')
|
358
|
+
|
293
359
|
psr.set_defaults(func=self.send_request)
|
294
360
|
|
295
361
|
|
296
362
|
def get_request_body(self, args):
|
363
|
+
self.target_object_id = args.object_name
|
364
|
+
|
365
|
+
# we do not want to default to ego for group recordings
|
366
|
+
# because we want the replay manager to handle them
|
367
|
+
if args.group_name != "":
|
368
|
+
self.target_object_id = ""
|
369
|
+
# it doesnt make sense to do group recordings as single laps
|
370
|
+
args.not_single_lap = True
|
371
|
+
|
297
372
|
return {
|
298
373
|
'PlayRate': -1.0,
|
299
374
|
'profile': '',
|
300
375
|
'replayAction': '',
|
301
376
|
#'teleportLocation': '',
|
302
377
|
'recordAction': 'start',
|
378
|
+
'bShouldOverrideRecordSingleLap': args.not_single_lap,
|
379
|
+
'bRecordSingleLapOverride': not args.not_single_lap,
|
380
|
+
'bShouldOverrideRecordMinSpeedThresh': args.group_name != "", # no min speed for groups
|
381
|
+
'RecordMinSpeedThreshOverride': -1.0,
|
303
382
|
'recordFileName': args.out_file,
|
304
|
-
'recordRateHz': args.rate_hz
|
383
|
+
'recordRateHz': args.rate_hz,
|
384
|
+
"RecordingGroupName": args.group_name
|
305
385
|
}
|
306
386
|
|
307
387
|
class StopVehicleReplayRecording(AvrsApiRequest):
|
@@ -309,12 +389,27 @@ class StopVehicleReplayRecording(AvrsApiRequest):
|
|
309
389
|
AvrsApiRequest.__init__(self, parser, cfg, 'ConfigureVehicleReplay', 'Ego')
|
310
390
|
psr = parser.add_parser(
|
311
391
|
'stop-recording', help='begin recording vehicle motion', formatter_class=RawTextHelpFormatter)
|
392
|
+
|
393
|
+
psr.add_argument('--object-name', default='Ego', help='the name of the object to record')
|
394
|
+
|
395
|
+
psr.add_argument(
|
396
|
+
'--group-name',
|
397
|
+
default="",
|
398
|
+
help="if specified, all vehicles will begin recording with the given group name")
|
399
|
+
|
312
400
|
psr.set_defaults(func=self.send_request)
|
313
401
|
|
314
402
|
|
315
403
|
def get_request_body(self, args):
|
404
|
+
self.target_object_id = args.object_name
|
405
|
+
|
406
|
+
# we do not want to default to ego for group recordings
|
407
|
+
# because we want the replay manager to handle them
|
408
|
+
if args.group_name != "":
|
409
|
+
self.target_object_id = ""
|
316
410
|
return {
|
317
411
|
'recordAction': 'stop',
|
412
|
+
"RecordingGroupName": args.group_name
|
318
413
|
}
|
319
414
|
|
320
415
|
class DespawnReplayVehicle(AvrsApiRequest):
|
File without changes
|
File without changes
|
File without changes
|