isar 1.20.2__py3-none-any.whl → 1.34.13__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.
- isar/apis/api.py +135 -86
- isar/apis/models/__init__.py +0 -1
- isar/apis/models/models.py +21 -11
- isar/apis/models/start_mission_definition.py +115 -170
- isar/apis/robot_control/robot_controller.py +41 -0
- isar/apis/schedule/scheduling_controller.py +123 -187
- isar/apis/security/authentication.py +5 -5
- isar/config/certs/ca-cert.pem +33 -31
- isar/config/keyvault/keyvault_service.py +4 -2
- isar/config/log.py +45 -40
- isar/config/logging.conf +16 -31
- isar/config/open_telemetry.py +102 -0
- isar/config/settings.py +74 -117
- isar/eventhandlers/eventhandler.py +123 -0
- isar/models/events.py +184 -0
- isar/models/status.py +22 -0
- isar/modules.py +117 -200
- isar/robot/robot.py +383 -0
- isar/robot/robot_battery.py +60 -0
- isar/robot/robot_monitor_mission.py +357 -0
- isar/robot/robot_pause_mission.py +74 -0
- isar/robot/robot_resume_mission.py +67 -0
- isar/robot/robot_start_mission.py +66 -0
- isar/robot/robot_status.py +61 -0
- isar/robot/robot_stop_mission.py +68 -0
- isar/robot/robot_upload_inspection.py +75 -0
- isar/script.py +58 -41
- isar/services/service_connections/mqtt/mqtt_client.py +47 -11
- isar/services/service_connections/mqtt/robot_heartbeat_publisher.py +5 -2
- isar/services/service_connections/mqtt/robot_info_publisher.py +3 -3
- isar/services/service_connections/persistent_memory.py +69 -0
- isar/services/utilities/mqtt_utilities.py +93 -0
- isar/services/utilities/robot_utilities.py +20 -0
- isar/services/utilities/scheduling_utilities.py +386 -100
- isar/state_machine/state_machine.py +242 -539
- isar/state_machine/states/__init__.py +0 -8
- isar/state_machine/states/await_next_mission.py +114 -0
- isar/state_machine/states/blocked_protective_stop.py +60 -0
- isar/state_machine/states/going_to_lockdown.py +95 -0
- isar/state_machine/states/going_to_recharging.py +92 -0
- isar/state_machine/states/home.py +115 -0
- isar/state_machine/states/intervention_needed.py +77 -0
- isar/state_machine/states/lockdown.py +38 -0
- isar/state_machine/states/maintenance.py +43 -0
- isar/state_machine/states/monitor.py +137 -247
- isar/state_machine/states/offline.py +51 -53
- isar/state_machine/states/paused.py +92 -23
- isar/state_machine/states/pausing.py +48 -0
- isar/state_machine/states/pausing_return_home.py +48 -0
- isar/state_machine/states/recharging.py +80 -0
- isar/state_machine/states/resuming.py +57 -0
- isar/state_machine/states/resuming_return_home.py +64 -0
- isar/state_machine/states/return_home_paused.py +109 -0
- isar/state_machine/states/returning_home.py +217 -0
- isar/state_machine/states/stopping.py +69 -0
- isar/state_machine/states/stopping_due_to_maintenance.py +61 -0
- isar/state_machine/states/stopping_go_to_lockdown.py +60 -0
- isar/state_machine/states/stopping_go_to_recharge.py +51 -0
- isar/state_machine/states/stopping_paused_mission.py +36 -0
- isar/state_machine/states/stopping_paused_return_home.py +59 -0
- isar/state_machine/states/stopping_return_home.py +59 -0
- isar/state_machine/states/unknown_status.py +74 -0
- isar/state_machine/states_enum.py +23 -5
- isar/state_machine/transitions/mission.py +225 -0
- isar/state_machine/transitions/return_home.py +108 -0
- isar/state_machine/transitions/robot_status.py +87 -0
- isar/state_machine/utils/common_event_handlers.py +138 -0
- isar/storage/blob_storage.py +70 -52
- isar/storage/local_storage.py +25 -12
- isar/storage/storage_interface.py +28 -7
- isar/storage/uploader.py +174 -55
- isar/storage/utilities.py +32 -29
- {isar-1.20.2.dist-info → isar-1.34.13.dist-info}/METADATA +119 -123
- isar-1.34.13.dist-info/RECORD +120 -0
- {isar-1.20.2.dist-info → isar-1.34.13.dist-info}/WHEEL +1 -1
- {isar-1.20.2.dist-info → isar-1.34.13.dist-info}/entry_points.txt +1 -0
- robot_interface/models/exceptions/robot_exceptions.py +91 -41
- robot_interface/models/inspection/__init__.py +0 -13
- robot_interface/models/inspection/inspection.py +42 -33
- robot_interface/models/mission/mission.py +14 -15
- robot_interface/models/mission/status.py +20 -26
- robot_interface/models/mission/task.py +154 -121
- robot_interface/models/robots/battery_state.py +6 -0
- robot_interface/models/robots/media.py +13 -0
- robot_interface/models/robots/robot_model.py +7 -7
- robot_interface/robot_interface.py +119 -84
- robot_interface/telemetry/mqtt_client.py +74 -12
- robot_interface/telemetry/payloads.py +91 -13
- robot_interface/utilities/json_service.py +7 -1
- isar/config/configuration_error.py +0 -2
- isar/config/keyvault/keyvault_error.py +0 -2
- isar/config/predefined_mission_definition/__init__.py +0 -0
- isar/config/predefined_mission_definition/default_exr.json +0 -51
- isar/config/predefined_mission_definition/default_mission.json +0 -91
- isar/config/predefined_mission_definition/default_turtlebot.json +0 -124
- isar/config/predefined_missions/__init__.py +0 -0
- isar/config/predefined_missions/default.json +0 -92
- isar/config/predefined_missions/default_turtlebot.json +0 -110
- isar/config/predefined_poses/__init__.py +0 -0
- isar/config/predefined_poses/predefined_poses.py +0 -616
- isar/config/settings.env +0 -25
- isar/mission_planner/__init__.py +0 -0
- isar/mission_planner/local_planner.py +0 -82
- isar/mission_planner/mission_planner_interface.py +0 -26
- isar/mission_planner/sequential_task_selector.py +0 -23
- isar/mission_planner/task_selector_interface.py +0 -31
- isar/models/communication/__init__.py +0 -0
- isar/models/communication/message.py +0 -12
- isar/models/communication/queues/__init__.py +0 -4
- isar/models/communication/queues/queue_io.py +0 -12
- isar/models/communication/queues/queue_timeout_error.py +0 -2
- isar/models/communication/queues/queues.py +0 -19
- isar/models/communication/queues/status_queue.py +0 -20
- isar/models/mission_metadata/__init__.py +0 -0
- isar/services/auth/__init__.py +0 -0
- isar/services/auth/azure_credentials.py +0 -14
- isar/services/readers/__init__.py +0 -0
- isar/services/readers/base_reader.py +0 -37
- isar/services/service_connections/request_handler.py +0 -153
- isar/services/service_connections/stid/__init__.py +0 -0
- isar/services/utilities/queue_utilities.py +0 -39
- isar/services/utilities/threaded_request.py +0 -68
- isar/state_machine/states/idle.py +0 -85
- isar/state_machine/states/initialize.py +0 -71
- isar/state_machine/states/initiate.py +0 -142
- isar/state_machine/states/off.py +0 -18
- isar/state_machine/states/stop.py +0 -95
- isar/storage/slimm_storage.py +0 -191
- isar-1.20.2.dist-info/RECORD +0 -116
- robot_interface/models/initialize/__init__.py +0 -1
- robot_interface/models/initialize/initialize_params.py +0 -9
- robot_interface/models/mission/step.py +0 -234
- {isar-1.20.2.dist-info → isar-1.34.13.dist-info/licenses}/LICENSE +0 -0
- {isar-1.20.2.dist-info → isar-1.34.13.dist-info}/top_level.txt +0 -0
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
from dataclasses import dataclass, field
|
|
2
|
-
from typing import Any, List, Literal, Optional, Type, Union
|
|
3
|
-
|
|
4
|
-
from alitra import Pose, Position
|
|
5
|
-
|
|
6
|
-
from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
7
|
-
from robot_interface.models.inspection import (
|
|
8
|
-
Audio,
|
|
9
|
-
Image,
|
|
10
|
-
Inspection,
|
|
11
|
-
ThermalImage,
|
|
12
|
-
ThermalVideo,
|
|
13
|
-
Video,
|
|
14
|
-
)
|
|
15
|
-
from robot_interface.models.mission.status import StepStatus
|
|
16
|
-
from robot_interface.utilities.uuid_string_factory import uuid4_string
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@dataclass
|
|
20
|
-
class Step:
|
|
21
|
-
"""
|
|
22
|
-
Base class for all steps in a mission.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
id: str = field(default_factory=uuid4_string, init=False)
|
|
26
|
-
status: StepStatus = field(default=StepStatus.NotStarted, init=False)
|
|
27
|
-
error_message: Optional[ErrorMessage] = field(default=None, init=False)
|
|
28
|
-
|
|
29
|
-
def __str__(self) -> str:
|
|
30
|
-
def add_indent(text: str) -> str:
|
|
31
|
-
return "".join(" " + line for line in text.splitlines(True))
|
|
32
|
-
|
|
33
|
-
def robot_class_to_pretty_string(obj: Step) -> str:
|
|
34
|
-
log_message: str = ""
|
|
35
|
-
for attr in dir(obj):
|
|
36
|
-
if callable(getattr(obj, attr)) or attr.startswith("__"):
|
|
37
|
-
continue
|
|
38
|
-
|
|
39
|
-
value: Any = getattr(obj, attr)
|
|
40
|
-
try:
|
|
41
|
-
package_name: Optional[str] = (
|
|
42
|
-
str(value.__class__).split("'")[1].split(".")[0]
|
|
43
|
-
)
|
|
44
|
-
except (AttributeError, IndexError):
|
|
45
|
-
package_name = None
|
|
46
|
-
|
|
47
|
-
if package_name == "robot_interface":
|
|
48
|
-
log_message += (
|
|
49
|
-
"\n" + attr + ": " + robot_class_to_pretty_string(value)
|
|
50
|
-
)
|
|
51
|
-
else:
|
|
52
|
-
log_message += "\n" + str(attr) + ": " + str(value)
|
|
53
|
-
|
|
54
|
-
return add_indent(log_message)
|
|
55
|
-
|
|
56
|
-
class_name: str = type(self).__name__
|
|
57
|
-
return class_name + robot_class_to_pretty_string(self)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@dataclass
|
|
61
|
-
class InspectionStep(Step):
|
|
62
|
-
"""
|
|
63
|
-
Base class for all inspection steps which produce results to be uploaded.
|
|
64
|
-
"""
|
|
65
|
-
|
|
66
|
-
inspections: List[Inspection] = field(default_factory=list, init=False)
|
|
67
|
-
tag_id: Optional[str] = field(default=None, init=False)
|
|
68
|
-
type = "inspection_type"
|
|
69
|
-
metadata: Optional[dict] = field(default_factory=dict, init=False)
|
|
70
|
-
|
|
71
|
-
@staticmethod
|
|
72
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
73
|
-
return Inspection
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@dataclass
|
|
77
|
-
class MotionStep(Step):
|
|
78
|
-
"""
|
|
79
|
-
Base class for all steps which should move the robot, but not return a result.
|
|
80
|
-
"""
|
|
81
|
-
|
|
82
|
-
pass
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
@dataclass
|
|
86
|
-
class ContinousInspectionStep(Step):
|
|
87
|
-
"""
|
|
88
|
-
Base class for all continous inspection steps which produce a result to be uploaded.
|
|
89
|
-
"""
|
|
90
|
-
|
|
91
|
-
pass
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
@dataclass
|
|
95
|
-
class DriveToPose(MotionStep):
|
|
96
|
-
"""
|
|
97
|
-
Step which causes the robot to move to the given pose.
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
pose: Pose
|
|
101
|
-
type: Literal["drive_to_pose"] = "drive_to_pose"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
@dataclass
|
|
105
|
-
class DockingProcedure(MotionStep):
|
|
106
|
-
"""
|
|
107
|
-
Step which causes the robot to dock or undock
|
|
108
|
-
"""
|
|
109
|
-
|
|
110
|
-
behavior: Literal["dock", "undock"]
|
|
111
|
-
type: Literal["docking_procedure"] = "docking_procedure"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
@dataclass
|
|
115
|
-
class ReturnToHome(MotionStep):
|
|
116
|
-
"""
|
|
117
|
-
Step which cases the robot to return home
|
|
118
|
-
"""
|
|
119
|
-
|
|
120
|
-
pose: Pose
|
|
121
|
-
type: Literal["return_to_home"] = "return_to_home"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
@dataclass
|
|
125
|
-
class Localize(MotionStep):
|
|
126
|
-
"""
|
|
127
|
-
Step which causes the robot to localize
|
|
128
|
-
"""
|
|
129
|
-
|
|
130
|
-
localization_pose: Pose
|
|
131
|
-
type: Literal["localize"] = "localize"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
@dataclass
|
|
135
|
-
class MoveArm(MotionStep):
|
|
136
|
-
"""
|
|
137
|
-
Step which causes the robot to move its arm
|
|
138
|
-
"""
|
|
139
|
-
|
|
140
|
-
arm_pose: str
|
|
141
|
-
type: Literal["move_arm"] = "move_arm"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
@dataclass
|
|
145
|
-
class TakeImage(InspectionStep):
|
|
146
|
-
"""
|
|
147
|
-
Step which causes the robot to take an image towards the given coordinate.
|
|
148
|
-
"""
|
|
149
|
-
|
|
150
|
-
target: Position
|
|
151
|
-
type: Literal["take_image"] = "take_image"
|
|
152
|
-
|
|
153
|
-
@staticmethod
|
|
154
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
155
|
-
return Image
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
@dataclass
|
|
159
|
-
class TakeThermalImage(InspectionStep):
|
|
160
|
-
"""
|
|
161
|
-
Step which causes the robot to take a thermal image towards the given coordinate.
|
|
162
|
-
"""
|
|
163
|
-
|
|
164
|
-
target: Position
|
|
165
|
-
type: Literal["take_thermal_image"] = "take_thermal_image"
|
|
166
|
-
|
|
167
|
-
@staticmethod
|
|
168
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
169
|
-
return ThermalImage
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
@dataclass
|
|
173
|
-
class TakeVideo(InspectionStep):
|
|
174
|
-
"""
|
|
175
|
-
Step which causes the robot to take a video towards the given coordinate.
|
|
176
|
-
|
|
177
|
-
Duration of video is given in seconds.
|
|
178
|
-
"""
|
|
179
|
-
|
|
180
|
-
target: Position
|
|
181
|
-
duration: float
|
|
182
|
-
type: Literal["take_video"] = "take_video"
|
|
183
|
-
|
|
184
|
-
@staticmethod
|
|
185
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
186
|
-
return Video
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
@dataclass
|
|
190
|
-
class TakeThermalVideo(InspectionStep):
|
|
191
|
-
"""
|
|
192
|
-
Step which causes the robot to record thermal video towards the given coordinate
|
|
193
|
-
|
|
194
|
-
Duration of video is given in seconds.
|
|
195
|
-
"""
|
|
196
|
-
|
|
197
|
-
target: Position
|
|
198
|
-
duration: float
|
|
199
|
-
type: Literal["take_thermal_video"] = "take_thermal_video"
|
|
200
|
-
|
|
201
|
-
@staticmethod
|
|
202
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
203
|
-
return ThermalVideo
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
@dataclass
|
|
207
|
-
class RecordAudio(InspectionStep):
|
|
208
|
-
"""
|
|
209
|
-
Step which causes the robot to record a video at its position, facing the target.
|
|
210
|
-
|
|
211
|
-
Duration of audio is given in seconds.
|
|
212
|
-
"""
|
|
213
|
-
|
|
214
|
-
target: Position
|
|
215
|
-
duration: float
|
|
216
|
-
type: Literal["record_audio"] = "record_audio"
|
|
217
|
-
|
|
218
|
-
@staticmethod
|
|
219
|
-
def get_inspection_type() -> Type[Inspection]:
|
|
220
|
-
return Audio
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
STEPS = Union[
|
|
224
|
-
DriveToPose,
|
|
225
|
-
DockingProcedure,
|
|
226
|
-
ReturnToHome,
|
|
227
|
-
Localize,
|
|
228
|
-
TakeImage,
|
|
229
|
-
TakeThermalImage,
|
|
230
|
-
TakeVideo,
|
|
231
|
-
TakeThermalVideo,
|
|
232
|
-
RecordAudio,
|
|
233
|
-
MoveArm,
|
|
234
|
-
]
|
|
File without changes
|
|
File without changes
|