autoverse-cli 0.16.3__tar.gz → 0.16.5__tar.gz

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.
Files changed (51) hide show
  1. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/PKG-INFO +1 -1
  2. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/pyproject.toml +1 -1
  3. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/PKG-INFO +1 -1
  4. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/app_version.py +1 -1
  5. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/race_cloud.py +6 -3
  6. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/race_cloud_bridge_can.py +25 -3
  7. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/race_cloud_util.py +3 -2
  8. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/LICENSE +0 -0
  9. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/README.md +0 -0
  10. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/setup.cfg +0 -0
  11. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/SOURCES.txt +0 -0
  12. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
  13. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
  14. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/requires.txt +0 -0
  15. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/autoverse_cli.egg-info/top_level.txt +0 -0
  16. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/__init__.py +0 -0
  17. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/argparse_help.py +0 -0
  18. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/avrs.py +0 -0
  19. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/can_tool.py +0 -0
  20. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/can_tool_util.py +0 -0
  21. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/cfg.py +0 -0
  22. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/launcher.py +0 -0
  23. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/launcher_util.py +0 -0
  24. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/race_cloud_cfg_util.py +0 -0
  25. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/race_cloud_fwd_api.py +0 -0
  26. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/change_camera.py +0 -0
  27. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/code_booz.py +0 -0
  28. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/demo.py +0 -0
  29. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/dump_sim_config.py +0 -0
  30. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/environment.py +0 -0
  31. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/fault_injection.py +0 -0
  32. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/get_object_config.py +0 -0
  33. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/list_sim_objects.py +0 -0
  34. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/log_path.py +0 -0
  35. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/misc.py +0 -0
  36. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/move_to_landmark.py +0 -0
  37. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/npc.py +0 -0
  38. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/request.py +0 -0
  39. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/reset_to_track.py +0 -0
  40. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/restart.py +0 -0
  41. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/scenario_control.py +0 -0
  42. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/spawn_object.py +0 -0
  43. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/teleport.py +0 -0
  44. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/toggle_hud.py +0 -0
  45. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/vd.py +0 -0
  46. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/vehicle_input.py +0 -0
  47. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/requests/vehicle_replay.py +0 -0
  48. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/simconfig.py +0 -0
  49. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/simconfig_util.py +0 -0
  50. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/tests.py +0 -0
  51. {autoverse_cli-0.16.3 → autoverse_cli-0.16.5}/src/avrs/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: autoverse-cli
3
- Version: 0.16.3
3
+ Version: 0.16.5
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.16.3"
3
+ version = "0.16.5"
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.16.3
3
+ Version: 0.16.5
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.16.3'
5
+ return '0.16.5'
6
6
 
7
7
  def check_app_is_latest():
8
8
  pass
@@ -331,9 +331,12 @@ class AvrsRaceCloud(AvrsApiRequest):
331
331
  logger.info('enabling qos for slot {} with ip {}'.format(slot, args.ip))
332
332
  enable_peer_qos(slot, args.ip)
333
333
  logger.info('connecting vcans for incoming connection')
334
- connect_peer_vcan(slot, args.ip, 0)
335
- connect_peer_vcan(slot, args.ip, 1)
336
- connect_peer_vcan(slot, args.ip, 2)
334
+ out = connect_peer_vcan(slot, args.ip, 0)
335
+ logger.info('connected first vcan result: {} {}'.format(out.out, out.err))
336
+ out = connect_peer_vcan(slot, args.ip, 1)
337
+ logger.info('connected second vcan result: {} {}'.format(out.out, out.err))
338
+ out = connect_peer_vcan(slot, args.ip, 2)
339
+ logger.info('connected second vcan result: {} {}'.format(out.out, out.err))
337
340
 
338
341
  # go ahead and restart forwarding script here
339
342
  # stop it if its already running
@@ -6,6 +6,18 @@ import logging
6
6
 
7
7
  BUFFER_SIZE = 512
8
8
 
9
+ CAN_FRAME_FORMATS = [
10
+ '=H', # 0 bytes should never happen
11
+ '=HB',
12
+ '=HBB',
13
+ '=HBBB',
14
+ '=HBBBB',
15
+ '=HBBBBB',
16
+ '=HBBBBBB',
17
+ '=HBBBBBBB',
18
+ '=HBBBBBBBB'
19
+ ]
20
+
9
21
  class UdpTxCanListener(can.Listener):
10
22
  def __init__(self, target_port, target_ip):
11
23
  self.target_port = target_port
@@ -14,7 +26,10 @@ class UdpTxCanListener(can.Listener):
14
26
 
15
27
  def on_message_received(self, msg):
16
28
  #print('l got m {}'.format(msg))
17
- data = struct.pack('=HBBBBBBBB', msg.arbitration_id, *msg.data)
29
+
30
+ # we are getting data that is not 8 bytes (dlc probably not 8) so
31
+ # we need to zero-bad or something
32
+ data = struct.pack(CAN_FRAME_FORMATS[len(msg.data)], msg.arbitration_id, *msg.data)
18
33
  self.s.sendto(data, (self.target_ip, self.target_port))
19
34
 
20
35
  def can_bridge_loop(args):
@@ -31,14 +46,21 @@ def can_bridge_loop(args):
31
46
  while True:
32
47
  try:
33
48
  data, server = s.recvfrom(BUFFER_SIZE)
49
+
50
+ l = len(data)
51
+
52
+ # ensure data is expected size
53
+ if l > 9 or l < 2:
54
+ continue
55
+
34
56
  #print('got udp data {}'.format(data))
35
- up = struct.unpack('=HBBBBBBBB', data)
57
+ up = struct.unpack(CAN_FRAME_FORMATS[l - 1], data)
36
58
 
37
59
  tx_msg = can.Message(
38
60
  arbitration_id=up[0],
39
61
  data=up[1:],
40
62
  is_extended_id=False,
41
- dlc=8)
63
+ dlc=l - 1) # len is rx size - 1 bc we add id to front
42
64
 
43
65
  bus.send(tx_msg)
44
66
  except Exception as e:
@@ -28,7 +28,7 @@ BASH_KILL_PROCESS_SCRIPT = '''
28
28
  '''
29
29
 
30
30
  BASH_KILL_BY_LAUNCH_SCRIPT = '''
31
- ps -x | grep "{launch_phrase}" | awk '{ print $1 }' | xargs -L1 kill
31
+ ps -x | grep "{launch_phrase}" | awk '{{ print $1 }}' | xargs -L1 kill
32
32
  '''
33
33
 
34
34
  DEFAULT_RMW_QOS = '''
@@ -124,7 +124,7 @@ CONNECT_PEER_VCAN_SCRIPT = '''
124
124
  REMOTE_PORT={remote_port}
125
125
  LOCAL_PORT={local_port}
126
126
  VCAN_NAME={vcan_name}
127
- LOCK_FILE=$HOME/.$VCAN_NAME.vcanlock"
127
+ LOCK_FILE="$HOME/.$VCAN_NAME.vcanlock"
128
128
  LOG_FILE="$HOME/.$VCAN_NAME.vcanlog"
129
129
  if [[ -z $VCAN_NAME ]]; then
130
130
  VCAN_NAME=vcan$PEER_ID
@@ -315,6 +315,7 @@ def reset_race_cloud_connection():
315
315
  reset_rmw_qos()
316
316
  reset_rmw_cyclone_qos()
317
317
  logger.info('removing vcanlog and vcanlock files')
318
+ run_process(['bash', '-c', 'rm ~/.simslot*']) # remove slot reservations
318
319
  run_process(['bash', '-c', 'rm ~/.*.vcanlog*']) # remove slot reservations
319
320
  run_process(['bash', '-c', 'rm ~/.*.vcanlock']) # remove lock files
320
321
  logger.info('stopping race-cloud bridge-can')
File without changes
File without changes
File without changes