isar 1.25.2__py3-none-any.whl → 1.25.4__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/__init__.py +0 -1
- isar/apis/models/start_mission_definition.py +9 -9
- isar/apis/robot_control/robot_controller.py +1 -3
- isar/apis/schedule/scheduling_controller.py +2 -2
- isar/mission_planner/sequential_task_selector.py +1 -1
- isar/mission_planner/task_selector_interface.py +1 -1
- isar/models/communication/queues/__init__.py +0 -4
- isar/models/communication/queues/status_queue.py +2 -2
- isar/modules.py +6 -5
- isar/script.py +1 -1
- isar/services/utilities/scheduling_utilities.py +6 -2
- isar/state_machine/state_machine.py +68 -49
- isar/state_machine/states/__init__.py +0 -8
- isar/state_machine/states/blocked_protective_stop.py +65 -0
- isar/state_machine/states/idle.py +21 -10
- isar/state_machine/states/monitor.py +2 -1
- isar/state_machine/states_enum.py +1 -0
- isar/storage/blob_storage.py +1 -1
- isar/storage/uploader.py +12 -13
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/METADATA +3 -5
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/RECORD +35 -34
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/WHEEL +1 -1
- robot_interface/models/exceptions/robot_exceptions.py +20 -22
- robot_interface/models/initialize/__init__.py +0 -1
- robot_interface/models/inspection/__init__.py +0 -13
- robot_interface/models/mission/status.py +19 -18
- robot_interface/models/mission/task.py +1 -1
- robot_interface/models/robots/battery_state.py +2 -2
- robot_interface/models/robots/media.py +1 -1
- robot_interface/models/robots/robot_model.py +7 -7
- robot_interface/robot_interface.py +1 -1
- robot_interface/telemetry/payloads.py +40 -9
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/LICENSE +0 -0
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/entry_points.txt +0 -0
- {isar-1.25.2.dist-info → isar-1.25.4.dist-info}/top_level.txt +0 -0
isar/apis/models/__init__.py
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .models import InputPose, StartMissionResponse
|
|
@@ -23,18 +23,18 @@ from robot_interface.models.mission.task import (
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class InspectionTypes(str, Enum):
|
|
26
|
-
image
|
|
27
|
-
thermal_image
|
|
28
|
-
video
|
|
29
|
-
thermal_video
|
|
30
|
-
audio
|
|
26
|
+
image = "Image"
|
|
27
|
+
thermal_image = "ThermalImage"
|
|
28
|
+
video = "Video"
|
|
29
|
+
thermal_video = "ThermalVideo"
|
|
30
|
+
audio = "Audio"
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class TaskType(str, Enum):
|
|
34
|
-
Inspection
|
|
35
|
-
Localization
|
|
36
|
-
ReturnToHome
|
|
37
|
-
Dock
|
|
34
|
+
Inspection = "inspection"
|
|
35
|
+
Localization = "localization"
|
|
36
|
+
ReturnToHome = "return_to_home"
|
|
37
|
+
Dock = "dock"
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
class StartMissionInspectionDefinition(BaseModel):
|
|
@@ -2,9 +2,7 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
from injector import inject
|
|
4
4
|
|
|
5
|
-
from isar.apis.models.models import
|
|
6
|
-
RobotInfoResponse,
|
|
7
|
-
)
|
|
5
|
+
from isar.apis.models.models import RobotInfoResponse
|
|
8
6
|
from isar.config.settings import robot_settings, settings
|
|
9
7
|
from isar.services.utilities.robot_utilities import RobotUtilities
|
|
10
8
|
|
|
@@ -6,11 +6,11 @@ from alitra import Pose
|
|
|
6
6
|
from fastapi import Body, HTTPException, Path
|
|
7
7
|
from injector import inject
|
|
8
8
|
|
|
9
|
-
from isar.apis.models import InputPose, StartMissionResponse
|
|
10
9
|
from isar.apis.models.models import (
|
|
11
10
|
ControlMissionResponse,
|
|
12
|
-
RobotInfoResponse,
|
|
13
11
|
TaskResponse,
|
|
12
|
+
InputPose,
|
|
13
|
+
StartMissionResponse,
|
|
14
14
|
)
|
|
15
15
|
from isar.apis.models.start_mission_definition import (
|
|
16
16
|
StartMissionDefinition,
|
|
@@ -4,7 +4,7 @@ from isar.mission_planner.task_selector_interface import (
|
|
|
4
4
|
TaskSelectorInterface,
|
|
5
5
|
TaskSelectorStop,
|
|
6
6
|
)
|
|
7
|
-
from robot_interface.models.mission.task import TASKS
|
|
7
|
+
from robot_interface.models.mission.task import TASKS
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class SequentialTaskSelector(TaskSelectorInterface):
|
isar/modules.py
CHANGED
|
@@ -7,8 +7,8 @@ from typing import Dict, List, Tuple, Union
|
|
|
7
7
|
from injector import Injector, Module, multiprovider, provider, singleton
|
|
8
8
|
|
|
9
9
|
from isar.apis.api import API
|
|
10
|
-
from isar.apis.schedule.scheduling_controller import SchedulingController
|
|
11
10
|
from isar.apis.robot_control.robot_controller import RobotController
|
|
11
|
+
from isar.apis.schedule.scheduling_controller import SchedulingController
|
|
12
12
|
from isar.apis.security.authentication import Authenticator
|
|
13
13
|
from isar.config.keyvault.keyvault_service import Keyvault
|
|
14
14
|
from isar.config.settings import settings
|
|
@@ -18,8 +18,8 @@ from isar.mission_planner.sequential_task_selector import SequentialTaskSelector
|
|
|
18
18
|
from isar.mission_planner.task_selector_interface import TaskSelectorInterface
|
|
19
19
|
from isar.models.communication.queues.queues import Queues
|
|
20
20
|
from isar.services.service_connections.request_handler import RequestHandler
|
|
21
|
-
from isar.services.utilities.scheduling_utilities import SchedulingUtilities
|
|
22
21
|
from isar.services.utilities.robot_utilities import RobotUtilities
|
|
22
|
+
from isar.services.utilities.scheduling_utilities import SchedulingUtilities
|
|
23
23
|
from isar.state_machine.state_machine import StateMachine
|
|
24
24
|
from isar.storage.blob_storage import BlobStorage
|
|
25
25
|
from isar.storage.local_storage import LocalStorage
|
|
@@ -70,9 +70,10 @@ class RobotModule(Module):
|
|
|
70
70
|
@provider
|
|
71
71
|
@singleton
|
|
72
72
|
def provide_robot_interface(self) -> RobotInterface:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
robot_interface: ModuleType = import_module(
|
|
74
|
+
f"{settings.ROBOT_PACKAGE}.robotinterface"
|
|
75
|
+
)
|
|
76
|
+
return robot_interface.Robot() # type: ignore
|
|
76
77
|
|
|
77
78
|
|
|
78
79
|
class QueuesModule(Module):
|
isar/script.py
CHANGED
|
@@ -66,7 +66,7 @@ def print_startup_info():
|
|
|
66
66
|
print_setting(fillchar="-")
|
|
67
67
|
print_setting("Robot package", settings.ROBOT_PACKAGE)
|
|
68
68
|
print_setting("Robot name", settings.ROBOT_NAME)
|
|
69
|
-
print_setting("Run mission
|
|
69
|
+
print_setting("Run mission taskwise", settings.RUN_MISSION_BY_TASK)
|
|
70
70
|
print_setting("Running on port", settings.API_PORT)
|
|
71
71
|
print_setting("Mission planner", settings.MISSION_PLANNER)
|
|
72
72
|
print_setting("Using local storage", settings.STORAGE_LOCAL_ENABLED)
|
|
@@ -17,7 +17,11 @@ from isar.mission_planner.mission_planner_interface import (
|
|
|
17
17
|
MissionPlannerInterface,
|
|
18
18
|
)
|
|
19
19
|
from isar.models.communication.message import StartMissionMessage
|
|
20
|
-
from isar.models.communication.queues import QueueIO
|
|
20
|
+
from isar.models.communication.queues.queue_io import QueueIO
|
|
21
|
+
from isar.models.communication.queues.queues import Queues
|
|
22
|
+
from isar.models.communication.queues.queue_timeout_error import (
|
|
23
|
+
QueueTimeoutError,
|
|
24
|
+
)
|
|
21
25
|
from isar.services.utilities.queue_utilities import QueueUtilities
|
|
22
26
|
from isar.state_machine.states_enum import States
|
|
23
27
|
from robot_interface.models.mission.mission import Mission
|
|
@@ -101,7 +105,7 @@ class SchedulingUtilities:
|
|
|
101
105
|
is_capable: bool = True
|
|
102
106
|
missing_capabilities: Set[str] = set()
|
|
103
107
|
for task in mission.tasks:
|
|
104
|
-
if
|
|
108
|
+
if task.type not in robot_capabilities:
|
|
105
109
|
is_capable = False
|
|
106
110
|
missing_capabilities.add(task.type)
|
|
107
111
|
|
|
@@ -18,16 +18,15 @@ from isar.mission_planner.task_selector_interface import (
|
|
|
18
18
|
)
|
|
19
19
|
from isar.models.communication.message import StartMissionMessage
|
|
20
20
|
from isar.models.communication.queues.queues import Queues
|
|
21
|
-
from isar.state_machine.states import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
21
|
+
from isar.state_machine.states.idle import Idle
|
|
22
|
+
from isar.state_machine.states.initialize import Initialize
|
|
23
|
+
from isar.state_machine.states.initiate import Initiate
|
|
24
|
+
from isar.state_machine.states.monitor import Monitor
|
|
25
|
+
from isar.state_machine.states.off import Off
|
|
26
|
+
from isar.state_machine.states.offline import Offline
|
|
27
|
+
from isar.state_machine.states.blocked_protective_stop import BlockedProtectiveStop
|
|
28
|
+
from isar.state_machine.states.paused import Paused
|
|
29
|
+
from isar.state_machine.states.stop import Stop
|
|
31
30
|
from isar.state_machine.states_enum import States
|
|
32
31
|
from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
33
32
|
from robot_interface.models.initialize.initialize_params import InitializeParams
|
|
@@ -36,6 +35,11 @@ from robot_interface.models.mission.status import MissionStatus, RobotStatus, Ta
|
|
|
36
35
|
from robot_interface.models.mission.task import TASKS
|
|
37
36
|
from robot_interface.robot_interface import RobotInterface
|
|
38
37
|
from robot_interface.telemetry.mqtt_client import MqttClientInterface
|
|
38
|
+
from robot_interface.telemetry.payloads import (
|
|
39
|
+
RobotStatusPayload,
|
|
40
|
+
MissionPayload,
|
|
41
|
+
TaskPayload,
|
|
42
|
+
)
|
|
39
43
|
from robot_interface.utilities.json_service import EnhancedJSONEncoder
|
|
40
44
|
|
|
41
45
|
|
|
@@ -89,6 +93,7 @@ class StateMachine(object):
|
|
|
89
93
|
self.initiate_state: State = Initiate(self)
|
|
90
94
|
self.off_state: State = Off(self)
|
|
91
95
|
self.offline_state: State = Offline(self)
|
|
96
|
+
self.blocked_protective_stop: State = BlockedProtectiveStop(self)
|
|
92
97
|
|
|
93
98
|
self.states: List[State] = [
|
|
94
99
|
self.off_state,
|
|
@@ -99,6 +104,7 @@ class StateMachine(object):
|
|
|
99
104
|
self.stop_state,
|
|
100
105
|
self.paused_state,
|
|
101
106
|
self.offline_state,
|
|
107
|
+
self.blocked_protective_stop,
|
|
102
108
|
]
|
|
103
109
|
|
|
104
110
|
self.machine = Machine(self, states=self.states, initial="off", queued=True)
|
|
@@ -224,6 +230,18 @@ class StateMachine(object):
|
|
|
224
230
|
"dest": self.idle_state,
|
|
225
231
|
"before": self._online,
|
|
226
232
|
},
|
|
233
|
+
{
|
|
234
|
+
"trigger": "robot_protective_stop_engaged",
|
|
235
|
+
"source": [self.idle_state],
|
|
236
|
+
"dest": self.blocked_protective_stop,
|
|
237
|
+
"before": self._protective_stop_engaged,
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"trigger": "robot_protective_stop_disengaged",
|
|
241
|
+
"source": self.blocked_protective_stop,
|
|
242
|
+
"dest": self.idle_state,
|
|
243
|
+
"before": self._protective_stop_disengaged,
|
|
244
|
+
},
|
|
227
245
|
]
|
|
228
246
|
)
|
|
229
247
|
|
|
@@ -272,6 +290,12 @@ class StateMachine(object):
|
|
|
272
290
|
def _online(self) -> None:
|
|
273
291
|
return
|
|
274
292
|
|
|
293
|
+
def _protective_stop_engaged(self) -> None:
|
|
294
|
+
return
|
|
295
|
+
|
|
296
|
+
def _protective_stop_disengaged(self) -> None:
|
|
297
|
+
return
|
|
298
|
+
|
|
275
299
|
def _resume(self) -> None:
|
|
276
300
|
self.logger.info(f"Resuming mission: {self.current_mission.id}")
|
|
277
301
|
self.current_mission.status = MissionStatus.InProgress
|
|
@@ -484,24 +508,22 @@ class StateMachine(object):
|
|
|
484
508
|
if self.current_mission:
|
|
485
509
|
if self.current_mission.error_message:
|
|
486
510
|
error_message = self.current_mission.error_message
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
},
|
|
499
|
-
cls=EnhancedJSONEncoder,
|
|
511
|
+
|
|
512
|
+
payload: MissionPayload = MissionPayload(
|
|
513
|
+
isar_id=settings.ISAR_ID,
|
|
514
|
+
robot_name=settings.ROBOT_NAME,
|
|
515
|
+
mission_id=self.current_mission.id if self.current_mission else None,
|
|
516
|
+
status=self.current_mission.status if self.current_mission else None,
|
|
517
|
+
error_reason=error_message.error_reason if error_message else None,
|
|
518
|
+
error_description=(
|
|
519
|
+
error_message.error_description if error_message else None
|
|
520
|
+
),
|
|
521
|
+
timestamp=datetime.now(timezone.utc),
|
|
500
522
|
)
|
|
501
523
|
|
|
502
524
|
self.mqtt_publisher.publish(
|
|
503
525
|
topic=settings.TOPIC_ISAR_MISSION,
|
|
504
|
-
payload=payload,
|
|
526
|
+
payload=json.dumps(payload, cls=EnhancedJSONEncoder),
|
|
505
527
|
qos=1,
|
|
506
528
|
retain=True,
|
|
507
529
|
)
|
|
@@ -516,26 +538,23 @@ class StateMachine(object):
|
|
|
516
538
|
if task.error_message:
|
|
517
539
|
error_message = task.error_message
|
|
518
540
|
|
|
519
|
-
payload:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
"timestamp": datetime.now(timezone.utc),
|
|
532
|
-
},
|
|
533
|
-
cls=EnhancedJSONEncoder,
|
|
541
|
+
payload: TaskPayload = TaskPayload(
|
|
542
|
+
isar_id=settings.ISAR_ID,
|
|
543
|
+
robot_name=settings.ROBOT_NAME,
|
|
544
|
+
mission_id=self.current_mission.id if self.current_mission else None,
|
|
545
|
+
task_id=task.id if task else None,
|
|
546
|
+
status=task.status if task else None,
|
|
547
|
+
task_type=task.type if task else None,
|
|
548
|
+
error_reason=error_message.error_reason if error_message else None,
|
|
549
|
+
error_description=(
|
|
550
|
+
error_message.error_description if error_message else None
|
|
551
|
+
),
|
|
552
|
+
timestamp=datetime.now(timezone.utc),
|
|
534
553
|
)
|
|
535
554
|
|
|
536
555
|
self.mqtt_publisher.publish(
|
|
537
556
|
topic=settings.TOPIC_ISAR_TASK,
|
|
538
|
-
payload=payload,
|
|
557
|
+
payload=json.dumps(payload, cls=EnhancedJSONEncoder),
|
|
539
558
|
qos=1,
|
|
540
559
|
retain=True,
|
|
541
560
|
)
|
|
@@ -543,19 +562,17 @@ class StateMachine(object):
|
|
|
543
562
|
def publish_status(self) -> None:
|
|
544
563
|
if not self.mqtt_publisher:
|
|
545
564
|
return
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
cls=EnhancedJSONEncoder,
|
|
565
|
+
|
|
566
|
+
payload: RobotStatusPayload = RobotStatusPayload(
|
|
567
|
+
isar_id=settings.ISAR_ID,
|
|
568
|
+
robot_name=settings.ROBOT_NAME,
|
|
569
|
+
status=self._current_status(),
|
|
570
|
+
timestamp=datetime.now(timezone.utc),
|
|
554
571
|
)
|
|
555
572
|
|
|
556
573
|
self.mqtt_publisher.publish(
|
|
557
574
|
topic=settings.TOPIC_ISAR_STATUS,
|
|
558
|
-
payload=payload,
|
|
575
|
+
payload=json.dumps(payload, cls=EnhancedJSONEncoder),
|
|
559
576
|
qos=1,
|
|
560
577
|
retain=True,
|
|
561
578
|
)
|
|
@@ -565,6 +582,8 @@ class StateMachine(object):
|
|
|
565
582
|
return RobotStatus.Available
|
|
566
583
|
elif self.current_state == States.Offline:
|
|
567
584
|
return RobotStatus.Offline
|
|
585
|
+
elif self.current_state == States.BlockedProtectiveStop:
|
|
586
|
+
return RobotStatus.BlockedProtectiveStop
|
|
568
587
|
else:
|
|
569
588
|
return RobotStatus.Busy
|
|
570
589
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import time
|
|
3
|
+
from typing import TYPE_CHECKING, Optional
|
|
4
|
+
|
|
5
|
+
from transitions import State
|
|
6
|
+
|
|
7
|
+
from isar.config.settings import settings
|
|
8
|
+
from isar.services.utilities.threaded_request import (
|
|
9
|
+
ThreadedRequest,
|
|
10
|
+
ThreadedRequestNotFinishedError,
|
|
11
|
+
)
|
|
12
|
+
from robot_interface.models.exceptions.robot_exceptions import RobotException
|
|
13
|
+
from robot_interface.models.mission.status import RobotStatus
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from isar.state_machine.state_machine import StateMachine
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class BlockedProtectiveStop(State):
|
|
20
|
+
def __init__(self, state_machine: "StateMachine") -> None:
|
|
21
|
+
super().__init__(
|
|
22
|
+
name="blocked_protective_stop", on_enter=self.start, on_exit=self.stop
|
|
23
|
+
)
|
|
24
|
+
self.state_machine: "StateMachine" = state_machine
|
|
25
|
+
self.logger = logging.getLogger("state_machine")
|
|
26
|
+
self.robot_status_thread: Optional[ThreadedRequest] = None
|
|
27
|
+
|
|
28
|
+
def start(self) -> None:
|
|
29
|
+
self.state_machine.update_state()
|
|
30
|
+
self._run()
|
|
31
|
+
|
|
32
|
+
def stop(self) -> None:
|
|
33
|
+
if self.robot_status_thread:
|
|
34
|
+
self.robot_status_thread.wait_for_thread()
|
|
35
|
+
self.robot_status_thread = None
|
|
36
|
+
|
|
37
|
+
def _run(self) -> None:
|
|
38
|
+
while True:
|
|
39
|
+
if not self.robot_status_thread:
|
|
40
|
+
self.robot_status_thread = ThreadedRequest(
|
|
41
|
+
request_func=self.state_machine.robot.robot_status
|
|
42
|
+
)
|
|
43
|
+
self.robot_status_thread.start_thread(
|
|
44
|
+
name="State Machine BlockedProtectiveStop Get Robot Status"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
robot_status: RobotStatus = self.robot_status_thread.get_output()
|
|
49
|
+
except ThreadedRequestNotFinishedError:
|
|
50
|
+
time.sleep(self.state_machine.sleep_time)
|
|
51
|
+
continue
|
|
52
|
+
|
|
53
|
+
except RobotException as e:
|
|
54
|
+
self.logger.error(
|
|
55
|
+
f"Failed to get robot status because: {e.error_description}"
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
if robot_status != RobotStatus.BlockedProtectiveStop:
|
|
59
|
+
transition = self.state_machine.robot_protective_stop_disengaged # type: ignore
|
|
60
|
+
break
|
|
61
|
+
|
|
62
|
+
self.robot_status_thread = None
|
|
63
|
+
time.sleep(settings.ROBOT_API_STATUS_POLL_INTERVAL)
|
|
64
|
+
|
|
65
|
+
transition()
|
|
@@ -24,6 +24,7 @@ class Idle(State):
|
|
|
24
24
|
self.logger = logging.getLogger("state_machine")
|
|
25
25
|
self.robot_status_thread: Optional[ThreadedRequest] = None
|
|
26
26
|
self.last_robot_status_poll_time: float = time.time()
|
|
27
|
+
self.status_checked_at_least_once: bool = False
|
|
27
28
|
|
|
28
29
|
def start(self) -> None:
|
|
29
30
|
self.state_machine.update_state()
|
|
@@ -33,8 +34,12 @@ class Idle(State):
|
|
|
33
34
|
if self.robot_status_thread:
|
|
34
35
|
self.robot_status_thread.wait_for_thread()
|
|
35
36
|
self.robot_status_thread = None
|
|
37
|
+
self.status_checked_at_least_once = False
|
|
36
38
|
|
|
37
39
|
def _is_ready_to_poll_for_status(self) -> bool:
|
|
40
|
+
if not self.status_checked_at_least_once:
|
|
41
|
+
return True
|
|
42
|
+
|
|
38
43
|
time_since_last_robot_status_poll = (
|
|
39
44
|
time.time() - self.last_robot_status_poll_time
|
|
40
45
|
)
|
|
@@ -47,17 +52,19 @@ class Idle(State):
|
|
|
47
52
|
if self.state_machine.should_stop_mission():
|
|
48
53
|
transition = self.state_machine.stop # type: ignore
|
|
49
54
|
break
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
self.state_machine.start_mission(
|
|
55
|
-
mission=start_mission.mission,
|
|
56
|
-
initial_pose=start_mission.initial_pose,
|
|
55
|
+
|
|
56
|
+
if self.status_checked_at_least_once:
|
|
57
|
+
start_mission: Optional[StartMissionMessage] = (
|
|
58
|
+
self.state_machine.should_start_mission()
|
|
57
59
|
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
if start_mission:
|
|
61
|
+
self.state_machine.start_mission(
|
|
62
|
+
mission=start_mission.mission,
|
|
63
|
+
initial_pose=start_mission.initial_pose,
|
|
64
|
+
)
|
|
65
|
+
transition = self.state_machine.mission_started # type: ignore
|
|
66
|
+
break
|
|
67
|
+
time.sleep(self.state_machine.sleep_time)
|
|
61
68
|
|
|
62
69
|
if not self._is_ready_to_poll_for_status():
|
|
63
70
|
continue
|
|
@@ -72,6 +79,7 @@ class Idle(State):
|
|
|
72
79
|
|
|
73
80
|
try:
|
|
74
81
|
robot_status: RobotStatus = self.robot_status_thread.get_output()
|
|
82
|
+
self.status_checked_at_least_once = True
|
|
75
83
|
except ThreadedRequestNotFinishedError:
|
|
76
84
|
time.sleep(self.state_machine.sleep_time)
|
|
77
85
|
continue
|
|
@@ -86,6 +94,9 @@ class Idle(State):
|
|
|
86
94
|
if robot_status == RobotStatus.Offline:
|
|
87
95
|
transition = self.state_machine.robot_turned_offline # type: ignore
|
|
88
96
|
break
|
|
97
|
+
elif robot_status == RobotStatus.BlockedProtectiveStop:
|
|
98
|
+
transition = self.state_machine.robot_protective_stop_engaged # type: ignore
|
|
99
|
+
break
|
|
89
100
|
|
|
90
101
|
self.robot_status_thread = None
|
|
91
102
|
|
|
@@ -110,7 +110,8 @@ class Monitor(State):
|
|
|
110
110
|
|
|
111
111
|
if not isinstance(status, TaskStatus):
|
|
112
112
|
self.logger.error(
|
|
113
|
-
f"Received an invalid status update when monitoring mission.
|
|
113
|
+
f"Received an invalid status update {status} when monitoring mission. "
|
|
114
|
+
"Only TaskStatus is expected."
|
|
114
115
|
)
|
|
115
116
|
break
|
|
116
117
|
|
isar/storage/blob_storage.py
CHANGED
|
@@ -47,7 +47,7 @@ class BlobStorage(StorageInterface):
|
|
|
47
47
|
def _upload_file(self, path: Path, data: bytes) -> Union[str, dict]:
|
|
48
48
|
blob_client = self._get_blob_client(path)
|
|
49
49
|
try:
|
|
50
|
-
|
|
50
|
+
blob_client.upload_blob(data=data)
|
|
51
51
|
except ResourceExistsError as e:
|
|
52
52
|
self.logger.error(
|
|
53
53
|
f"Blob {path.as_posix()} already exists in container. Error: {e}"
|
isar/storage/uploader.py
CHANGED
|
@@ -8,11 +8,12 @@ from typing import List, Union
|
|
|
8
8
|
from injector import inject
|
|
9
9
|
|
|
10
10
|
from isar.config.settings import settings
|
|
11
|
-
from isar.models.communication.queues import Queues
|
|
11
|
+
from isar.models.communication.queues.queues import Queues
|
|
12
12
|
from isar.storage.storage_interface import StorageException, StorageInterface
|
|
13
13
|
from robot_interface.models.inspection.inspection import Inspection
|
|
14
14
|
from robot_interface.models.mission.mission import Mission
|
|
15
15
|
from robot_interface.telemetry.mqtt_client import MqttClientInterface
|
|
16
|
+
from robot_interface.telemetry.payloads import InspectionResultPayload
|
|
16
17
|
from robot_interface.utilities.json_service import EnhancedJSONEncoder
|
|
17
18
|
|
|
18
19
|
|
|
@@ -149,21 +150,19 @@ class Uploader:
|
|
|
149
150
|
"""
|
|
150
151
|
if not self.mqtt_publisher:
|
|
151
152
|
return
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
cls=EnhancedJSONEncoder,
|
|
153
|
+
|
|
154
|
+
payload: InspectionResultPayload = InspectionResultPayload(
|
|
155
|
+
isar_id=settings.ISAR_ID,
|
|
156
|
+
robot_name=settings.ROBOT_NAME,
|
|
157
|
+
inspection_id=inspection.id,
|
|
158
|
+
inspection_path=inspection_path,
|
|
159
|
+
installation_code=settings.PLANT_SHORT_NAME,
|
|
160
|
+
analysis_to_be_run=inspection.metadata.analysis_type,
|
|
161
|
+
timestamp=datetime.now(timezone.utc),
|
|
163
162
|
)
|
|
164
163
|
self.mqtt_publisher.publish(
|
|
165
164
|
topic=settings.TOPIC_ISAR_INSPECTION_RESULT,
|
|
166
|
-
payload=payload,
|
|
165
|
+
payload=json.dumps(payload, cls=EnhancedJSONEncoder),
|
|
167
166
|
qos=1,
|
|
168
167
|
retain=True,
|
|
169
168
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: isar
|
|
3
|
-
Version: 1.25.
|
|
3
|
+
Version: 1.25.4
|
|
4
4
|
Summary: Integration and Supervisory control of Autonomous Robots
|
|
5
5
|
Author-email: Equinor ASA <fg_robots_dev@equinor.com>
|
|
6
6
|
License: Eclipse Public License version 2.0
|
|
@@ -127,9 +127,7 @@ Requires-Dist: transitions
|
|
|
127
127
|
Requires-Dist: uvicorn
|
|
128
128
|
Provides-Extra: dev
|
|
129
129
|
Requires-Dist: black; extra == "dev"
|
|
130
|
-
Requires-Dist: flake8; extra == "dev"
|
|
131
130
|
Requires-Dist: mypy; extra == "dev"
|
|
132
|
-
Requires-Dist: myst-parser; extra == "dev"
|
|
133
131
|
Requires-Dist: pip-tools; extra == "dev"
|
|
134
132
|
Requires-Dist: pre-commit; extra == "dev"
|
|
135
133
|
Requires-Dist: pytest-dotenv; extra == "dev"
|
|
@@ -137,7 +135,7 @@ Requires-Dist: pytest-mock; extra == "dev"
|
|
|
137
135
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
138
136
|
Requires-Dist: pytest; extra == "dev"
|
|
139
137
|
Requires-Dist: requests-mock; extra == "dev"
|
|
140
|
-
Requires-Dist:
|
|
138
|
+
Requires-Dist: ruff; extra == "dev"
|
|
141
139
|
|
|
142
140
|
# ISAR
|
|
143
141
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
isar/__init__.py,sha256=cH8p8bVveu3FUL6kBhldcSlLaoHgD82Kd0-SwSNfGXw,87
|
|
2
|
-
isar/modules.py,sha256=
|
|
3
|
-
isar/script.py,sha256=
|
|
2
|
+
isar/modules.py,sha256=BeBg2kJi1q-7DzupOM3jFloeMScRk7qkNog9-yGwV5c,7355
|
|
3
|
+
isar/script.py,sha256=C9u5jIYXpnH8JuEqTSPfbuvZiSi3O9SjnvzHV-AtDbM,5988
|
|
4
4
|
isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
isar/apis/api.py,sha256=vUy7QbHrKcTHjh2rkU7lqQPkCasI6umha8r6H88JiXE,13942
|
|
6
|
-
isar/apis/models/__init__.py,sha256=
|
|
6
|
+
isar/apis/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
isar/apis/models/models.py,sha256=HzLaWhjAv0uJRBWipIgYg_F75eaQ5jl9Pi4UnYbDJ-M,1749
|
|
8
|
-
isar/apis/models/start_mission_definition.py,sha256=
|
|
9
|
-
isar/apis/robot_control/robot_controller.py,sha256=
|
|
8
|
+
isar/apis/models/start_mission_definition.py,sha256=kctM1kaK3a8z3Sd307QPZO9T_0OpDGQeGQVjOo49pCc,8775
|
|
9
|
+
isar/apis/robot_control/robot_controller.py,sha256=w0giQf8k1TCL_J_kAcBB8Tgk02laWDCiDiFE8E5sPrg,915
|
|
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=9S7OtFCfO0hR9gWtj2u2oqa2Hxj9ynpcXxgqdk5liQ4,11328
|
|
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
|
|
@@ -38,16 +38,16 @@ isar/config/predefined_missions/default_turtlebot.json,sha256=8Vk1_0P0BBsG0vwh4v
|
|
|
38
38
|
isar/mission_planner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
isar/mission_planner/local_planner.py,sha256=45zVP3hzUHdZ5Ty4KWRL85_AUWiTmBhTtlsAruUDMD4,2561
|
|
40
40
|
isar/mission_planner/mission_planner_interface.py,sha256=UgpPIM4FbrWOD7fGY3Ul64k3uYb8wo0FwSWGewYoVbc,485
|
|
41
|
-
isar/mission_planner/sequential_task_selector.py,sha256=
|
|
42
|
-
isar/mission_planner/task_selector_interface.py,sha256=
|
|
41
|
+
isar/mission_planner/sequential_task_selector.py,sha256=66agRPHuJnEa1vArPyty4muTasAZ50XPjjrSaTdY_Cc,643
|
|
42
|
+
isar/mission_planner/task_selector_interface.py,sha256=pnLeaGPIuyXThcflZ_A7YL2b2xQjFT88hAZidkMomxU,707
|
|
43
43
|
isar/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
isar/models/communication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
45
|
isar/models/communication/message.py,sha256=yN4SXYM-W_6u3Cf9yuAE3jy4e6mMrL3yUr-iVV4r55E,241
|
|
46
|
-
isar/models/communication/queues/__init__.py,sha256=
|
|
46
|
+
isar/models/communication/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
isar/models/communication/queues/queue_io.py,sha256=AnHWUCkZ0tunkxKKeBarq-OUkRM97IaMfA-a1pmf1cQ,394
|
|
48
48
|
isar/models/communication/queues/queue_timeout_error.py,sha256=rF8TlNF7RHS_ueTZ5mp7aFkhLY1j0dcwMwH-Ba6lVpE,45
|
|
49
49
|
isar/models/communication/queues/queues.py,sha256=FzoqlT4AQ4Q5Jufh6yRPV2uq5iUZd1odrpjBl77yU5o,803
|
|
50
|
-
isar/models/communication/queues/status_queue.py,sha256
|
|
50
|
+
isar/models/communication/queues/status_queue.py,sha256=-6MDxrZ9dUIJgOMAluSJDyaM50xE1ylhoJZOnPIw8hs,483
|
|
51
51
|
isar/models/mission_metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
isar/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
isar/services/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -62,54 +62,55 @@ isar/services/service_connections/stid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
|
|
|
62
62
|
isar/services/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
isar/services/utilities/queue_utilities.py,sha256=Pw3hehSwkXJNeDv-bDVDfs58VOwtt3i5hpiJ2ZpphuQ,1225
|
|
64
64
|
isar/services/utilities/robot_utilities.py,sha256=4-ob4kcIiRN_GXFDBMwBadfbwpYqKEkyzyC40wzvmko,555
|
|
65
|
-
isar/services/utilities/scheduling_utilities.py,sha256=
|
|
65
|
+
isar/services/utilities/scheduling_utilities.py,sha256=xQ1UqxxTRk2VpTVj7mL_ux9xqoaiSd45W7VAPmpXSfU,8509
|
|
66
66
|
isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
|
|
67
67
|
isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
-
isar/state_machine/state_machine.py,sha256=
|
|
69
|
-
isar/state_machine/states_enum.py,sha256=
|
|
70
|
-
isar/state_machine/states/__init__.py,sha256=
|
|
71
|
-
isar/state_machine/states/
|
|
68
|
+
isar/state_machine/state_machine.py,sha256=hZCxG6WuZYtgErohRWIamebEoqAczcOacCqqVyUWy8E,22994
|
|
69
|
+
isar/state_machine/states_enum.py,sha256=GrX2dzVXsyI9vXxIgd7DpOP8V1nhXQS4Jym5z69acHY,332
|
|
70
|
+
isar/state_machine/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
|
+
isar/state_machine/states/blocked_protective_stop.py,sha256=FNOarwHzkUfRllyxltXSu7W_nXAxpqDhz9PIo6wxE1o,2259
|
|
72
|
+
isar/state_machine/states/idle.py,sha256=96CZCpBBPAZE_szF0UoPh6tBRsDn3FYII8bZ_cBFGuw,3815
|
|
72
73
|
isar/state_machine/states/initialize.py,sha256=TVXV5Ps3N4_flM88j9pQiX88kZgLzLwzlJy_6hPbgcA,2359
|
|
73
74
|
isar/state_machine/states/initiate.py,sha256=j1wvSC3zVODgRkKOVsQROiuWkjihSBtwCs5GsoivLvc,5655
|
|
74
|
-
isar/state_machine/states/monitor.py,sha256=
|
|
75
|
+
isar/state_machine/states/monitor.py,sha256=03h8OHFQ00_BuR_M7FOVeA4h_lJE2L1x37t0SyGZoX8,10285
|
|
75
76
|
isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
|
|
76
77
|
isar/state_machine/states/offline.py,sha256=IfEZ6-kl6OfJSRT1eKHOey7AU23tKiSHqpwGqclmH_c,2166
|
|
77
78
|
isar/state_machine/states/paused.py,sha256=TIg1iJvAxGUIfzE_qWp0wrq4Ka0a3zEf3GNwIWLIK0M,1177
|
|
78
79
|
isar/state_machine/states/stop.py,sha256=WVyjhndHcccy7_P9bU7SXyZB3qphsGahdSymaghGc08,3348
|
|
79
80
|
isar/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
-
isar/storage/blob_storage.py,sha256=
|
|
81
|
+
isar/storage/blob_storage.py,sha256=L885tgwHeeIp8raIz20Hhbc1IMsQP0wK6HOX9I4sZlw,3199
|
|
81
82
|
isar/storage/local_storage.py,sha256=Bnmoi5gyN8r-oRh0aHrOdGqaH3JqRScFKMRXYojW5kY,1855
|
|
82
83
|
isar/storage/slimm_storage.py,sha256=iVtc7w_VPFoe0fWyPpI9kjau3C1rn7w2n5EJaqloFIU,8991
|
|
83
84
|
isar/storage/storage_interface.py,sha256=DYDry4I7aZpDHJhsBF6s8zrgokFAc7fdKJKfA8AvL7o,828
|
|
84
|
-
isar/storage/uploader.py,sha256=
|
|
85
|
+
isar/storage/uploader.py,sha256=LrbGlAGoqspWtSjmZcfvbRL3_khCnLWwa64XhqUrsr4,6543
|
|
85
86
|
isar/storage/utilities.py,sha256=fitsdQ1ox5gr9fk9VuSk_iTBiEAIS8NZAnHabUZORh0,3173
|
|
86
87
|
robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
87
|
-
robot_interface/robot_interface.py,sha256=
|
|
88
|
+
robot_interface/robot_interface.py,sha256=UEhzAj1kXOdyYiWjz8zxEo5BHMHRE-ZHalPFfv-qBfw,9697
|
|
88
89
|
robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
|
|
89
90
|
robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
91
|
robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
|
-
robot_interface/models/exceptions/robot_exceptions.py,sha256=
|
|
92
|
-
robot_interface/models/initialize/__init__.py,sha256=
|
|
92
|
+
robot_interface/models/exceptions/robot_exceptions.py,sha256=DvhH0FxW_7HSLZc43rlF34_lZnb5AY8hx3k9ZkPq7WM,10432
|
|
93
|
+
robot_interface/models/initialize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
94
|
robot_interface/models/initialize/initialize_params.py,sha256=2eG5Aq5bDKU6tVkaUMAoc46GERBgyaKkqv6yLupdRLc,164
|
|
94
|
-
robot_interface/models/inspection/__init__.py,sha256=
|
|
95
|
+
robot_interface/models/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
96
|
robot_interface/models/inspection/inspection.py,sha256=nSoKTDPRWnpaJuoKnaE_2EEJ6oH4dQkqEuECcQTvVhI,2059
|
|
96
97
|
robot_interface/models/mission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
98
|
robot_interface/models/mission/mission.py,sha256=QZBDQiOmpb4C7nNCf1PaCWwpvAc8jrhwHSznOe2YhX8,842
|
|
98
|
-
robot_interface/models/mission/status.py,sha256=
|
|
99
|
-
robot_interface/models/mission/task.py,sha256=
|
|
99
|
+
robot_interface/models/mission/status.py,sha256=48y8HEiT7QQbMLBUBYxXR92iZOrnBOukPZ7o09CCR1Q,686
|
|
100
|
+
robot_interface/models/mission/task.py,sha256=dk_CYaABD9WxQswd1xX3D5AHpcXwREwnloREEg1JbI0,4980
|
|
100
101
|
robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
|
-
robot_interface/models/robots/battery_state.py,sha256=
|
|
102
|
-
robot_interface/models/robots/media.py,sha256=
|
|
103
|
-
robot_interface/models/robots/robot_model.py,sha256
|
|
102
|
+
robot_interface/models/robots/battery_state.py,sha256=ktOtJ8ltdK0k_i7BoqYfhc5dbOzIG6Oo-uWC67fCWio,98
|
|
103
|
+
robot_interface/models/robots/media.py,sha256=8A-CuuubfngzPprs6zWB9hSaqe3jzgsE8rcCzRX2Uto,227
|
|
104
|
+
robot_interface/models/robots/robot_model.py,sha256=-0jNKWPcEgtF_2klb1It3u0SCoAR0hSW9nce58Zq0Co,417
|
|
104
105
|
robot_interface/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
106
|
robot_interface/telemetry/mqtt_client.py,sha256=DkzYZNWFaJkG3AVc0dM4Bj52hZEQj-14Q75zqzQcv9A,2988
|
|
106
|
-
robot_interface/telemetry/payloads.py,sha256=
|
|
107
|
+
robot_interface/telemetry/payloads.py,sha256=_Ph2f1M5f18fTJ7Jrd3JCeXhfZzg6i3THlFrbAt2DJA,2329
|
|
107
108
|
robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
109
|
robot_interface/utilities/json_service.py,sha256=nU2Q_3P9Fq9hs6F_wtUjWtHfl_g1Siy-yDhXXSKwHwg,1018
|
|
109
110
|
robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
|
|
110
|
-
isar-1.25.
|
|
111
|
-
isar-1.25.
|
|
112
|
-
isar-1.25.
|
|
113
|
-
isar-1.25.
|
|
114
|
-
isar-1.25.
|
|
115
|
-
isar-1.25.
|
|
111
|
+
isar-1.25.4.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
|
|
112
|
+
isar-1.25.4.dist-info/METADATA,sha256=eHo0fpQBnVD2pHC6aRNqs1K4KvB3x1boptOCL5DzqZw,30578
|
|
113
|
+
isar-1.25.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
114
|
+
isar-1.25.4.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
|
|
115
|
+
isar-1.25.4.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
|
|
116
|
+
isar-1.25.4.dist-info/RECORD,,
|
|
@@ -4,28 +4,26 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class ErrorReason(str, Enum):
|
|
7
|
-
RobotCommunicationException
|
|
8
|
-
RobotCommunicationTimeoutException
|
|
9
|
-
RobotInfeasibleTaskException
|
|
10
|
-
RobotInfeasibleMissionException
|
|
11
|
-
RobotMissionStatusException
|
|
12
|
-
RobotTaskStatusException
|
|
13
|
-
RobotAPIException
|
|
14
|
-
RobotActionException
|
|
15
|
-
RobotInitializeException
|
|
16
|
-
RobotRetrieveDataException
|
|
17
|
-
RobotRetrieveInspectionException
|
|
18
|
-
RobotTelemetryException
|
|
19
|
-
RobotTelemetryNoUpdateException
|
|
20
|
-
RobotTelemetryPoseException
|
|
21
|
-
RobotMapException
|
|
22
|
-
RobotTransformException
|
|
23
|
-
RobotUnknownErrorException
|
|
24
|
-
RobotDisconnectedException
|
|
25
|
-
RobotMissionNotSupportedException
|
|
26
|
-
RobotMissionMissingStartPoseException
|
|
27
|
-
"robot_mission_missing_start_pose_exception"
|
|
28
|
-
)
|
|
7
|
+
RobotCommunicationException = "robot_communication_exception"
|
|
8
|
+
RobotCommunicationTimeoutException = "robot_communication_timeout_exception"
|
|
9
|
+
RobotInfeasibleTaskException = "robot_infeasible_task_exception"
|
|
10
|
+
RobotInfeasibleMissionException = "robot_infeasible_mission_exception"
|
|
11
|
+
RobotMissionStatusException = "robot_mission_status_exception"
|
|
12
|
+
RobotTaskStatusException = "robot_task_status_exception"
|
|
13
|
+
RobotAPIException = "robot_api_exception"
|
|
14
|
+
RobotActionException = "robot_action_exception"
|
|
15
|
+
RobotInitializeException = "robot_initialize_exception"
|
|
16
|
+
RobotRetrieveDataException = "robot_retrieve_data_exception"
|
|
17
|
+
RobotRetrieveInspectionException = "robot_retrieve_inspection_exception"
|
|
18
|
+
RobotTelemetryException = "robot_telemetry_exception"
|
|
19
|
+
RobotTelemetryNoUpdateException = "robot_telemetry_no_update_exception"
|
|
20
|
+
RobotTelemetryPoseException = "robot_telemetry_pose_exception"
|
|
21
|
+
RobotMapException = "robot_map_exception"
|
|
22
|
+
RobotTransformException = "robot_transform_exception"
|
|
23
|
+
RobotUnknownErrorException = "robot_unknown_error_exception"
|
|
24
|
+
RobotDisconnectedException = "robot_disconnected_exception"
|
|
25
|
+
RobotMissionNotSupportedException = "robot_mission_not_supported_exception"
|
|
26
|
+
RobotMissionMissingStartPoseException = "robot_mission_missing_start_pose_exception"
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
@dataclass
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .initialize_params import InitializeParams
|
|
@@ -2,27 +2,28 @@ from enum import Enum
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class MissionStatus(str, Enum):
|
|
5
|
-
NotStarted
|
|
6
|
-
InProgress
|
|
7
|
-
Paused
|
|
8
|
-
Failed
|
|
9
|
-
Cancelled
|
|
10
|
-
Successful
|
|
11
|
-
PartiallySuccessful
|
|
5
|
+
NotStarted = "not_started"
|
|
6
|
+
InProgress = "in_progress"
|
|
7
|
+
Paused = "paused"
|
|
8
|
+
Failed = "failed"
|
|
9
|
+
Cancelled = "cancelled"
|
|
10
|
+
Successful = "successful"
|
|
11
|
+
PartiallySuccessful = "partially_successful"
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class TaskStatus(str, Enum):
|
|
15
|
-
NotStarted
|
|
16
|
-
InProgress
|
|
17
|
-
Paused
|
|
18
|
-
Failed
|
|
19
|
-
Cancelled
|
|
20
|
-
Successful
|
|
21
|
-
PartiallySuccessful
|
|
15
|
+
NotStarted = "not_started"
|
|
16
|
+
InProgress = "in_progress"
|
|
17
|
+
Paused = "paused"
|
|
18
|
+
Failed = "failed"
|
|
19
|
+
Cancelled = "cancelled"
|
|
20
|
+
Successful = "successful"
|
|
21
|
+
PartiallySuccessful = "partially_successful"
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class RobotStatus(Enum):
|
|
25
|
-
Available
|
|
26
|
-
Busy
|
|
27
|
-
Offline
|
|
28
|
-
Blocked
|
|
25
|
+
Available = "available"
|
|
26
|
+
Busy = "busy"
|
|
27
|
+
Offline = "offline"
|
|
28
|
+
Blocked = "blocked"
|
|
29
|
+
BlockedProtectiveStop = "blockedprotectivestop"
|
|
@@ -5,7 +5,7 @@ from alitra import Pose, Position
|
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
6
6
|
|
|
7
7
|
from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
8
|
-
from robot_interface.models.inspection import (
|
|
8
|
+
from robot_interface.models.inspection.inspection import (
|
|
9
9
|
Audio,
|
|
10
10
|
Image,
|
|
11
11
|
Inspection,
|
|
@@ -4,10 +4,10 @@ from enum import Enum
|
|
|
4
4
|
# Did you write your own isar-robot package and would like to have it included here?
|
|
5
5
|
# Open a pull request to the ISAR repository!
|
|
6
6
|
class RobotModel(Enum):
|
|
7
|
-
TaurobInspector
|
|
8
|
-
TaurobOperator
|
|
9
|
-
ExR2
|
|
10
|
-
Robot
|
|
11
|
-
Turtlebot
|
|
12
|
-
AnymalX
|
|
13
|
-
AnymalD
|
|
7
|
+
TaurobInspector = "TaurobInspector"
|
|
8
|
+
TaurobOperator = "TaurobOperator"
|
|
9
|
+
ExR2 = "ExR2"
|
|
10
|
+
Robot = "Robot" # This corresponds to the mock in isar_robot
|
|
11
|
+
Turtlebot = "Turtlebot"
|
|
12
|
+
AnymalX = "AnymalX"
|
|
13
|
+
AnymalD = "AnymalD"
|
|
@@ -3,7 +3,7 @@ from queue import Queue
|
|
|
3
3
|
from threading import Thread
|
|
4
4
|
from typing import Callable, List, Optional
|
|
5
5
|
|
|
6
|
-
from robot_interface.models.initialize import InitializeParams
|
|
6
|
+
from robot_interface.models.initialize.initialize_params import InitializeParams
|
|
7
7
|
from robot_interface.models.inspection.inspection import Inspection
|
|
8
8
|
from robot_interface.models.mission.mission import Mission
|
|
9
9
|
from robot_interface.models.mission.status import RobotStatus, TaskStatus
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import List, Optional
|
|
3
|
+
from typing import List, Optional, Union
|
|
4
4
|
|
|
5
5
|
from alitra import Pose
|
|
6
|
-
from transitions import State
|
|
7
6
|
|
|
8
|
-
from robot_interface.models.mission.status import RobotStatus
|
|
9
7
|
from robot_interface.models.robots.battery_state import BatteryState
|
|
8
|
+
from robot_interface.models.mission.status import RobotStatus, MissionStatus, TaskStatus
|
|
9
|
+
from robot_interface.models.mission.task import TaskTypes
|
|
10
|
+
from robot_interface.models.exceptions.robot_exceptions import ErrorReason
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
@dataclass
|
|
@@ -54,12 +55,7 @@ class DocumentInfo:
|
|
|
54
55
|
class RobotStatusPayload:
|
|
55
56
|
isar_id: str
|
|
56
57
|
robot_name: str
|
|
57
|
-
|
|
58
|
-
previous_robot_status: RobotStatus
|
|
59
|
-
current_isar_state: State
|
|
60
|
-
current_mission_id: str
|
|
61
|
-
current_task_id: str
|
|
62
|
-
current_step_id: str
|
|
58
|
+
status: RobotStatus
|
|
63
59
|
timestamp: datetime
|
|
64
60
|
|
|
65
61
|
|
|
@@ -82,3 +78,38 @@ class RobotHeartbeatPayload:
|
|
|
82
78
|
isar_id: str
|
|
83
79
|
robot_name: str
|
|
84
80
|
timestamp: datetime
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@dataclass
|
|
84
|
+
class MissionPayload:
|
|
85
|
+
isar_id: str
|
|
86
|
+
robot_name: str
|
|
87
|
+
mission_id: Optional[str]
|
|
88
|
+
status: Optional[MissionStatus]
|
|
89
|
+
error_reason: Optional[ErrorReason]
|
|
90
|
+
error_description: Optional[str]
|
|
91
|
+
timestamp: datetime
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@dataclass
|
|
95
|
+
class TaskPayload:
|
|
96
|
+
isar_id: str
|
|
97
|
+
robot_name: str
|
|
98
|
+
mission_id: Optional[str]
|
|
99
|
+
task_id: Optional[str]
|
|
100
|
+
status: Optional[TaskStatus]
|
|
101
|
+
task_type: Optional[TaskTypes]
|
|
102
|
+
error_reason: Optional[ErrorReason]
|
|
103
|
+
error_description: Optional[str]
|
|
104
|
+
timestamp: datetime
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@dataclass
|
|
108
|
+
class InspectionResultPayload:
|
|
109
|
+
isar_id: str
|
|
110
|
+
robot_name: str
|
|
111
|
+
inspection_id: str
|
|
112
|
+
inspection_path: Union[str, dict]
|
|
113
|
+
installation_code: str
|
|
114
|
+
analysis_to_be_run: Optional[str]
|
|
115
|
+
timestamp: datetime
|
|
File without changes
|
|
File without changes
|
|
File without changes
|