isar 1.25.7__py3-none-any.whl → 1.25.9__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/api.py +0 -38
- isar/apis/models/start_mission_definition.py +0 -20
- isar/apis/schedule/scheduling_controller.py +0 -55
- isar/state_machine/state_machine.py +0 -4
- isar/state_machine/states/initialize.py +1 -2
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/METADATA +1 -1
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/RECORD +15 -16
- robot_interface/models/exceptions/robot_exceptions.py +0 -24
- robot_interface/models/mission/mission.py +0 -2
- robot_interface/models/mission/task.py +0 -22
- robot_interface/robot_interface.py +1 -6
- robot_interface/models/initialize/initialize_params.py +0 -9
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/LICENSE +0 -0
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/WHEEL +0 -0
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/entry_points.txt +0 -0
- {isar-1.25.7.dist-info → isar-1.25.9.dist-info}/top_level.txt +0 -0
isar/apis/api.py
CHANGED
|
@@ -212,44 +212,6 @@ class API:
|
|
|
212
212
|
},
|
|
213
213
|
},
|
|
214
214
|
)
|
|
215
|
-
router.add_api_route(
|
|
216
|
-
path="/schedule/drive-to",
|
|
217
|
-
endpoint=self.scheduling_controller.drive_to,
|
|
218
|
-
methods=["POST"],
|
|
219
|
-
dependencies=[authentication_dependency],
|
|
220
|
-
summary="Drive to the provided pose",
|
|
221
|
-
deprecated=True,
|
|
222
|
-
responses={
|
|
223
|
-
HTTPStatus.OK.value: {
|
|
224
|
-
"description": "Drive to succesfully started",
|
|
225
|
-
},
|
|
226
|
-
HTTPStatus.CONFLICT.value: {
|
|
227
|
-
"description": "Conflict - Invalid command in the current state",
|
|
228
|
-
},
|
|
229
|
-
HTTPStatus.INTERNAL_SERVER_ERROR.value: {
|
|
230
|
-
"description": "Internal Server Error - Current state of state machine unknown",
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
)
|
|
234
|
-
router.add_api_route(
|
|
235
|
-
path="/schedule/start-localization-mission",
|
|
236
|
-
endpoint=self.scheduling_controller.start_localization_mission,
|
|
237
|
-
methods=["POST"],
|
|
238
|
-
dependencies=[authentication_dependency],
|
|
239
|
-
summary="Localize at the provided pose",
|
|
240
|
-
deprecated=True,
|
|
241
|
-
responses={
|
|
242
|
-
HTTPStatus.OK.value: {
|
|
243
|
-
"description": "Localization succesfully started",
|
|
244
|
-
},
|
|
245
|
-
HTTPStatus.CONFLICT.value: {
|
|
246
|
-
"description": "Conflict - Invalid command in the current state",
|
|
247
|
-
},
|
|
248
|
-
HTTPStatus.INTERNAL_SERVER_ERROR.value: {
|
|
249
|
-
"description": "Internal Server Error - Current state of state machine unknown",
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
)
|
|
253
215
|
router.add_api_route(
|
|
254
216
|
path="/schedule/move_arm/{arm_pose_literal}",
|
|
255
217
|
endpoint=self.scheduling_controller.start_move_arm_mission,
|
|
@@ -10,8 +10,6 @@ from isar.mission_planner.mission_planner_interface import MissionPlannerError
|
|
|
10
10
|
from robot_interface.models.mission.mission import Mission
|
|
11
11
|
from robot_interface.models.mission.task import (
|
|
12
12
|
TASKS,
|
|
13
|
-
DockingProcedure,
|
|
14
|
-
Localize,
|
|
15
13
|
RecordAudio,
|
|
16
14
|
ReturnToHome,
|
|
17
15
|
TakeImage,
|
|
@@ -34,9 +32,7 @@ class InspectionTypes(str, Enum):
|
|
|
34
32
|
|
|
35
33
|
class TaskType(str, Enum):
|
|
36
34
|
Inspection = "inspection"
|
|
37
|
-
Localization = "localization"
|
|
38
35
|
ReturnToHome = "return_to_home"
|
|
39
|
-
Dock = "dock"
|
|
40
36
|
|
|
41
37
|
|
|
42
38
|
class StartMissionInspectionDefinition(BaseModel):
|
|
@@ -60,8 +56,6 @@ class StartMissionDefinition(BaseModel):
|
|
|
60
56
|
tasks: List[StartMissionTaskDefinition]
|
|
61
57
|
name: Optional[str] = None
|
|
62
58
|
start_pose: Optional[InputPose] = None
|
|
63
|
-
dock: Optional[bool] = Field(default=False)
|
|
64
|
-
undock: Optional[bool] = Field(default=False)
|
|
65
59
|
|
|
66
60
|
|
|
67
61
|
def to_isar_mission(
|
|
@@ -94,20 +88,14 @@ def to_isar_mission(
|
|
|
94
88
|
tasks=isar_tasks,
|
|
95
89
|
name=isar_mission_name,
|
|
96
90
|
start_pose=start_pose,
|
|
97
|
-
dock=start_mission_definition.dock,
|
|
98
|
-
undock=start_mission_definition.undock,
|
|
99
91
|
)
|
|
100
92
|
|
|
101
93
|
|
|
102
94
|
def to_isar_task(task_definition: StartMissionTaskDefinition) -> TASKS:
|
|
103
95
|
if task_definition.type == TaskType.Inspection:
|
|
104
96
|
return to_inspection_task(task_definition)
|
|
105
|
-
elif task_definition.type == TaskType.Localization:
|
|
106
|
-
return to_localization_task(task_definition)
|
|
107
97
|
elif task_definition.type == TaskType.ReturnToHome:
|
|
108
98
|
return create_return_to_home_task(task_definition)
|
|
109
|
-
elif task_definition.type == TaskType.Dock:
|
|
110
|
-
return create_dock_task()
|
|
111
99
|
else:
|
|
112
100
|
raise MissionPlannerError(
|
|
113
101
|
f"Failed to create task: '{task_definition.type}' is not a valid"
|
|
@@ -231,19 +219,11 @@ def to_inspection_task(task_definition: StartMissionTaskDefinition) -> TASKS:
|
|
|
231
219
|
)
|
|
232
220
|
|
|
233
221
|
|
|
234
|
-
def to_localization_task(task_definition: StartMissionTaskDefinition) -> Localize:
|
|
235
|
-
return Localize(localization_pose=task_definition.pose.to_alitra_pose())
|
|
236
|
-
|
|
237
|
-
|
|
238
222
|
def create_return_to_home_task(
|
|
239
223
|
task_definition: StartMissionTaskDefinition,
|
|
240
224
|
) -> ReturnToHome:
|
|
241
225
|
return ReturnToHome(pose=task_definition.pose.to_alitra_pose())
|
|
242
226
|
|
|
243
227
|
|
|
244
|
-
def create_dock_task() -> DockingProcedure:
|
|
245
|
-
return DockingProcedure(behavior="dock")
|
|
246
|
-
|
|
247
|
-
|
|
248
228
|
def _build_mission_name() -> str:
|
|
249
229
|
return f"{settings.PLANT_SHORT_NAME}{settings.ROBOT_NAME}{int(time.time())}"
|
|
@@ -24,7 +24,6 @@ from robot_interface.models.mission.mission import Mission
|
|
|
24
24
|
from robot_interface.models.mission.task import (
|
|
25
25
|
TASKS,
|
|
26
26
|
InspectionTask,
|
|
27
|
-
Localize,
|
|
28
27
|
MoveArm,
|
|
29
28
|
ReturnToHome,
|
|
30
29
|
)
|
|
@@ -203,60 +202,6 @@ class SchedulingController:
|
|
|
203
202
|
)
|
|
204
203
|
return stop_mission_response
|
|
205
204
|
|
|
206
|
-
def drive_to(
|
|
207
|
-
self,
|
|
208
|
-
target_pose: InputPose = Body(
|
|
209
|
-
default=None,
|
|
210
|
-
title="Target Pose",
|
|
211
|
-
description="The target pose for the drive_to task",
|
|
212
|
-
),
|
|
213
|
-
) -> StartMissionResponse:
|
|
214
|
-
self.logger.info("Received request to start new drive-to mission")
|
|
215
|
-
|
|
216
|
-
state: States = self.scheduling_utilities.get_state()
|
|
217
|
-
|
|
218
|
-
self.scheduling_utilities.verify_state_machine_ready_to_receive_mission(state)
|
|
219
|
-
|
|
220
|
-
pose: Pose = target_pose.to_alitra_pose()
|
|
221
|
-
mission: Mission = Mission(
|
|
222
|
-
name="Drive to pose", tasks=[ReturnToHome(pose=pose)]
|
|
223
|
-
)
|
|
224
|
-
|
|
225
|
-
self.logger.info(
|
|
226
|
-
f"Starting drive to mission with ISAR Mission ID: '{mission.id}'"
|
|
227
|
-
)
|
|
228
|
-
self.scheduling_utilities.start_mission(mission=mission, initial_pose=None)
|
|
229
|
-
return self._api_response(mission)
|
|
230
|
-
|
|
231
|
-
def start_localization_mission(
|
|
232
|
-
self,
|
|
233
|
-
localization_pose: InputPose = Body(
|
|
234
|
-
default=None,
|
|
235
|
-
embed=True,
|
|
236
|
-
title="Localization Pose",
|
|
237
|
-
description="The current position of the robot",
|
|
238
|
-
),
|
|
239
|
-
) -> StartMissionResponse:
|
|
240
|
-
self.logger.info("Received request to start new localization mission")
|
|
241
|
-
|
|
242
|
-
state: States = self.scheduling_utilities.get_state()
|
|
243
|
-
|
|
244
|
-
self.scheduling_utilities.verify_state_machine_ready_to_receive_mission(state)
|
|
245
|
-
|
|
246
|
-
pose: Pose = localization_pose.to_alitra_pose()
|
|
247
|
-
mission: Mission = Mission(
|
|
248
|
-
name="Localization mission", tasks=[Localize(localization_pose=pose)]
|
|
249
|
-
)
|
|
250
|
-
|
|
251
|
-
self.logger.info(
|
|
252
|
-
f"Starting localization mission with ISAR Mission ID: '{mission.id}'"
|
|
253
|
-
)
|
|
254
|
-
self.scheduling_utilities.start_mission(
|
|
255
|
-
mission=mission,
|
|
256
|
-
initial_pose=None,
|
|
257
|
-
)
|
|
258
|
-
return self._api_response(mission)
|
|
259
|
-
|
|
260
205
|
def start_move_arm_mission(
|
|
261
206
|
self,
|
|
262
207
|
arm_pose_literal: str = Path(
|
|
@@ -29,7 +29,6 @@ from isar.state_machine.states.paused import Paused
|
|
|
29
29
|
from isar.state_machine.states.stop import Stop
|
|
30
30
|
from isar.state_machine.states_enum import States
|
|
31
31
|
from robot_interface.models.exceptions.robot_exceptions import ErrorMessage
|
|
32
|
-
from robot_interface.models.initialize.initialize_params import InitializeParams
|
|
33
32
|
from robot_interface.models.mission.mission import Mission
|
|
34
33
|
from robot_interface.models.mission.status import MissionStatus, RobotStatus, TaskStatus
|
|
35
34
|
from robot_interface.models.mission.task import TASKS
|
|
@@ -389,9 +388,6 @@ class StateMachine(object):
|
|
|
389
388
|
|
|
390
389
|
self.task_selector.initialize(tasks=self.current_mission.tasks)
|
|
391
390
|
|
|
392
|
-
def get_initialize_params(self):
|
|
393
|
-
return InitializeParams(initial_pose=self.initial_pose)
|
|
394
|
-
|
|
395
391
|
def should_start_mission(self) -> Optional[StartMissionMessage]:
|
|
396
392
|
try:
|
|
397
393
|
return self.queues.start_mission.input.get(block=False)
|
|
@@ -2,13 +2,13 @@ isar/__init__.py,sha256=cH8p8bVveu3FUL6kBhldcSlLaoHgD82Kd0-SwSNfGXw,87
|
|
|
2
2
|
isar/modules.py,sha256=BeBg2kJi1q-7DzupOM3jFloeMScRk7qkNog9-yGwV5c,7355
|
|
3
3
|
isar/script.py,sha256=AHt1azidHit-fX3NnoXxJ5Eas-c30J3hFFOGGVrg084,5916
|
|
4
4
|
isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
isar/apis/api.py,sha256=
|
|
5
|
+
isar/apis/api.py,sha256=ARf7-GsjTSqWj9UOSiEJ1YnSF-fH7Tr0-mkkfL10MZ4,12620
|
|
6
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=
|
|
8
|
+
isar/apis/models/start_mission_definition.py,sha256=g9sgXu4RntckDQ87hi-hDTpgzojhJyxAJJGjEvmfg1g,8636
|
|
9
9
|
isar/apis/robot_control/robot_controller.py,sha256=o3WuEV30nduIiKF4pK6oNLUsmHyFal9--umjuDHx7h0,1150
|
|
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=1ipvPxZWl32TDxFY65ldUdDCvJfhgYxFEQv4eWayFCg,9461
|
|
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
|
|
@@ -65,12 +65,12 @@ isar/services/utilities/robot_utilities.py,sha256=4-ob4kcIiRN_GXFDBMwBadfbwpYqKE
|
|
|
65
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=
|
|
68
|
+
isar/state_machine/state_machine.py,sha256=448eXXqgcFCVIRbWPQE615-0BF8SaPiRCBmsnwLr8f0,19927
|
|
69
69
|
isar/state_machine/states_enum.py,sha256=GrX2dzVXsyI9vXxIgd7DpOP8V1nhXQS4Jym5z69acHY,332
|
|
70
70
|
isar/state_machine/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
71
|
isar/state_machine/states/blocked_protective_stop.py,sha256=FNOarwHzkUfRllyxltXSu7W_nXAxpqDhz9PIo6wxE1o,2259
|
|
72
72
|
isar/state_machine/states/idle.py,sha256=96CZCpBBPAZE_szF0UoPh6tBRsDn3FYII8bZ_cBFGuw,3815
|
|
73
|
-
isar/state_machine/states/initialize.py,sha256=
|
|
73
|
+
isar/state_machine/states/initialize.py,sha256=YFFA5D3IdhuMBjFYai5f-Z2DexyrFs9wg6AxjqHdu28,2294
|
|
74
74
|
isar/state_machine/states/initiate.py,sha256=xtKopnU5Ug_0PAV3yFm0v8O7DCa5CwGE4vN_7qahA0A,4139
|
|
75
75
|
isar/state_machine/states/monitor.py,sha256=5BpEO-yzVE_yJc6POdvcECOXyQDXMiijVry4C0s6tIw,9759
|
|
76
76
|
isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
|
|
@@ -85,19 +85,18 @@ isar/storage/storage_interface.py,sha256=DYDry4I7aZpDHJhsBF6s8zrgokFAc7fdKJKfA8A
|
|
|
85
85
|
isar/storage/uploader.py,sha256=LrbGlAGoqspWtSjmZcfvbRL3_khCnLWwa64XhqUrsr4,6543
|
|
86
86
|
isar/storage/utilities.py,sha256=fitsdQ1ox5gr9fk9VuSk_iTBiEAIS8NZAnHabUZORh0,3173
|
|
87
87
|
robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
-
robot_interface/robot_interface.py,sha256=
|
|
88
|
+
robot_interface/robot_interface.py,sha256=Bkk-joyIzRHxv8iZt7FLPFnlE8chlJad9vgjwc-fDkw,8786
|
|
89
89
|
robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
|
|
90
90
|
robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
91
|
robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
-
robot_interface/models/exceptions/robot_exceptions.py,sha256=
|
|
92
|
+
robot_interface/models/exceptions/robot_exceptions.py,sha256=u0vK1ny5UTX6767n0xeFLdLGL0ZbqiiBYuo6WgvVrnY,9436
|
|
93
93
|
robot_interface/models/initialize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
|
-
robot_interface/models/initialize/initialize_params.py,sha256=2eG5Aq5bDKU6tVkaUMAoc46GERBgyaKkqv6yLupdRLc,164
|
|
95
94
|
robot_interface/models/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
95
|
robot_interface/models/inspection/inspection.py,sha256=Q8vyiTMV2Ws1B4N10kQ3C1AZkck0Mh5pwOyWux7OQms,2318
|
|
97
96
|
robot_interface/models/mission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
|
-
robot_interface/models/mission/mission.py,sha256=
|
|
97
|
+
robot_interface/models/mission/mission.py,sha256=GR_X9-dIf-15oogfv_c6JNIKnTIk5u80rWLNUk95xm0,738
|
|
99
98
|
robot_interface/models/mission/status.py,sha256=48y8HEiT7QQbMLBUBYxXR92iZOrnBOukPZ7o09CCR1Q,686
|
|
100
|
-
robot_interface/models/mission/task.py,sha256=
|
|
99
|
+
robot_interface/models/mission/task.py,sha256=XDbckORORBLuokHm1OQlPPqB6vygsMZEuPTm0rYP9Js,4896
|
|
101
100
|
robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
101
|
robot_interface/models/robots/battery_state.py,sha256=ktOtJ8ltdK0k_i7BoqYfhc5dbOzIG6Oo-uWC67fCWio,98
|
|
103
102
|
robot_interface/models/robots/media.py,sha256=8A-CuuubfngzPprs6zWB9hSaqe3jzgsE8rcCzRX2Uto,227
|
|
@@ -108,9 +107,9 @@ robot_interface/telemetry/payloads.py,sha256=_Ph2f1M5f18fTJ7Jrd3JCeXhfZzg6i3THlF
|
|
|
108
107
|
robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
108
|
robot_interface/utilities/json_service.py,sha256=nU2Q_3P9Fq9hs6F_wtUjWtHfl_g1Siy-yDhXXSKwHwg,1018
|
|
110
109
|
robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
|
|
111
|
-
isar-1.25.
|
|
112
|
-
isar-1.25.
|
|
113
|
-
isar-1.25.
|
|
114
|
-
isar-1.25.
|
|
115
|
-
isar-1.25.
|
|
116
|
-
isar-1.25.
|
|
110
|
+
isar-1.25.9.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
|
|
111
|
+
isar-1.25.9.dist-info/METADATA,sha256=MCqYfN39-BbsF6lb9IGHXkQPX2gwf_CvIAh3rnHupjw,30578
|
|
112
|
+
isar-1.25.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
113
|
+
isar-1.25.9.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
|
|
114
|
+
isar-1.25.9.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
|
|
115
|
+
isar-1.25.9.dist-info/RECORD,,
|
|
@@ -22,8 +22,6 @@ class ErrorReason(str, Enum):
|
|
|
22
22
|
RobotTransformException = "robot_transform_exception"
|
|
23
23
|
RobotUnknownErrorException = "robot_unknown_error_exception"
|
|
24
24
|
RobotDisconnectedException = "robot_disconnected_exception"
|
|
25
|
-
RobotMissionNotSupportedException = "robot_mission_not_supported_exception"
|
|
26
|
-
RobotMissionMissingStartPoseException = "robot_mission_missing_start_pose_exception"
|
|
27
25
|
|
|
28
26
|
|
|
29
27
|
@dataclass
|
|
@@ -259,25 +257,3 @@ class RobotDisconnectedException(RobotException):
|
|
|
259
257
|
)
|
|
260
258
|
|
|
261
259
|
pass
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
# An exception which should be thrown by the robot package if the robot is given a mission type it cannot run, such as a localisation mission
|
|
265
|
-
class RobotMissionNotSupportedException(RobotException):
|
|
266
|
-
def __init__(self, error_description: str) -> None:
|
|
267
|
-
super().__init__(
|
|
268
|
-
error_reason=ErrorReason.RobotMissionNotSupportedException,
|
|
269
|
-
error_description=error_description,
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
pass
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
# An exception which should be thrown by the robot package if the mission is missing start pose and it needed it
|
|
276
|
-
class RobotMissionMissingStartPoseException(RobotException):
|
|
277
|
-
def __init__(self, error_description: str) -> None:
|
|
278
|
-
super().__init__(
|
|
279
|
-
error_reason=ErrorReason.RobotMissionMissingStartPoseException,
|
|
280
|
-
error_description=error_description,
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
pass
|
|
@@ -14,7 +14,5 @@ class Mission(BaseModel):
|
|
|
14
14
|
tasks: List[TASKS] = Field(default_factory=list, frozen=True)
|
|
15
15
|
name: str = Field(frozen=True)
|
|
16
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)
|
|
19
17
|
status: MissionStatus = MissionStatus.NotStarted
|
|
20
18
|
error_message: Optional[ErrorMessage] = Field(default=None)
|
|
@@ -20,7 +20,6 @@ from robot_interface.utilities.uuid_string_factory import uuid4_string
|
|
|
20
20
|
|
|
21
21
|
class TaskTypes(str, Enum):
|
|
22
22
|
ReturnToHome = "return_to_home"
|
|
23
|
-
Localize = "localize"
|
|
24
23
|
MoveArm = "move_arm"
|
|
25
24
|
TakeImage = "take_image"
|
|
26
25
|
TakeThermalImage = "take_thermal_image"
|
|
@@ -28,7 +27,6 @@ class TaskTypes(str, Enum):
|
|
|
28
27
|
TakeThermalVideo = "take_thermal_video"
|
|
29
28
|
TakeGasMeasurement = "take_gas_measurement"
|
|
30
29
|
RecordAudio = "record_audio"
|
|
31
|
-
DockingProcedure = "docking_procedure"
|
|
32
30
|
|
|
33
31
|
|
|
34
32
|
class ZoomDescription(BaseModel):
|
|
@@ -71,15 +69,6 @@ class InspectionTask(Task):
|
|
|
71
69
|
return Inspection
|
|
72
70
|
|
|
73
71
|
|
|
74
|
-
class DockingProcedure(Task):
|
|
75
|
-
"""
|
|
76
|
-
Task which causes the robot to dock or undock
|
|
77
|
-
"""
|
|
78
|
-
|
|
79
|
-
behavior: Literal["dock", "undock"] = Field(default=None)
|
|
80
|
-
type: Literal[TaskTypes.DockingProcedure] = TaskTypes.DockingProcedure
|
|
81
|
-
|
|
82
|
-
|
|
83
72
|
class ReturnToHome(Task):
|
|
84
73
|
"""
|
|
85
74
|
Task which cases the robot to return home
|
|
@@ -89,15 +78,6 @@ class ReturnToHome(Task):
|
|
|
89
78
|
type: Literal[TaskTypes.ReturnToHome] = TaskTypes.ReturnToHome
|
|
90
79
|
|
|
91
80
|
|
|
92
|
-
class Localize(Task):
|
|
93
|
-
"""
|
|
94
|
-
Task which causes the robot to localize
|
|
95
|
-
"""
|
|
96
|
-
|
|
97
|
-
localization_pose: Pose = Field(default=None)
|
|
98
|
-
type: Literal[TaskTypes.Localize] = TaskTypes.Localize
|
|
99
|
-
|
|
100
|
-
|
|
101
81
|
class MoveArm(Task):
|
|
102
82
|
"""
|
|
103
83
|
Task which causes the robot to move its arm
|
|
@@ -197,7 +177,6 @@ class TakeGasMeasurement(InspectionTask):
|
|
|
197
177
|
|
|
198
178
|
TASKS = Union[
|
|
199
179
|
ReturnToHome,
|
|
200
|
-
Localize,
|
|
201
180
|
MoveArm,
|
|
202
181
|
TakeImage,
|
|
203
182
|
TakeThermalImage,
|
|
@@ -205,5 +184,4 @@ TASKS = Union[
|
|
|
205
184
|
TakeThermalVideo,
|
|
206
185
|
TakeGasMeasurement,
|
|
207
186
|
RecordAudio,
|
|
208
|
-
DockingProcedure,
|
|
209
187
|
]
|
|
@@ -3,7 +3,6 @@ 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.initialize_params import InitializeParams
|
|
7
6
|
from robot_interface.models.inspection.inspection import Inspection
|
|
8
7
|
from robot_interface.models.mission.mission import Mission
|
|
9
8
|
from robot_interface.models.mission.status import RobotStatus, TaskStatus
|
|
@@ -186,15 +185,11 @@ class RobotInterface(metaclass=ABCMeta):
|
|
|
186
185
|
raise NotImplementedError
|
|
187
186
|
|
|
188
187
|
@abstractmethod
|
|
189
|
-
def initialize(self
|
|
188
|
+
def initialize(self) -> None:
|
|
190
189
|
"""Initializes the robot. The initialization needed is robot dependent and the
|
|
191
190
|
function can be a simple return statement if no initialization is needed for the
|
|
192
191
|
robot.
|
|
193
192
|
|
|
194
|
-
Parameters
|
|
195
|
-
----------
|
|
196
|
-
params: InitializeParams
|
|
197
|
-
|
|
198
193
|
Returns
|
|
199
194
|
-------
|
|
200
195
|
None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|