autoverse-cli 0.13.6__tar.gz → 0.14.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/PKG-INFO +1 -1
  2. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/pyproject.toml +1 -1
  3. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/PKG-INFO +1 -1
  4. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/app_version.py +1 -1
  5. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/race_cloud.py +11 -2
  6. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/race_cloud_cfg_util.py +3 -0
  7. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/race_cloud_fwd_api.py +3 -1
  8. autoverse_cli-0.14.0/src/avrs/requests/reset_to_track.py +21 -0
  9. autoverse_cli-0.14.0/src/avrs/requests/teleport.py +40 -0
  10. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/vd.py +7 -0
  11. autoverse_cli-0.13.6/src/avrs/requests/reset_to_track.py +0 -12
  12. autoverse_cli-0.13.6/src/avrs/requests/teleport.py +0 -22
  13. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/LICENSE +0 -0
  14. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/README.md +0 -0
  15. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/setup.cfg +0 -0
  16. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/SOURCES.txt +0 -0
  17. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
  18. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
  19. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/requires.txt +0 -0
  20. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/autoverse_cli.egg-info/top_level.txt +0 -0
  21. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/__init__.py +0 -0
  22. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/argparse_help.py +0 -0
  23. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/avrs.py +0 -0
  24. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/can_tool.py +0 -0
  25. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/can_tool_util.py +0 -0
  26. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/cfg.py +0 -0
  27. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/launcher.py +0 -0
  28. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/launcher_util.py +0 -0
  29. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/race_cloud_util.py +0 -0
  30. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/change_camera.py +0 -0
  31. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/code_booz.py +0 -0
  32. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/demo.py +0 -0
  33. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/dump_sim_config.py +0 -0
  34. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/environment.py +0 -0
  35. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/fault_injection.py +0 -0
  36. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/get_object_config.py +0 -0
  37. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/list_sim_objects.py +0 -0
  38. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/log_path.py +0 -0
  39. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/misc.py +0 -0
  40. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/move_to_landmark.py +0 -0
  41. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/npc.py +0 -0
  42. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/request.py +0 -0
  43. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/restart.py +0 -0
  44. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/scenario_control.py +0 -0
  45. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/spawn_object.py +0 -0
  46. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/toggle_hud.py +0 -0
  47. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/vehicle_input.py +0 -0
  48. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/requests/vehicle_replay.py +0 -0
  49. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/simconfig.py +0 -0
  50. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/simconfig_util.py +0 -0
  51. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/tests.py +0 -0
  52. {autoverse_cli-0.13.6 → autoverse_cli-0.14.0}/src/avrs/util.py +0 -0
@@ -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,6 +1,6 @@
1
1
  [project]
2
2
  name = "autoverse-cli"
3
- version = "0.13.6"
3
+ version = "0.14.0"
4
4
  dependencies = [
5
5
  "boto3",
6
6
  "cantools"
@@ -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
@@ -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
@@ -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):
@@ -0,0 +1,21 @@
1
+ from avrs.requests.request import AvrsApiRequest
2
+
3
+ class ResetToTrack(AvrsApiRequest):
4
+ def __init__(self, parser, cfg):
5
+ AvrsApiRequest.__init__(self, parser, cfg, 'ResetToTrack', 'Ego')
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
+
15
+ psr.set_defaults(func=self.send_request)
16
+
17
+ def get_request_body(self, args):
18
+ self.target_object_id = args.object_name
19
+ return {
20
+
21
+ }
@@ -0,0 +1,40 @@
1
+ from avrs.requests.request import AvrsApiRequest
2
+
3
+ class Teleport(AvrsApiRequest):
4
+ def __init__(self, parser, cfg):
5
+ AvrsApiRequest.__init__(self, parser, cfg, 'Teleport', "Ego")
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
+
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
+
29
+ psr.set_defaults(func=self.send_request)
30
+
31
+
32
+ def get_request_body(self, args):
33
+ self.target_object_id = args.object_name
34
+ return {
35
+ "X": args.x,
36
+ "Y": args.y,
37
+ "Z": args.z,
38
+ "yaw": args.yaw,
39
+ "NavFrame": args.frame
40
+ }
@@ -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
@@ -1,12 +0,0 @@
1
- from avrs.requests.request import AvrsApiRequest
2
-
3
- class ResetToTrack(AvrsApiRequest):
4
- def __init__(self, parser, cfg):
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')
7
- psr.set_defaults(func=self.send_request)
8
-
9
- def get_request_body(self, args):
10
- return {
11
-
12
- }
@@ -1,22 +0,0 @@
1
- from avrs.requests.request import AvrsApiRequest
2
-
3
- class Teleport(AvrsApiRequest):
4
- def __init__(self, parser, cfg):
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')
11
- psr.add_argument('--frame', choices=['lla', 'ned'], default='ned', help='LLA or NED coordinate system.')
12
- psr.set_defaults(func=self.send_request)
13
-
14
-
15
- def get_request_body(self, args):
16
- return {
17
- "X": args.x,
18
- "Y": args.y,
19
- "Z": args.z,
20
- "yaw": args.yaw,
21
- "NavFrame": args.frame
22
- }
File without changes
File without changes
File without changes