isar 1.33.1__py3-none-any.whl → 1.33.3__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.
Potentially problematic release.
This version of isar might be problematic. Click here for more details.
- isar/apis/schedule/scheduling_controller.py +3 -1
- isar/config/settings.py +5 -0
- isar/services/service_connections/mqtt/mqtt_client.py +46 -10
- isar/services/service_connections/mqtt/robot_heartbeat_publisher.py +3 -0
- isar/services/utilities/scheduling_utilities.py +5 -9
- isar/state_machine/state_machine.py +16 -9
- isar/state_machine/states/home.py +14 -5
- isar/state_machine/states/paused.py +24 -1
- isar/state_machine/states/return_home_paused.py +66 -0
- isar/state_machine/states/returning_home.py +10 -5
- isar/state_machine/states/stopping.py +5 -22
- isar/state_machine/states/stopping_return_home.py +73 -0
- isar/state_machine/states_enum.py +2 -1
- isar/state_machine/transitions/functions/pause.py +38 -0
- isar/state_machine/transitions/functions/robot_status.py +2 -7
- isar/state_machine/transitions/mission.py +46 -19
- isar/state_machine/transitions/return_home.py +1 -7
- isar/state_machine/transitions/robot_status.py +2 -17
- isar/storage/blob_storage.py +46 -24
- isar/storage/local_storage.py +21 -11
- isar/storage/storage_interface.py +27 -6
- isar/storage/uploader.py +30 -13
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/METADATA +2 -2
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/RECORD +32 -31
- robot_interface/models/mission/status.py +2 -1
- robot_interface/telemetry/mqtt_client.py +62 -6
- robot_interface/telemetry/payloads.py +4 -2
- robot_interface/utilities/json_service.py +6 -0
- isar/state_machine/states/robot_standing_still.py +0 -52
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/WHEEL +0 -0
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/entry_points.txt +0 -0
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/licenses/LICENSE +0 -0
- {isar-1.33.1.dist-info → isar-1.33.3.dist-info}/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ isar/apis/models/models.py,sha256=iRyqflpjGopm4KJjgRrOnC2swNEk3a-iwVynzw3Nm6c,19
|
|
|
8
8
|
isar/apis/models/start_mission_definition.py,sha256=v-wt1XDd53Sw7DCdFAkxBBut-xd_uGJa7qMJnE3VI9k,6364
|
|
9
9
|
isar/apis/robot_control/robot_controller.py,sha256=0EHjMqOBdfJlMrCItGPz5X-4X2kc-2XlNnUU2LOcLfc,1219
|
|
10
10
|
isar/apis/schedule/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
isar/apis/schedule/scheduling_controller.py,sha256=
|
|
11
|
+
isar/apis/schedule/scheduling_controller.py,sha256=RKtQmNtcepG0mgu5ihidc2J7ZJ9c1plIgUQCEBz_3SE,9476
|
|
12
12
|
isar/apis/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
isar/apis/security/authentication.py,sha256=Se2puhe2TUBmfio2RLma52-VSLRhqvWgu0Cd1bhdwMo,2000
|
|
14
14
|
isar/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -16,7 +16,7 @@ isar/config/configuration_error.py,sha256=rO6WOhafX6xvVib8WxV-eY483Z0PpN-9PxGsq5
|
|
|
16
16
|
isar/config/log.py,sha256=f_mLLz5RSa0kZkdpi1m0iMdwwDc4RQp12mnT6gu2exE,1303
|
|
17
17
|
isar/config/logging.conf,sha256=a7ZBvZkrMDaPU3eRGAjL_eZz6hZsa6BaRJOfx8mbnnM,629
|
|
18
18
|
isar/config/open_telemetry.py,sha256=Lgu0lbRQA-zz6ZDoBKKk0whQex5w18jl1wjqWzHUGdg,3634
|
|
19
|
-
isar/config/settings.py,sha256=
|
|
19
|
+
isar/config/settings.py,sha256=etvCAo1ndds9zTE1yK2CBjWPS_5cD6oM1lJ0R74nnqU,14242
|
|
20
20
|
isar/config/certs/ca-cert.pem,sha256=qoNljfad_qcMxhXJIUMLd7nT-Qwf_d4dYSdoOFEOE8I,2179
|
|
21
21
|
isar/config/keyvault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
isar/config/keyvault/keyvault_error.py,sha256=zvPCsZLjboxsxthYkxpRERCTFxYV8R5WmACewAUQLwk,41
|
|
@@ -54,49 +54,50 @@ isar/services/auth/azure_credentials.py,sha256=9PlwGe5FrPRbW2dp0go7LMp8_l_FRvL8x
|
|
|
54
54
|
isar/services/service_connections/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
isar/services/service_connections/request_handler.py,sha256=0LxC0lu_HXeEf_xmJWjfEsh14oAUI97cpG1IWtBlcs4,4278
|
|
56
56
|
isar/services/service_connections/mqtt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
-
isar/services/service_connections/mqtt/mqtt_client.py,sha256=
|
|
58
|
-
isar/services/service_connections/mqtt/robot_heartbeat_publisher.py,sha256=
|
|
57
|
+
isar/services/service_connections/mqtt/mqtt_client.py,sha256=ABJLJOckSq9ElkZYLKF64mOEUESgxjW1V6ySZX3de6M,4462
|
|
58
|
+
isar/services/service_connections/mqtt/robot_heartbeat_publisher.py,sha256=SKPvY2QwBxqnhL9aGuZQDGQ8F_NDqPtQI5bzRBIUxkQ,1203
|
|
59
59
|
isar/services/service_connections/mqtt/robot_info_publisher.py,sha256=AxokGk51hRPTxxD2r0P9braPJCMrf1InaCxrUBKkF4g,1402
|
|
60
60
|
isar/services/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
isar/services/utilities/robot_utilities.py,sha256=4zCigsLXfqDC8POHchktSq81zr1_pTaRve_LQsVr6Mk,514
|
|
62
|
-
isar/services/utilities/scheduling_utilities.py,sha256=
|
|
62
|
+
isar/services/utilities/scheduling_utilities.py,sha256=6t42uyHXRr8QtRU6qH_EzYKlvwXEAUCwe7U5IDUp4nc,13502
|
|
63
63
|
isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
|
|
64
64
|
isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
|
-
isar/state_machine/state_machine.py,sha256=
|
|
66
|
-
isar/state_machine/states_enum.py,sha256=
|
|
65
|
+
isar/state_machine/state_machine.py,sha256=W2RMBhSRtu5kH0LAuRHbPhxHxtFa0knWfBv7EMRuQcI,18610
|
|
66
|
+
isar/state_machine/states_enum.py,sha256=hBbP87Aw9JiIBScfAkflWgQHYBrLA17ex0XXO4suRYY,555
|
|
67
67
|
isar/state_machine/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
68
|
isar/state_machine/states/await_next_mission.py,sha256=yg0aH4eukcnE1xRKiPVafRxqHt3WdvqD08EATzdEojk,1961
|
|
69
69
|
isar/state_machine/states/blocked_protective_stop.py,sha256=GEOvxnHXjpCsrh3aa8Idtn1zMYv5HLQzj9qQAq8HvaU,1180
|
|
70
|
-
isar/state_machine/states/home.py,sha256=
|
|
70
|
+
isar/state_machine/states/home.py,sha256=718NFxbYQTM5VLKbL8e5ELlbXWYis1GfaZfl34EhfQo,2292
|
|
71
71
|
isar/state_machine/states/intervention_needed.py,sha256=A0QYz1vD1tDKAealihXDuoGuMLtXrRfn_AwFoaUhT_Q,1640
|
|
72
72
|
isar/state_machine/states/monitor.py,sha256=GiNGyPcskrv3QDxMfsOmHUe_MRCaNA-pYuk9p6kcKp0,4623
|
|
73
73
|
isar/state_machine/states/offline.py,sha256=5wdNzC1wG0cWrpuT_r_mk8UNFHA4QSyg8ejXUTAg4Io,1137
|
|
74
|
-
isar/state_machine/states/paused.py,sha256=
|
|
74
|
+
isar/state_machine/states/paused.py,sha256=OruA2oPGWsVjnQ8xxVJJsGO3xKzXz2xF5uWsrvH27Ng,2101
|
|
75
75
|
isar/state_machine/states/recharging.py,sha256=ni5WqFU0VDhdGC3ZfHcabSICm_5kwaS72wc3ecAB_os,1651
|
|
76
|
-
isar/state_machine/states/
|
|
77
|
-
isar/state_machine/states/
|
|
78
|
-
isar/state_machine/states/stopping.py,sha256=
|
|
76
|
+
isar/state_machine/states/return_home_paused.py,sha256=nVfNqutEG251NCk18UqIerh0SdAgGsXMXBt5iT2oRK0,2711
|
|
77
|
+
isar/state_machine/states/returning_home.py,sha256=75pfHNCjpV4jfhcmNAoabTwBzed1_-aFJE_KkTUTAnA,4513
|
|
78
|
+
isar/state_machine/states/stopping.py,sha256=h0x94hVoIUJyml3WMrbJlbxG2dzMCeOL1rJoNCQfzGQ,3057
|
|
79
|
+
isar/state_machine/states/stopping_return_home.py,sha256=ub952Ulas3a0lsV_dI4liBiInADo3zaPAGod2bPe_18,2985
|
|
79
80
|
isar/state_machine/states/unknown_status.py,sha256=Y-g9cgme5zriyZ6YUzFRYhOvv9ZylCSwfaY8MJ7xEJ0,1791
|
|
80
|
-
isar/state_machine/transitions/mission.py,sha256=
|
|
81
|
-
isar/state_machine/transitions/return_home.py,sha256=
|
|
82
|
-
isar/state_machine/transitions/robot_status.py,sha256=
|
|
81
|
+
isar/state_machine/transitions/mission.py,sha256=W56bs4jSFwH2K4yAwxzLWh7dDuLi8j-L4mVvmfeKjWw,6313
|
|
82
|
+
isar/state_machine/transitions/return_home.py,sha256=9fXFVozsCZqtKjQwiPLLc3ExrgLj5zU9AD7a9IMe0Pw,4348
|
|
83
|
+
isar/state_machine/transitions/robot_status.py,sha256=qJMurCpuficOiXs9us4lZJ5p_kOFSwKxJigiXfB1OS8,2430
|
|
83
84
|
isar/state_machine/transitions/functions/fail_mission.py,sha256=jHHXhfQVYQEzCXgTEhv5e6uEK9p6iDPFFXqS9bzs_-A,720
|
|
84
85
|
isar/state_machine/transitions/functions/finish_mission.py,sha256=TRQrk7HdllmAkwsp25HRZAFAk46Y1hLx3jmkIAKrHDI,1442
|
|
85
|
-
isar/state_machine/transitions/functions/pause.py,sha256=
|
|
86
|
+
isar/state_machine/transitions/functions/pause.py,sha256=R4Bbb-XcmcCwGiY3-lsYiK-WAz2KfVj4kM_pzE8OFyg,3472
|
|
86
87
|
isar/state_machine/transitions/functions/resume.py,sha256=SAu4hWomPlrvO0lnpc6uM3rj79Bwq01acnaTEvNbO9U,2116
|
|
87
88
|
isar/state_machine/transitions/functions/return_home.py,sha256=5WPO40MtuRKm9-NtyrS6m0IVEit14MXfMKjgZ2sCXRU,1666
|
|
88
|
-
isar/state_machine/transitions/functions/robot_status.py,sha256=
|
|
89
|
+
isar/state_machine/transitions/functions/robot_status.py,sha256=2P3EfP2c06GY-LUquyBTyHn1Ard31Hl3UeT-e-VaIWE,768
|
|
89
90
|
isar/state_machine/transitions/functions/start_mission.py,sha256=tIpZzYXCoeC6ZWj18UB4DiZuICpxfzFUK23wfunad7Q,2864
|
|
90
91
|
isar/state_machine/transitions/functions/stop.py,sha256=4idsNh7v6CRJivD36oKnVmdKlP7mSugTLCh9n12R1-U,2114
|
|
91
92
|
isar/state_machine/transitions/functions/utils.py,sha256=Wa72Ocq4QT1E6qkpEJZQ3h5o33pGvx7Tlkt2JZ2Grbk,314
|
|
92
93
|
isar/state_machine/utils/common_event_handlers.py,sha256=yFZzTmTLVWzHU4RNW3q9gc6NU9eajNn50L-vt6geH38,6318
|
|
93
94
|
isar/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
|
-
isar/storage/blob_storage.py,sha256=
|
|
95
|
-
isar/storage/local_storage.py,sha256
|
|
96
|
-
isar/storage/storage_interface.py,sha256=
|
|
97
|
-
isar/storage/uploader.py,sha256=
|
|
95
|
+
isar/storage/blob_storage.py,sha256=d44z3XpZDUbiKwN8Av2gytTJxnefMXrp5VhiGm4PWxU,3703
|
|
96
|
+
isar/storage/local_storage.py,sha256=Rn-iiiz9DI7PzIhevOMshPIaqzJaqBXeVJMQRhVSl2M,2191
|
|
97
|
+
isar/storage/storage_interface.py,sha256=x-imVeQTdL6dCaTaPTHpXwCR6N4e27WxK_Vpumg0x-Y,1230
|
|
98
|
+
isar/storage/uploader.py,sha256=HurLZb4MbZYRRocsJimoUrP3UHrE7wiO0IfIpKBSHrw,9988
|
|
98
99
|
isar/storage/utilities.py,sha256=oLH0Rp7UtrQQdilfITnmXO1Z0ExdeDhBImYHid55vBA,3449
|
|
99
|
-
isar-1.33.
|
|
100
|
+
isar-1.33.3.dist-info/licenses/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
|
|
100
101
|
robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
102
|
robot_interface/robot_interface.py,sha256=A6t19lcNU_6AfkYKY5DaF0sheym_SZEAawbfaj36Kjk,8997
|
|
102
103
|
robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
|
|
@@ -108,20 +109,20 @@ robot_interface/models/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
|
108
109
|
robot_interface/models/inspection/inspection.py,sha256=cjAvekL8r82s7bgukWeXpYylHvJG_oRSCJNISPVCvZg,2238
|
|
109
110
|
robot_interface/models/mission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
111
|
robot_interface/models/mission/mission.py,sha256=MQ9p5cuclLXexaZu9bkDh5-aN99eunvYC0vP-Z_kUwI,960
|
|
111
|
-
robot_interface/models/mission/status.py,sha256=
|
|
112
|
+
robot_interface/models/mission/status.py,sha256=e5Yr-GSV_CNSOV9MH2TQP4H_WbSG-z8Ty0JKkYFbZKA,856
|
|
112
113
|
robot_interface/models/mission/task.py,sha256=YzaqJ_KIIm-3S2Y2-BG4Pdkc8sjFMzMx5jj8FtXSmFg,4744
|
|
113
114
|
robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
115
|
robot_interface/models/robots/battery_state.py,sha256=ktOtJ8ltdK0k_i7BoqYfhc5dbOzIG6Oo-uWC67fCWio,98
|
|
115
116
|
robot_interface/models/robots/media.py,sha256=8A-CuuubfngzPprs6zWB9hSaqe3jzgsE8rcCzRX2Uto,227
|
|
116
117
|
robot_interface/models/robots/robot_model.py,sha256=-0jNKWPcEgtF_2klb1It3u0SCoAR0hSW9nce58Zq0Co,417
|
|
117
118
|
robot_interface/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
118
|
-
robot_interface/telemetry/mqtt_client.py,sha256=
|
|
119
|
-
robot_interface/telemetry/payloads.py,sha256=
|
|
119
|
+
robot_interface/telemetry/mqtt_client.py,sha256=0P1S9mWdJcByGoSOwwn2NPQr9I-OX4b1VPbrIYOU-Zo,4334
|
|
120
|
+
robot_interface/telemetry/payloads.py,sha256=RfLlm_te-bV_xcLtbBx27bgE8gkwPAhWBTF9JrxY7f8,3209
|
|
120
121
|
robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
|
-
robot_interface/utilities/json_service.py,sha256=
|
|
122
|
+
robot_interface/utilities/json_service.py,sha256=9N1zijW7K4d3WFR2autpaS8U9o1ibymiOX-6stTKCyk,1243
|
|
122
123
|
robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
|
|
123
|
-
isar-1.33.
|
|
124
|
-
isar-1.33.
|
|
125
|
-
isar-1.33.
|
|
126
|
-
isar-1.33.
|
|
127
|
-
isar-1.33.
|
|
124
|
+
isar-1.33.3.dist-info/METADATA,sha256=zwaDNL8KlyrTfG5zP61l0H1Pli0zKRf4V9tCnctVPFI,31190
|
|
125
|
+
isar-1.33.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
126
|
+
isar-1.33.3.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
|
|
127
|
+
isar-1.33.3.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
|
|
128
|
+
isar-1.33.3.dist-info/RECORD,,
|
|
@@ -23,10 +23,11 @@ class TaskStatus(str, Enum):
|
|
|
23
23
|
|
|
24
24
|
class RobotStatus(Enum):
|
|
25
25
|
Available = "available"
|
|
26
|
+
ReturnHomePaused = "returnhomepaused"
|
|
27
|
+
Paused = "paused"
|
|
26
28
|
Busy = "busy"
|
|
27
29
|
Home = "home"
|
|
28
30
|
Offline = "offline"
|
|
29
|
-
Blocked = "blocked"
|
|
30
31
|
BlockedProtectiveStop = "blockedprotectivestop"
|
|
31
32
|
ReturningHome = "returninghome"
|
|
32
33
|
InterventionNeeded = "interventionneeded"
|
|
@@ -5,6 +5,10 @@ from datetime import datetime, timezone
|
|
|
5
5
|
from queue import Queue
|
|
6
6
|
from typing import Callable, Tuple
|
|
7
7
|
|
|
8
|
+
from paho.mqtt.packettypes import PacketTypes
|
|
9
|
+
from paho.mqtt.properties import Properties
|
|
10
|
+
|
|
11
|
+
from isar.config.settings import settings
|
|
8
12
|
from robot_interface.models.exceptions.robot_exceptions import (
|
|
9
13
|
RobotTelemetryException,
|
|
10
14
|
RobotTelemetryNoUpdateException,
|
|
@@ -14,10 +18,21 @@ from robot_interface.telemetry.payloads import CloudHealthPayload
|
|
|
14
18
|
from robot_interface.utilities.json_service import EnhancedJSONEncoder
|
|
15
19
|
|
|
16
20
|
|
|
21
|
+
def props_expiry(seconds: int) -> Properties:
|
|
22
|
+
p = Properties(PacketTypes.PUBLISH)
|
|
23
|
+
p.MessageExpiryInterval = seconds
|
|
24
|
+
return p
|
|
25
|
+
|
|
26
|
+
|
|
17
27
|
class MqttClientInterface(metaclass=ABCMeta):
|
|
18
28
|
@abstractmethod
|
|
19
29
|
def publish(
|
|
20
|
-
self,
|
|
30
|
+
self,
|
|
31
|
+
topic: str,
|
|
32
|
+
payload: str,
|
|
33
|
+
qos: int = 0,
|
|
34
|
+
retain: bool = False,
|
|
35
|
+
properties: Properties = None,
|
|
21
36
|
) -> None:
|
|
22
37
|
"""
|
|
23
38
|
Parameters
|
|
@@ -42,9 +57,20 @@ class MqttPublisher(MqttClientInterface):
|
|
|
42
57
|
self.mqtt_queue: Queue = mqtt_queue
|
|
43
58
|
|
|
44
59
|
def publish(
|
|
45
|
-
self,
|
|
60
|
+
self,
|
|
61
|
+
topic: str,
|
|
62
|
+
payload: str,
|
|
63
|
+
qos: int = 0,
|
|
64
|
+
retain: bool = False,
|
|
65
|
+
properties: Properties = None,
|
|
46
66
|
) -> None:
|
|
47
|
-
queue_message: Tuple[str, str, int, bool] = (
|
|
67
|
+
queue_message: Tuple[str, str, int, bool, Properties] = (
|
|
68
|
+
topic,
|
|
69
|
+
payload,
|
|
70
|
+
qos,
|
|
71
|
+
retain,
|
|
72
|
+
properties,
|
|
73
|
+
)
|
|
48
74
|
self.mqtt_queue.put(queue_message)
|
|
49
75
|
|
|
50
76
|
|
|
@@ -57,6 +83,7 @@ class MqttTelemetryPublisher(MqttClientInterface):
|
|
|
57
83
|
interval: float,
|
|
58
84
|
qos: int = 0,
|
|
59
85
|
retain: bool = False,
|
|
86
|
+
properties: Properties = None,
|
|
60
87
|
) -> None:
|
|
61
88
|
self.mqtt_queue: Queue = mqtt_queue
|
|
62
89
|
self.telemetry_method: Callable = telemetry_method
|
|
@@ -64,9 +91,13 @@ class MqttTelemetryPublisher(MqttClientInterface):
|
|
|
64
91
|
self.interval: float = interval
|
|
65
92
|
self.qos: int = qos
|
|
66
93
|
self.retain: bool = retain
|
|
94
|
+
self.properties: Properties = properties
|
|
67
95
|
|
|
68
96
|
def run(self, isar_id: str, robot_name: str) -> None:
|
|
69
97
|
self.cloud_health_topic: str = f"isar/{isar_id}/cloud_health"
|
|
98
|
+
self.battery_topic: str = f"isar/{isar_id}/battery"
|
|
99
|
+
self.pose_topic: str = f"isar/{isar_id}/pose"
|
|
100
|
+
self.pressure_topic: str = f"isar/{isar_id}/pressure"
|
|
70
101
|
topic: str
|
|
71
102
|
payload: str
|
|
72
103
|
|
|
@@ -84,12 +115,37 @@ class MqttTelemetryPublisher(MqttClientInterface):
|
|
|
84
115
|
)
|
|
85
116
|
topic = self.cloud_health_topic
|
|
86
117
|
|
|
87
|
-
|
|
118
|
+
publish_properties = self.properties
|
|
119
|
+
|
|
120
|
+
if topic in (
|
|
121
|
+
self.battery_topic,
|
|
122
|
+
self.pose_topic,
|
|
123
|
+
self.pressure_topic,
|
|
124
|
+
):
|
|
125
|
+
publish_properties = props_expiry(settings.MQTT_TELEMETRY_EXPIRY)
|
|
88
126
|
|
|
127
|
+
self.publish(
|
|
128
|
+
topic=topic,
|
|
129
|
+
payload=payload,
|
|
130
|
+
qos=self.qos,
|
|
131
|
+
retain=self.retain,
|
|
132
|
+
properties=publish_properties,
|
|
133
|
+
)
|
|
89
134
|
time.sleep(self.interval)
|
|
90
135
|
|
|
91
136
|
def publish(
|
|
92
|
-
self,
|
|
137
|
+
self,
|
|
138
|
+
topic: str,
|
|
139
|
+
payload: str,
|
|
140
|
+
qos: int = 0,
|
|
141
|
+
retain: bool = False,
|
|
142
|
+
properties: Properties = None,
|
|
93
143
|
) -> None:
|
|
94
|
-
queue_message: Tuple[str, str, int, bool] = (
|
|
144
|
+
queue_message: Tuple[str, str, int, bool, Properties] = (
|
|
145
|
+
topic,
|
|
146
|
+
payload,
|
|
147
|
+
qos,
|
|
148
|
+
retain,
|
|
149
|
+
properties,
|
|
150
|
+
)
|
|
95
151
|
self.mqtt_queue.put(queue_message)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import List, Optional
|
|
3
|
+
from typing import List, Optional
|
|
4
4
|
|
|
5
5
|
from alitra import Pose
|
|
6
6
|
|
|
7
|
+
from isar.storage.storage_interface import BlobStoragePath
|
|
7
8
|
from robot_interface.models.exceptions.robot_exceptions import ErrorReason
|
|
8
9
|
from robot_interface.models.mission.status import MissionStatus, RobotStatus, TaskStatus
|
|
9
10
|
from robot_interface.models.mission.task import TaskTypes
|
|
@@ -119,7 +120,8 @@ class InspectionResultPayload:
|
|
|
119
120
|
isar_id: str
|
|
120
121
|
robot_name: str
|
|
121
122
|
inspection_id: str
|
|
122
|
-
|
|
123
|
+
blob_storage_data_path: BlobStoragePath
|
|
124
|
+
blob_storage_metadata_path: BlobStoragePath
|
|
123
125
|
installation_code: str
|
|
124
126
|
tag_id: Optional[str]
|
|
125
127
|
inspection_type: Optional[str]
|
|
@@ -7,6 +7,7 @@ from uuid import UUID
|
|
|
7
7
|
|
|
8
8
|
import numpy as np
|
|
9
9
|
from alitra import Orientation
|
|
10
|
+
from pydantic import BaseModel
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class EnhancedJSONEncoder(json.JSONEncoder):
|
|
@@ -15,6 +16,11 @@ class EnhancedJSONEncoder(json.JSONEncoder):
|
|
|
15
16
|
"""
|
|
16
17
|
|
|
17
18
|
def default(self, o):
|
|
19
|
+
if isinstance(o, BaseModel):
|
|
20
|
+
dump = getattr(o, "model_dump", None)
|
|
21
|
+
if callable(dump):
|
|
22
|
+
return dump()
|
|
23
|
+
return o.__dict__
|
|
18
24
|
if is_dataclass(o):
|
|
19
25
|
return asdict(o) # type: ignore
|
|
20
26
|
if isinstance(o, UUID):
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, List
|
|
2
|
-
|
|
3
|
-
from isar.eventhandlers.eventhandler import EventHandlerBase, EventHandlerMapping
|
|
4
|
-
from isar.state_machine.utils.common_event_handlers import (
|
|
5
|
-
return_home_event_handler,
|
|
6
|
-
robot_status_event_handler,
|
|
7
|
-
start_mission_event_handler,
|
|
8
|
-
stop_mission_event_handler,
|
|
9
|
-
)
|
|
10
|
-
from robot_interface.models.mission.status import RobotStatus
|
|
11
|
-
|
|
12
|
-
if TYPE_CHECKING:
|
|
13
|
-
from isar.state_machine.state_machine import StateMachine
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class RobotStandingStill(EventHandlerBase):
|
|
17
|
-
|
|
18
|
-
def __init__(self, state_machine: "StateMachine"):
|
|
19
|
-
events = state_machine.events
|
|
20
|
-
shared_state = state_machine.shared_state
|
|
21
|
-
|
|
22
|
-
event_handlers: List[EventHandlerMapping] = [
|
|
23
|
-
EventHandlerMapping(
|
|
24
|
-
name="start_mission_event",
|
|
25
|
-
event=events.api_requests.start_mission.request,
|
|
26
|
-
handler=lambda event: start_mission_event_handler(
|
|
27
|
-
state_machine, event, events.api_requests.start_mission.response
|
|
28
|
-
),
|
|
29
|
-
),
|
|
30
|
-
EventHandlerMapping(
|
|
31
|
-
name="return_home_event",
|
|
32
|
-
event=events.api_requests.return_home.request,
|
|
33
|
-
handler=lambda event: return_home_event_handler(state_machine, event),
|
|
34
|
-
),
|
|
35
|
-
EventHandlerMapping(
|
|
36
|
-
name="stop_mission_event",
|
|
37
|
-
event=events.api_requests.return_home.request,
|
|
38
|
-
handler=lambda event: stop_mission_event_handler(state_machine, event),
|
|
39
|
-
),
|
|
40
|
-
EventHandlerMapping(
|
|
41
|
-
name="robot_status_event",
|
|
42
|
-
event=shared_state.robot_status,
|
|
43
|
-
handler=lambda event: robot_status_event_handler(
|
|
44
|
-
state_machine, RobotStatus.Available, event
|
|
45
|
-
),
|
|
46
|
-
),
|
|
47
|
-
]
|
|
48
|
-
super().__init__(
|
|
49
|
-
state_name="robot_standing_still",
|
|
50
|
-
state_machine=state_machine,
|
|
51
|
-
event_handler_mappings=event_handlers,
|
|
52
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|