autoverse-cli 0.13.6__py3-none-any.whl → 0.14.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: autoverse-cli
3
- Version: 0.13.6
3
+ Version: 0.14.0
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=q9eu-Welv6ex74hek8yab_D6nZbF6arJpoB1e-alW5Q,856
2
+ avrs/app_version.py,sha256=OTtZ85M8hzRUayr0aFKqt9dDXBj9hytgLvvwU0Og4Ao,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,9 +7,9 @@ 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=15nJXs8SEwjRYuhV0Got9FE_1uq5QRClnXvPqjYRv7Q,15336
11
- avrs/race_cloud_cfg_util.py,sha256=gcHyUY0m5zc_9zZatKLaSIC_oFGc-6Vs8UlcX5yry9o,5158
12
- avrs/race_cloud_fwd_api.py,sha256=8ai4YnuqB16ewHxsT9RzNOLNSLcR95uuWfhOkIImjyA,1418
10
+ avrs/race_cloud.py,sha256=ZRkiq3MXW5bboxP6odz9foNrqUQwxWoEapllbofR6JE,15685
11
+ avrs/race_cloud_cfg_util.py,sha256=Rqp-SemS_ZL6wD_nABsMDc5thkoit7FQTJecaB9oWA8,5261
12
+ avrs/race_cloud_fwd_api.py,sha256=HuLE5kfmzVq08aP3tlEh3f8WNjGL5N3K5EbXg9uQomo,1506
13
13
  avrs/race_cloud_util.py,sha256=ltp3_mPRV7TpdX0ZlcNQP0qzEq-l0l_mEAdCB4YZAU4,10187
14
14
  avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
15
15
  avrs/simconfig_util.py,sha256=1RmnmhK5C4HlCicTQeqn-1ORz3Xrku_QMt1Fqr9XjZs,4839
@@ -28,18 +28,18 @@ avrs/requests/misc.py,sha256=lejEFt5aB6tbfKXHI1DGwP4fsntFIv16NXO23R6Bfhw,1423
28
28
  avrs/requests/move_to_landmark.py,sha256=cLRBKu9XEDsmCoftBJ8JwoBLqzb0IZsxFMBnus4T-kc,702
29
29
  avrs/requests/npc.py,sha256=Y_WovbcLomCCcOLAMMO_DHZtc1crAzWo97qEIGS3SvU,9691
30
30
  avrs/requests/request.py,sha256=uUAndVZPbTQgbiXqrd4S3l3TQ0J_3STBtghEFlVr5GA,2058
31
- avrs/requests/reset_to_track.py,sha256=lSd2YavBxDV_hQMhVoi08_TpTFEq7G2MA18xosFYa1g,450
31
+ avrs/requests/reset_to_track.py,sha256=6BXe2EtezdZR1Xrs0pej_eBK-ilqeN8ZrJGN_KKPLbk,672
32
32
  avrs/requests/restart.py,sha256=ih5mnWiU34q3-xhOth45CtOUXxKI0PoMDCnFJV0JbwE,415
33
33
  avrs/requests/scenario_control.py,sha256=u-KQx-mdCm6IE_c88a6iEgWUsZZVOayxBo58Ocjg0ZI,1502
34
34
  avrs/requests/spawn_object.py,sha256=RzTJprcyPpNIesu4s_GMuEYbHII-sopw1sDcbTDgvrY,1429
35
- avrs/requests/teleport.py,sha256=fzBmlqaCuV6-R79co__Q8Wpu4ozmEXFh8EGZKs8l8Io,1140
35
+ avrs/requests/teleport.py,sha256=zwawRgTs6N1KYtEsKDlDhfINElmbI_FSID-TQ1ykzX8,1415
36
36
  avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,397
37
- avrs/requests/vd.py,sha256=at6oUAGY2h0OxYU6MLOi1gnxyUn6i24vL9DUAj0L880,1600
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.13.6.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
- autoverse_cli-0.13.6.dist-info/METADATA,sha256=lFWUR2zZwWxZUfG2dCQS7WUt6tPaqPgHxpstpfkEuJg,3342
42
- autoverse_cli-0.13.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
- autoverse_cli-0.13.6.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
- autoverse_cli-0.13.6.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
- autoverse_cli-0.13.6.dist-info/RECORD,,
40
+ autoverse_cli-0.14.0.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
+ autoverse_cli-0.14.0.dist-info/METADATA,sha256=aKr843SOu3yHpAv323cqtSnYWFF_xag8AesW48Nn5nQ,3342
42
+ autoverse_cli-0.14.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
+ autoverse_cli-0.14.0.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
+ autoverse_cli-0.14.0.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
+ autoverse_cli-0.14.0.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.13.6'
5
+ return '0.14.0'
6
6
 
7
7
  def check_app_is_latest():
8
8
  pass
avrs/race_cloud.py CHANGED
@@ -70,7 +70,7 @@ class AvrsRaceCloud(AvrsApiRequest):
70
70
  help='the index of the simulator instance to apply the action')
71
71
  sim_ctrl_parser.add_argument(
72
72
  'action',
73
- choices=['start', 'stop', 'restart', 'reset-connection'],
73
+ choices=['start', 'stop', 'restart', 'reset-connection', 'get-log'],
74
74
  help='what action to apply to the simulator program')
75
75
  sim_ctrl_parser.add_argument(
76
76
  '--local',
@@ -291,7 +291,7 @@ class AvrsRaceCloud(AvrsApiRequest):
291
291
  # stop it if its already running
292
292
  stop_result = stop_fwd_api()
293
293
  logger.info('stopped fwd-api: {}'.format(stop_result))
294
- start_result = start_fwd_api(args.source_port, args.target_port)
294
+ start_result = start_fwd_api(30333, 30313)
295
295
  logger.info('started fwd-api: {}'.format(start_result))
296
296
 
297
297
 
@@ -321,6 +321,15 @@ class AvrsRaceCloud(AvrsApiRequest):
321
321
  print('starting sim program on sim instance')
322
322
  exe_path = os.path.join(get_sim_exe_path())
323
323
  start_exe(exe_path)
324
+ if args.action == 'get-log':
325
+ logger.info('getting connection log')
326
+ log_path = os.path.join(get_cfg_dir('avrs'), 'avrs.log')
327
+ if os.path.isfile(log_path):
328
+ with open(log_path, 'r', encoding='utf-8') as f:
329
+ print(f.read())
330
+ else:
331
+ print('no log file found')
332
+
324
333
 
325
334
  def remote_sim_ctrl(self, args):
326
335
  logger = logging.getLogger('avrs')
@@ -46,6 +46,9 @@ def register_received_vehicle(team_name, slot, cfg_data, bsu_vcan, kistler_vcan,
46
46
  eav24['body']['bPublishGroundTruth'] = False
47
47
  eav24['body']['bPublishInputs'] = False
48
48
 
49
+ logger.info('disabling hud for received vehicle config')
50
+ eav24['body']['bHudEnabled'] = False
51
+
49
52
  logger.info('setting bsu vcan to: {}, kistler to: {}, and badenia to: {}'.format(
50
53
  bsu_vcan, kistler_vcan, badenia_vcan))
51
54
  eav24['body']['bsuCanName'] = bsu_vcan
@@ -22,8 +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
- self.wfile.write(sim_response.encode('utf-8'))
26
25
  self.send_response(HTTPStatus.OK)
26
+ self.send_header("Content-Type", "application/json")
27
+ self.end_headers()
28
+ self.wfile.write(sim_response.encode('utf-8'))
27
29
  self.end_headers()
28
30
 
29
31
  def get_fwd_response(self, body):
@@ -3,10 +3,19 @@ from avrs.requests.request import AvrsApiRequest
3
3
  class ResetToTrack(AvrsApiRequest):
4
4
  def __init__(self, parser, cfg):
5
5
  AvrsApiRequest.__init__(self, parser, cfg, 'ResetToTrack', 'Ego')
6
- psr = parser.add_parser('reset-to-track', help='moves the car to the closest point on track pointing down track')
6
+ psr = parser.add_parser(
7
+ 'reset-to-track',
8
+ help='moves the car to the closest point on track pointing down track')
9
+
10
+ psr.add_argument(
11
+ '--object-name',
12
+ default='ego',
13
+ help='the simulated object to apply the fault to')
14
+
7
15
  psr.set_defaults(func=self.send_request)
8
16
 
9
17
  def get_request_body(self, args):
18
+ self.target_object_id = args.object_name
10
19
  return {
11
20
 
12
21
  }
avrs/requests/teleport.py CHANGED
@@ -3,16 +3,34 @@ from avrs.requests.request import AvrsApiRequest
3
3
  class Teleport(AvrsApiRequest):
4
4
  def __init__(self, parser, cfg):
5
5
  AvrsApiRequest.__init__(self, parser, cfg, 'Teleport', "Ego")
6
- psr = parser.add_parser('teleport', help='Teleports the car to the given x,y,z in either enu or lla.')
7
- psr.add_argument('x', type=float, help='new x position (NED meters) or latitude (if frame is set to lla)')
8
- psr.add_argument('y', type=float, help='new y position (NED meters) or longitude (if frame is set to lla)')
9
- psr.add_argument('z', type=float, help='new z position (NED meters) or altitude (if frame is set to lla)')
10
- psr.add_argument('--yaw', type=float, default=0.0, help='the yaw in degrees (0 north, + CW) to apply post teleport')
6
+
7
+ psr = parser.add_parser('teleport',
8
+ help='Teleports the car to the given x,y,z in either enu or lla.')
9
+
10
+ psr.add_argument('x', type=float,
11
+ help='new x position (NED meters) or latitude (if frame is set to lla)')
12
+
13
+ psr.add_argument('y', type=float,
14
+ help='new y position (NED meters) or longitude (if frame is set to lla)')
15
+
16
+ psr.add_argument('z', type=float,
17
+ help='new z position (NED meters) or altitude (if frame is set to lla)')
18
+
19
+ psr.add_argument('--yaw', type=float, default=0.0,
20
+ help='the yaw in degrees (0 north, + CW) to apply post teleport')
21
+
11
22
  psr.add_argument('--frame', choices=['lla', 'ned'], default='ned', help='LLA or NED coordinate system.')
23
+
24
+ psr.add_argument(
25
+ '--object-name',
26
+ default='ego',
27
+ help='the simulated object to apply the fault to')
28
+
12
29
  psr.set_defaults(func=self.send_request)
13
30
 
14
31
 
15
32
  def get_request_body(self, args):
33
+ self.target_object_id = args.object_name
16
34
  return {
17
35
  "X": args.x,
18
36
  "Y": args.y,
avrs/requests/vd.py CHANGED
@@ -15,9 +15,16 @@ class SetFrictionModifier(AvrsApiRequest):
15
15
  psr.add_argument('modifier', type = float, help = "Modified grip value")
16
16
  psr.add_argument('tires', help = "Tires to apply the modifier to",
17
17
  choices=("FL", "FR", "RL", "RR", "F", "R", "All"))
18
+
19
+ psr.add_argument(
20
+ '--object-name',
21
+ default='ego',
22
+ help='the simulated object to apply the fault to')
23
+
18
24
  psr.set_defaults(func=self.send_request)
19
25
 
20
26
  def get_request_body(self, args):
27
+ self.target_object_id = args.object_name
21
28
  return {
22
29
  'NewModifier': args.modifier,
23
30
  'Tires': args.tires