isar 1.24.5__py3-none-any.whl → 1.25.0__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/models/models.py +1 -0
- isar/apis/models/start_mission_definition.py +73 -123
- isar/apis/schedule/scheduling_controller.py +27 -9
- isar/config/certs/ca-cert.pem +26 -26
- isar/config/predefined_missions/default.json +12 -11
- isar/config/predefined_missions/default_turtlebot.json +17 -16
- isar/mission_planner/local_planner.py +6 -20
- isar/mission_planner/mission_planner_interface.py +1 -1
- isar/script.py +5 -4
- isar/state_machine/state_machine.py +4 -4
- isar/state_machine/states/idle.py +9 -7
- isar/state_machine/states/monitor.py +11 -3
- isar/storage/slimm_storage.py +4 -1
- isar/storage/utilities.py +3 -4
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/METADATA +1 -1
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/RECORD +24 -26
- robot_interface/models/inspection/inspection.py +4 -11
- robot_interface/models/mission/mission.py +9 -17
- robot_interface/models/mission/task.py +28 -40
- robot_interface/robot_interface.py +7 -5
- isar/services/readers/__init__.py +0 -0
- isar/services/readers/base_reader.py +0 -37
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/LICENSE +0 -0
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/WHEEL +0 -0
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/entry_points.txt +0 -0
- {isar-1.24.5.dist-info → isar-1.25.0.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import logging
|
|
2
3
|
from pathlib import Path
|
|
3
|
-
from typing import List, Optional
|
|
4
4
|
|
|
5
|
-
from alitra import Frame
|
|
6
5
|
from injector import inject
|
|
7
6
|
|
|
8
7
|
from isar.config.settings import settings
|
|
@@ -11,10 +10,8 @@ from isar.mission_planner.mission_planner_interface import (
|
|
|
11
10
|
MissionPlannerError,
|
|
12
11
|
MissionPlannerInterface,
|
|
13
12
|
)
|
|
14
|
-
from isar.services.readers.base_reader import BaseReader, BaseReaderError
|
|
15
13
|
from robot_interface.models.mission.mission import Mission
|
|
16
14
|
|
|
17
|
-
|
|
18
15
|
logger = logging.getLogger("api")
|
|
19
16
|
|
|
20
17
|
|
|
@@ -39,16 +36,10 @@ class LocalPlanner(MissionPlannerInterface):
|
|
|
39
36
|
|
|
40
37
|
@staticmethod
|
|
41
38
|
def read_mission_from_file(mission_path: Path) -> Mission:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
mission: Mission = BaseReader.dict_to_dataclass(
|
|
45
|
-
dataclass_dict=mission_dict,
|
|
46
|
-
target_dataclass=Mission,
|
|
47
|
-
cast_config=[Frame],
|
|
48
|
-
strict_config=True,
|
|
49
|
-
)
|
|
39
|
+
with open(mission_path) as json_file:
|
|
40
|
+
mission_dict = json.load(json_file)
|
|
50
41
|
|
|
51
|
-
return
|
|
42
|
+
return Mission(**mission_dict)
|
|
52
43
|
|
|
53
44
|
def get_predefined_missions(self) -> dict:
|
|
54
45
|
missions: dict = {}
|
|
@@ -57,13 +48,8 @@ class LocalPlanner(MissionPlannerInterface):
|
|
|
57
48
|
for file in json_files:
|
|
58
49
|
mission_name = file.stem
|
|
59
50
|
path_to_file = self.predefined_mission_folder.joinpath(file.name)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
except BaseReaderError as e:
|
|
63
|
-
logger.warning(
|
|
64
|
-
f"Failed to read predefined mission {path_to_file} \n {e}"
|
|
65
|
-
)
|
|
66
|
-
continue
|
|
51
|
+
|
|
52
|
+
mission: Mission = self.read_mission_from_file(path_to_file)
|
|
67
53
|
if mission.id in invalid_mission_ids:
|
|
68
54
|
logger.warning(
|
|
69
55
|
f"Duplicate mission id {mission.id} : {path_to_file.as_posix()}"
|
isar/script.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import sys
|
|
2
3
|
import time
|
|
3
4
|
from logging import Logger
|
|
4
5
|
from threading import Thread
|
|
@@ -20,10 +21,10 @@ from isar.services.service_connections.mqtt.robot_heartbeat_publisher import (
|
|
|
20
21
|
from isar.services.service_connections.mqtt.robot_info_publisher import (
|
|
21
22
|
RobotInfoPublisher,
|
|
22
23
|
)
|
|
23
|
-
from robot_interface.models.inspection.inspection import Inspection
|
|
24
|
-
from robot_interface.models.mission.mission import Mission
|
|
25
24
|
from isar.state_machine.state_machine import StateMachine, main
|
|
26
25
|
from isar.storage.uploader import Uploader
|
|
26
|
+
from robot_interface.models.inspection.inspection import Inspection
|
|
27
|
+
from robot_interface.models.mission.mission import Mission
|
|
27
28
|
from robot_interface.robot_interface import RobotInterface
|
|
28
29
|
|
|
29
30
|
|
|
@@ -81,7 +82,7 @@ def print_startup_info():
|
|
|
81
82
|
print()
|
|
82
83
|
|
|
83
84
|
|
|
84
|
-
def start():
|
|
85
|
+
def start() -> None:
|
|
85
86
|
injector: Injector = get_injector()
|
|
86
87
|
|
|
87
88
|
keyvault_client = injector.get(Keyvault)
|
|
@@ -168,5 +169,5 @@ def start():
|
|
|
168
169
|
for thread in threads:
|
|
169
170
|
if not thread.is_alive():
|
|
170
171
|
logger.critical("Thread '%s' failed - ISAR shutting down", thread.name)
|
|
171
|
-
exit(1)
|
|
172
|
+
sys.exit(1)
|
|
172
173
|
time.sleep(state_machine.sleep_time)
|
|
@@ -33,7 +33,7 @@ from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
|
33
33
|
from robot_interface.models.initialize.initialize_params import InitializeParams
|
|
34
34
|
from robot_interface.models.mission.mission import Mission
|
|
35
35
|
from robot_interface.models.mission.status import MissionStatus, RobotStatus, TaskStatus
|
|
36
|
-
from robot_interface.models.mission.task import TASKS
|
|
36
|
+
from robot_interface.models.mission.task import TASKS
|
|
37
37
|
from robot_interface.robot_interface import RobotInterface
|
|
38
38
|
from robot_interface.telemetry.mqtt_client import MqttClientInterface
|
|
39
39
|
from robot_interface.utilities.json_service import EnhancedJSONEncoder
|
|
@@ -324,7 +324,7 @@ class StateMachine(object):
|
|
|
324
324
|
self.current_mission.status = MissionStatus.InProgress
|
|
325
325
|
self.publish_mission_status()
|
|
326
326
|
self.current_task = self.task_selector.next_task()
|
|
327
|
-
if self.current_task
|
|
327
|
+
if self.current_task is None:
|
|
328
328
|
self._mission_finished()
|
|
329
329
|
else:
|
|
330
330
|
self.current_task.status = TaskStatus.InProgress
|
|
@@ -412,7 +412,7 @@ class StateMachine(object):
|
|
|
412
412
|
Transitions into idle state.
|
|
413
413
|
|
|
414
414
|
"""
|
|
415
|
-
self.to_idle()
|
|
415
|
+
self.to_idle() # type: ignore
|
|
416
416
|
|
|
417
417
|
def iterate_current_task(self):
|
|
418
418
|
if self.current_task.is_finished():
|
|
@@ -426,7 +426,7 @@ class StateMachine(object):
|
|
|
426
426
|
|
|
427
427
|
def update_state(self):
|
|
428
428
|
"""Updates the current state of the state machine."""
|
|
429
|
-
self.current_state = States(self.state)
|
|
429
|
+
self.current_state = States(self.state) # type: ignore
|
|
430
430
|
self.send_state_status()
|
|
431
431
|
self._log_state_transition(self.current_state)
|
|
432
432
|
self.logger.info(f"State: {self.current_state}")
|
|
@@ -34,6 +34,14 @@ class Idle(State):
|
|
|
34
34
|
self.robot_status_thread.wait_for_thread()
|
|
35
35
|
self.robot_status_thread = None
|
|
36
36
|
|
|
37
|
+
def _is_ready_to_poll_for_status(self) -> bool:
|
|
38
|
+
time_since_last_robot_status_poll = (
|
|
39
|
+
time.time() - self.last_robot_status_poll_time
|
|
40
|
+
)
|
|
41
|
+
return (
|
|
42
|
+
time_since_last_robot_status_poll > settings.ROBOT_API_STATUS_POLL_INTERVAL
|
|
43
|
+
)
|
|
44
|
+
|
|
37
45
|
def _run(self) -> None:
|
|
38
46
|
while True:
|
|
39
47
|
if self.state_machine.should_stop_mission():
|
|
@@ -51,13 +59,7 @@ class Idle(State):
|
|
|
51
59
|
break
|
|
52
60
|
time.sleep(self.state_machine.sleep_time)
|
|
53
61
|
|
|
54
|
-
|
|
55
|
-
time.time() - self.last_robot_status_poll_time
|
|
56
|
-
)
|
|
57
|
-
if (
|
|
58
|
-
time_from_last_robot_status_poll
|
|
59
|
-
< settings.ROBOT_API_STATUS_POLL_INTERVAL
|
|
60
|
-
):
|
|
62
|
+
if not self._is_ready_to_poll_for_status():
|
|
61
63
|
continue
|
|
62
64
|
|
|
63
65
|
if not self.robot_status_thread:
|
|
@@ -13,11 +13,11 @@ from isar.services.utilities.threaded_request import (
|
|
|
13
13
|
)
|
|
14
14
|
from robot_interface.models.exceptions.robot_exceptions import (
|
|
15
15
|
ErrorMessage,
|
|
16
|
+
RobotCommunicationException,
|
|
16
17
|
RobotCommunicationTimeoutException,
|
|
17
18
|
RobotException,
|
|
18
19
|
RobotRetrieveInspectionException,
|
|
19
20
|
RobotTaskStatusException,
|
|
20
|
-
RobotCommunicationException,
|
|
21
21
|
)
|
|
22
22
|
from robot_interface.models.inspection.inspection import Inspection
|
|
23
23
|
from robot_interface.models.mission.mission import Mission
|
|
@@ -173,6 +173,12 @@ class Monitor(State):
|
|
|
173
173
|
inspection: Inspection = self.state_machine.robot.get_inspection(
|
|
174
174
|
task=current_task
|
|
175
175
|
)
|
|
176
|
+
if current_task.inspection_id == inspection.id:
|
|
177
|
+
self.logger.warning(
|
|
178
|
+
f"The inspection_id of task ({current_task.inspection_id}) "
|
|
179
|
+
f"and result ({inspection.id}) is not matching. "
|
|
180
|
+
f"This may lead to confusions when accessing the inspection later"
|
|
181
|
+
)
|
|
176
182
|
|
|
177
183
|
except (RobotRetrieveInspectionException, RobotException) as e:
|
|
178
184
|
self._set_error_message(e)
|
|
@@ -183,7 +189,7 @@ class Monitor(State):
|
|
|
183
189
|
|
|
184
190
|
if not inspection:
|
|
185
191
|
self.logger.warning(
|
|
186
|
-
f"No inspection data retrieved for task {str(current_task.id)[:8]}"
|
|
192
|
+
f"No inspection result data retrieved for task {str(current_task.id)[:8]}"
|
|
187
193
|
)
|
|
188
194
|
|
|
189
195
|
inspection.metadata.tag_id = current_task.tag_id
|
|
@@ -193,7 +199,9 @@ class Monitor(State):
|
|
|
193
199
|
mission,
|
|
194
200
|
)
|
|
195
201
|
self.state_machine.queues.upload_queue.put(message)
|
|
196
|
-
self.logger.info(
|
|
202
|
+
self.logger.info(
|
|
203
|
+
f"Inspection result: {str(inspection.id)[:8]} queued for upload"
|
|
204
|
+
)
|
|
197
205
|
|
|
198
206
|
def _report_task_status(self, task: Task) -> None:
|
|
199
207
|
self.request_status_failure_counter = 0
|
isar/storage/slimm_storage.py
CHANGED
|
@@ -71,7 +71,10 @@ class SlimmStorage(StorageInterface):
|
|
|
71
71
|
return inspection_path
|
|
72
72
|
|
|
73
73
|
def _ingest(
|
|
74
|
-
self,
|
|
74
|
+
self,
|
|
75
|
+
inspection: Inspection,
|
|
76
|
+
multiform_body: MultipartEncoder,
|
|
77
|
+
request_url: str,
|
|
75
78
|
) -> str:
|
|
76
79
|
token: str = self.credentials.get_token(self.request_scope).token
|
|
77
80
|
try:
|
isar/storage/utilities.py
CHANGED
|
@@ -34,10 +34,11 @@ def construct_metadata_file(
|
|
|
34
34
|
"plant_code": settings.PLANT_CODE,
|
|
35
35
|
"media_orientation_reference_system": settings.MEDIA_ORIENTATION_REFERENCE_SYSTEM, # noqa: E501
|
|
36
36
|
"additional_meta": {
|
|
37
|
+
"inspection_id": inspection.id,
|
|
37
38
|
"mission_id": mission.id,
|
|
38
39
|
"mission_name": mission.name,
|
|
39
|
-
"plant_name": settings.PLANT_NAME,
|
|
40
40
|
"mission_date": datetime.now(timezone.utc).date(),
|
|
41
|
+
"plant_name": settings.PLANT_NAME,
|
|
41
42
|
"isar_id": settings.ISAR_ID,
|
|
42
43
|
"robot_name": settings.ROBOT_NAME,
|
|
43
44
|
"analysis_type": (
|
|
@@ -69,9 +70,7 @@ def construct_metadata_file(
|
|
|
69
70
|
return json.dumps(data, cls=EnhancedJSONEncoder, indent=4).encode()
|
|
70
71
|
|
|
71
72
|
|
|
72
|
-
def get_filename(
|
|
73
|
-
inspection: Inspection,
|
|
74
|
-
) -> str:
|
|
73
|
+
def get_filename(inspection: Inspection) -> str:
|
|
75
74
|
inspection_type: str = type(inspection).__name__
|
|
76
75
|
tag: str = inspection.metadata.tag_id if inspection.metadata.tag_id else "no-tag"
|
|
77
76
|
epoch_time: int = int(time.time())
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
isar/__init__.py,sha256=cH8p8bVveu3FUL6kBhldcSlLaoHgD82Kd0-SwSNfGXw,87
|
|
2
2
|
isar/modules.py,sha256=da1oE79leMID2cQKrVgahFyo-NAqNa_UA0PNHCA3Zt8,7361
|
|
3
|
-
isar/script.py,sha256=
|
|
3
|
+
isar/script.py,sha256=MRC_w1kzWuutE9C7QNVtPhKbsld-uWKiMrcUWufiNzQ,5988
|
|
4
4
|
isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
isar/apis/api.py,sha256=vUy7QbHrKcTHjh2rkU7lqQPkCasI6umha8r6H88JiXE,13942
|
|
6
6
|
isar/apis/models/__init__.py,sha256=NI1BYyN__Ogr00Qqe0XJ-9gEVPva2brXo2RJsbrS4tM,52
|
|
7
|
-
isar/apis/models/models.py,sha256=
|
|
8
|
-
isar/apis/models/start_mission_definition.py,sha256=
|
|
7
|
+
isar/apis/models/models.py,sha256=HzLaWhjAv0uJRBWipIgYg_F75eaQ5jl9Pi4UnYbDJ-M,1749
|
|
8
|
+
isar/apis/models/start_mission_definition.py,sha256=6bR3xMeWQ1B3MIIOq4vadI9jB3MEVTidabjHp8Ajmhs,6287
|
|
9
9
|
isar/apis/robot_control/robot_controller.py,sha256=en6j-dHIxUXraREz7JETqtxgHl79ks7TBgBwPKc6VQE,1019
|
|
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=JvuioSWmJohiCqfGSCDvOq-CK2Y7ACHfXLfH-UhVQJ8,11371
|
|
12
12
|
isar/apis/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
isar/apis/security/authentication.py,sha256=TI8U9Y_L6ihHLMeM50ZONd5EPfuHdw_XMU_Q987W4AY,1975
|
|
14
14
|
isar/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -17,7 +17,7 @@ isar/config/log.py,sha256=zHFLmGWQRn8TrcsxUS6KHpJt2JE86kYazU7b-bkcN9o,2285
|
|
|
17
17
|
isar/config/logging.conf,sha256=mYO1xf27gAopEMHhGzY7-mwyfN16rwRLkPNMvy3zn2g,1127
|
|
18
18
|
isar/config/settings.env,sha256=hJFfyl4S84nmcyf70Pz8nbGlPf4KTVx0UkgP3uf6T8E,534
|
|
19
19
|
isar/config/settings.py,sha256=lbpuXAyeSCHFcEuIQvbqwyJIOp23Rtdqpajf_HrUjbU,13491
|
|
20
|
-
isar/config/certs/ca-cert.pem,sha256=
|
|
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
|
|
23
23
|
isar/config/keyvault/keyvault_service.py,sha256=TEAJv5RlWnYvy-n9keivdATDafdTQDj4QY8Aw3SEKoU,3124
|
|
@@ -33,11 +33,11 @@ isar/config/predefined_mission_definition/default_exr.json,sha256=L3-kqjfgXoULDU
|
|
|
33
33
|
isar/config/predefined_mission_definition/default_mission.json,sha256=nEk1ql17RAs2I5Ws2wA-0GJ6oqJco-Q0Q0vhf4k6ajc,2926
|
|
34
34
|
isar/config/predefined_mission_definition/default_turtlebot.json,sha256=Ka379MLu8qiGIa6Fu-8p8A4OgHVccLkKYSX0RthUOeI,4060
|
|
35
35
|
isar/config/predefined_missions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
isar/config/predefined_missions/default.json,sha256=
|
|
37
|
-
isar/config/predefined_missions/default_turtlebot.json,sha256=
|
|
36
|
+
isar/config/predefined_missions/default.json,sha256=EDMfPQi2D_517jlfeU2BBFySkbvhYG7uEK6cbiK7DRM,1464
|
|
37
|
+
isar/config/predefined_missions/default_turtlebot.json,sha256=8Vk1_0P0BBsG0vwh4vwIYINiiWioErHZ0Ppjq3ctaPM,2143
|
|
38
38
|
isar/mission_planner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
isar/mission_planner/local_planner.py,sha256=
|
|
40
|
-
isar/mission_planner/mission_planner_interface.py,sha256=
|
|
39
|
+
isar/mission_planner/local_planner.py,sha256=45zVP3hzUHdZ5Ty4KWRL85_AUWiTmBhTtlsAruUDMD4,2561
|
|
40
|
+
isar/mission_planner/mission_planner_interface.py,sha256=UgpPIM4FbrWOD7fGY3Ul64k3uYb8wo0FwSWGewYoVbc,485
|
|
41
41
|
isar/mission_planner/sequential_task_selector.py,sha256=lzBPV97wGBfqwpEh4l_7qhijx56yQtOmIM9DhIMOGFY,649
|
|
42
42
|
isar/mission_planner/task_selector_interface.py,sha256=mzZEQfvU9BLCo_pu3fXXuYIjwjdjcr0vJ2pUCtFsr68,713
|
|
43
43
|
isar/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -52,8 +52,6 @@ isar/models/mission_metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
52
52
|
isar/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
isar/services/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
isar/services/auth/azure_credentials.py,sha256=9PlwGe5FrPRbW2dp0go7LMp8_l_FRvL8xOXotXwzRDo,364
|
|
55
|
-
isar/services/readers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
-
isar/services/readers/base_reader.py,sha256=_fNd5fb5dFeMtOvfWzIAGO-KIgl3zT19iEuzSjeZNPc,987
|
|
57
55
|
isar/services/service_connections/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
56
|
isar/services/service_connections/request_handler.py,sha256=0LxC0lu_HXeEf_xmJWjfEsh14oAUI97cpG1IWtBlcs4,4278
|
|
59
57
|
isar/services/service_connections/mqtt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -67,13 +65,13 @@ isar/services/utilities/robot_utilities.py,sha256=4-ob4kcIiRN_GXFDBMwBadfbwpYqKE
|
|
|
67
65
|
isar/services/utilities/scheduling_utilities.py,sha256=UUMxhudY2mQRG6Edjq6BG7oxwlqmcu5h6fMyw4Vhl_o,8376
|
|
68
66
|
isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
|
|
69
67
|
isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
-
isar/state_machine/state_machine.py,sha256=
|
|
68
|
+
isar/state_machine/state_machine.py,sha256=9QO1g-uAI6jYuKq9e7a9CoDRAQHNJ-crZ9NuTnaS_wU,21788
|
|
71
69
|
isar/state_machine/states_enum.py,sha256=BlrUcBWkM5K6D_UZXRwTaUgGpAagWmVZH6HhDBGzVU4,278
|
|
72
70
|
isar/state_machine/states/__init__.py,sha256=kErbKPDTwNfCLijvdyN6_AuOqDwR23nu9F0Qovsnir4,218
|
|
73
|
-
isar/state_machine/states/idle.py,sha256=
|
|
71
|
+
isar/state_machine/states/idle.py,sha256=YKTOPVJUTGp-XR3N8FSm1s5ol3zoTmGs0THUMiO5h6A,3298
|
|
74
72
|
isar/state_machine/states/initialize.py,sha256=TVXV5Ps3N4_flM88j9pQiX88kZgLzLwzlJy_6hPbgcA,2359
|
|
75
73
|
isar/state_machine/states/initiate.py,sha256=j1wvSC3zVODgRkKOVsQROiuWkjihSBtwCs5GsoivLvc,5655
|
|
76
|
-
isar/state_machine/states/monitor.py,sha256=
|
|
74
|
+
isar/state_machine/states/monitor.py,sha256=pN52wtrrcrXxz913ZcFEELwaStL-eTZ6IIDiYw6oqe0,10253
|
|
77
75
|
isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
|
|
78
76
|
isar/state_machine/states/offline.py,sha256=IfEZ6-kl6OfJSRT1eKHOey7AU23tKiSHqpwGqclmH_c,2166
|
|
79
77
|
isar/state_machine/states/paused.py,sha256=TIg1iJvAxGUIfzE_qWp0wrq4Ka0a3zEf3GNwIWLIK0M,1177
|
|
@@ -81,12 +79,12 @@ isar/state_machine/states/stop.py,sha256=WVyjhndHcccy7_P9bU7SXyZB3qphsGahdSymagh
|
|
|
81
79
|
isar/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
80
|
isar/storage/blob_storage.py,sha256=8sfG1I23nPyVy6uZOq0O0FycZBjsSDIuAWdCVdVMEeM,3217
|
|
83
81
|
isar/storage/local_storage.py,sha256=Bnmoi5gyN8r-oRh0aHrOdGqaH3JqRScFKMRXYojW5kY,1855
|
|
84
|
-
isar/storage/slimm_storage.py,sha256=
|
|
82
|
+
isar/storage/slimm_storage.py,sha256=iVtc7w_VPFoe0fWyPpI9kjau3C1rn7w2n5EJaqloFIU,8991
|
|
85
83
|
isar/storage/storage_interface.py,sha256=DYDry4I7aZpDHJhsBF6s8zrgokFAc7fdKJKfA8AvL7o,828
|
|
86
84
|
isar/storage/uploader.py,sha256=JBlgaHYdFFUPlkx0eI0HBhP93fr9PIPTaYp6HG0iMeU,6509
|
|
87
|
-
isar/storage/utilities.py,sha256=
|
|
85
|
+
isar/storage/utilities.py,sha256=fitsdQ1ox5gr9fk9VuSk_iTBiEAIS8NZAnHabUZORh0,3173
|
|
88
86
|
robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
|
-
robot_interface/robot_interface.py,sha256=
|
|
87
|
+
robot_interface/robot_interface.py,sha256=KtvWp1MDYgepG3uR9i8pt66zifhaXFl0nInClzL1FG0,9679
|
|
90
88
|
robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
|
|
91
89
|
robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
90
|
robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -94,11 +92,11 @@ robot_interface/models/exceptions/robot_exceptions.py,sha256=7s9X7GaQVhQiTnXLi-a
|
|
|
94
92
|
robot_interface/models/initialize/__init__.py,sha256=rz5neEDr59GDbzzI_FF0DId-C-I-50l113P-h-C_QBY,48
|
|
95
93
|
robot_interface/models/initialize/initialize_params.py,sha256=2eG5Aq5bDKU6tVkaUMAoc46GERBgyaKkqv6yLupdRLc,164
|
|
96
94
|
robot_interface/models/inspection/__init__.py,sha256=14wfuj4XZazrigKD7fL98khFKz-eckIpEgPcYRj40Kg,227
|
|
97
|
-
robot_interface/models/inspection/inspection.py,sha256=
|
|
95
|
+
robot_interface/models/inspection/inspection.py,sha256=nSoKTDPRWnpaJuoKnaE_2EEJ6oH4dQkqEuECcQTvVhI,2059
|
|
98
96
|
robot_interface/models/mission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
|
-
robot_interface/models/mission/mission.py,sha256=
|
|
97
|
+
robot_interface/models/mission/mission.py,sha256=QZBDQiOmpb4C7nNCf1PaCWwpvAc8jrhwHSznOe2YhX8,842
|
|
100
98
|
robot_interface/models/mission/status.py,sha256=C_viZWNTYOncWCdurx7Pko_D9d595QmHuJZBT8YMHUg,724
|
|
101
|
-
robot_interface/models/mission/task.py,sha256=
|
|
99
|
+
robot_interface/models/mission/task.py,sha256=Yhm1T4O9N76i4dcZ8f9CoeIICzK2t4W4YQGSl7FKYAo,4943
|
|
102
100
|
robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
103
101
|
robot_interface/models/robots/media.py,sha256=Bo6XisTND9MOsxvJe6mWtKumFCpX6pbEBzEnAKpoIpU,232
|
|
104
102
|
robot_interface/models/robots/robot_model.py,sha256=pZQsqhn9hh6XE3EjMZhWMzYqg5oJ4CJ4CXeOASKvEf8,452
|
|
@@ -108,9 +106,9 @@ robot_interface/telemetry/payloads.py,sha256=JM5E_IHkZpim_zdwc-w52D7dYFBeP4iO1-x
|
|
|
108
106
|
robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
107
|
robot_interface/utilities/json_service.py,sha256=nU2Q_3P9Fq9hs6F_wtUjWtHfl_g1Siy-yDhXXSKwHwg,1018
|
|
110
108
|
robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
|
|
111
|
-
isar-1.
|
|
112
|
-
isar-1.
|
|
113
|
-
isar-1.
|
|
114
|
-
isar-1.
|
|
115
|
-
isar-1.
|
|
116
|
-
isar-1.
|
|
109
|
+
isar-1.25.0.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
|
|
110
|
+
isar-1.25.0.dist-info/METADATA,sha256=sbku6gFYCKKw9RliJSoVqzwoQpaegt1VBadZZIoguEY,30661
|
|
111
|
+
isar-1.25.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
112
|
+
isar-1.25.0.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
|
|
113
|
+
isar-1.25.0.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
|
|
114
|
+
isar-1.25.0.dist-info/RECORD,,
|
|
@@ -4,8 +4,7 @@ from datetime import datetime
|
|
|
4
4
|
from typing import Optional, Type
|
|
5
5
|
|
|
6
6
|
from alitra import Pose
|
|
7
|
-
|
|
8
|
-
from robot_interface.utilities.uuid_string_factory import uuid4_string
|
|
7
|
+
from pydantic import BaseModel, Field
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
@dataclass
|
|
@@ -43,18 +42,16 @@ class AudioMetadata(InspectionMetadata):
|
|
|
43
42
|
duration: Optional[float] = field(default=None)
|
|
44
43
|
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
class Inspection:
|
|
45
|
+
class Inspection(BaseModel):
|
|
48
46
|
metadata: InspectionMetadata
|
|
49
|
-
id: str =
|
|
50
|
-
data: Optional[bytes] =
|
|
47
|
+
id: str = Field(frozen=True)
|
|
48
|
+
data: Optional[bytes] = Field(default=None, frozen=True)
|
|
51
49
|
|
|
52
50
|
@staticmethod
|
|
53
51
|
def get_metadata_type() -> Type[InspectionMetadata]:
|
|
54
52
|
return InspectionMetadata
|
|
55
53
|
|
|
56
54
|
|
|
57
|
-
@dataclass
|
|
58
55
|
class Image(Inspection):
|
|
59
56
|
metadata: ImageMetadata
|
|
60
57
|
|
|
@@ -63,7 +60,6 @@ class Image(Inspection):
|
|
|
63
60
|
return ImageMetadata
|
|
64
61
|
|
|
65
62
|
|
|
66
|
-
@dataclass
|
|
67
63
|
class ThermalImage(Inspection):
|
|
68
64
|
metadata: ThermalImageMetadata
|
|
69
65
|
|
|
@@ -72,7 +68,6 @@ class ThermalImage(Inspection):
|
|
|
72
68
|
return ThermalImageMetadata
|
|
73
69
|
|
|
74
70
|
|
|
75
|
-
@dataclass
|
|
76
71
|
class Video(Inspection):
|
|
77
72
|
metadata: VideoMetadata
|
|
78
73
|
|
|
@@ -81,7 +76,6 @@ class Video(Inspection):
|
|
|
81
76
|
return VideoMetadata
|
|
82
77
|
|
|
83
78
|
|
|
84
|
-
@dataclass
|
|
85
79
|
class ThermalVideo(Inspection):
|
|
86
80
|
metadata: ThermalVideoMetadata
|
|
87
81
|
|
|
@@ -90,7 +84,6 @@ class ThermalVideo(Inspection):
|
|
|
90
84
|
return ThermalVideoMetadata
|
|
91
85
|
|
|
92
86
|
|
|
93
|
-
@dataclass
|
|
94
87
|
class Audio(Inspection):
|
|
95
88
|
metadata: AudioMetadata
|
|
96
89
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from dataclasses import dataclass, field
|
|
2
1
|
from typing import List, Optional
|
|
3
2
|
|
|
4
3
|
from alitra import Pose
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
5
5
|
|
|
6
6
|
from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
7
7
|
from robot_interface.models.mission.status import MissionStatus
|
|
@@ -9,20 +9,12 @@ from robot_interface.models.mission.task import TASKS
|
|
|
9
9
|
from robot_interface.utilities.uuid_string_factory import uuid4_string
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
tasks: List[TASKS]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
undock: Optional[bool] = None
|
|
12
|
+
class Mission(BaseModel):
|
|
13
|
+
id: str = Field(default_factory=uuid4_string, frozen=True)
|
|
14
|
+
tasks: List[TASKS] = Field(default_factory=list, frozen=True)
|
|
15
|
+
name: str = Field(frozen=True)
|
|
16
|
+
start_pose: Optional[Pose] = Field(default=None, frozen=True)
|
|
17
|
+
dock: bool = Field(default=False, frozen=True)
|
|
18
|
+
undock: bool = Field(default=False, frozen=True)
|
|
20
19
|
status: MissionStatus = MissionStatus.NotStarted
|
|
21
|
-
error_message: Optional[ErrorMessage] =
|
|
22
|
-
|
|
23
|
-
def _set_unique_id(self) -> None:
|
|
24
|
-
self.id: str = uuid4_string()
|
|
25
|
-
|
|
26
|
-
def __post_init__(self) -> None:
|
|
27
|
-
if self.id is None:
|
|
28
|
-
self._set_unique_id()
|
|
20
|
+
error_message: Optional[ErrorMessage] = Field(default=None)
|