isar 1.24.1__py3-none-any.whl → 1.24.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of isar might be problematic. Click here for more details.
- isar/apis/api.py +21 -1
- isar/apis/models/models.py +9 -0
- isar/apis/robot_control/robot_controller.py +35 -0
- isar/apis/schedule/scheduling_controller.py +2 -18
- isar/modules.py +22 -3
- isar/services/utilities/robot_utilities.py +23 -0
- isar/state_machine/state_machine.py +21 -6
- isar/state_machine/states/idle.py +3 -0
- isar/state_machine/states/monitor.py +11 -7
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/METADATA +1 -1
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/RECORD +18 -16
- robot_interface/robot_interface.py +14 -0
- robot_interface/telemetry/payloads.py +0 -8
- {robot_interface/telemetry → isar/apis/models}/media_connection_type.py +0 -0
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/LICENSE +0 -0
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/WHEEL +0 -0
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/entry_points.txt +0 -0
- {isar-1.24.1.dist-info → isar-1.24.3.dist-info}/top_level.txt +0 -0
isar/apis/api.py
CHANGED
|
@@ -17,6 +17,7 @@ from opencensus.trace.tracer import Tracer
|
|
|
17
17
|
from pydantic import AnyHttpUrl
|
|
18
18
|
|
|
19
19
|
from isar.apis.models.models import ControlMissionResponse, StartMissionResponse
|
|
20
|
+
from isar.apis.robot_control.robot_controller import RobotController
|
|
20
21
|
from isar.apis.schedule.scheduling_controller import SchedulingController
|
|
21
22
|
from isar.apis.security.authentication import Authenticator
|
|
22
23
|
from isar.config.configuration_error import ConfigurationError
|
|
@@ -34,12 +35,14 @@ class API:
|
|
|
34
35
|
self,
|
|
35
36
|
authenticator: Authenticator,
|
|
36
37
|
scheduling_controller: SchedulingController,
|
|
38
|
+
robot_controller: RobotController,
|
|
37
39
|
keyvault_client: Keyvault,
|
|
38
40
|
port: int = settings.API_PORT,
|
|
39
41
|
azure_ai_logging_enabled: bool = settings.LOG_HANDLER_APPLICATION_INSIGHTS_ENABLED,
|
|
40
42
|
) -> None:
|
|
41
43
|
self.authenticator: Authenticator = authenticator
|
|
42
44
|
self.scheduling_controller: SchedulingController = scheduling_controller
|
|
45
|
+
self.robot_controller: RobotController = robot_controller
|
|
43
46
|
self.keyvault_client: Keyvault = keyvault_client
|
|
44
47
|
self.host: str = "0.0.0.0" # Locking uvicorn to use 0.0.0.0
|
|
45
48
|
self.port: int = port
|
|
@@ -98,6 +101,8 @@ class API:
|
|
|
98
101
|
|
|
99
102
|
app.include_router(router=self._create_info_router())
|
|
100
103
|
|
|
104
|
+
app.include_router(router=self._create_media_control_router())
|
|
105
|
+
|
|
101
106
|
return app
|
|
102
107
|
|
|
103
108
|
def _create_scheduler_router(self) -> APIRouter:
|
|
@@ -277,7 +282,7 @@ class API:
|
|
|
277
282
|
|
|
278
283
|
router.add_api_route(
|
|
279
284
|
path="/info/robot-settings",
|
|
280
|
-
endpoint=self.
|
|
285
|
+
endpoint=self.robot_controller.get_info,
|
|
281
286
|
methods=["GET"],
|
|
282
287
|
dependencies=[authentication_dependency],
|
|
283
288
|
summary="Information about the robot-settings",
|
|
@@ -285,6 +290,21 @@ class API:
|
|
|
285
290
|
|
|
286
291
|
return router
|
|
287
292
|
|
|
293
|
+
def _create_media_control_router(self) -> APIRouter:
|
|
294
|
+
router: APIRouter = APIRouter(tags=["Media"])
|
|
295
|
+
|
|
296
|
+
authentication_dependency: Security = Security(self.authenticator.get_scheme())
|
|
297
|
+
|
|
298
|
+
router.add_api_route(
|
|
299
|
+
path="/media/media-stream-config",
|
|
300
|
+
endpoint=self.robot_controller.generate_media_config,
|
|
301
|
+
methods=["GET"],
|
|
302
|
+
dependencies=[authentication_dependency],
|
|
303
|
+
summary="Generates a media stream connection config",
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
return router
|
|
307
|
+
|
|
288
308
|
def _log_startup_message(self) -> None:
|
|
289
309
|
address_format = "%s://%s:%d/docs"
|
|
290
310
|
message = f"Uvicorn running on {address_format} (Press CTRL+C to quit)"
|
isar/apis/models/models.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
1
2
|
from typing import List, Optional
|
|
2
3
|
|
|
3
4
|
from alitra import Frame, Orientation, Pose, Position
|
|
5
|
+
from isar.apis.models.media_connection_type import MediaConnectionType
|
|
4
6
|
from pydantic import BaseModel, Field
|
|
5
7
|
|
|
6
8
|
from robot_interface.models.mission.task import TaskTypes
|
|
@@ -33,6 +35,13 @@ class RobotInfoResponse(BaseModel):
|
|
|
33
35
|
plant_short_name: str
|
|
34
36
|
|
|
35
37
|
|
|
38
|
+
@dataclass
|
|
39
|
+
class MediaConfig:
|
|
40
|
+
url: str
|
|
41
|
+
token: str
|
|
42
|
+
media_connection_type: MediaConnectionType
|
|
43
|
+
|
|
44
|
+
|
|
36
45
|
class InputOrientation(BaseModel):
|
|
37
46
|
x: float
|
|
38
47
|
y: float
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import List
|
|
3
|
+
|
|
4
|
+
from injector import inject
|
|
5
|
+
|
|
6
|
+
from isar.apis.models.models import (
|
|
7
|
+
RobotInfoResponse,
|
|
8
|
+
TaskResponse,
|
|
9
|
+
)
|
|
10
|
+
from isar.config.settings import robot_settings, settings
|
|
11
|
+
from isar.services.utilities.robot_utilities import RobotUtilities
|
|
12
|
+
from robot_interface.models.mission.task import Task
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RobotController:
|
|
16
|
+
@inject
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
robot_utilities: RobotUtilities,
|
|
20
|
+
):
|
|
21
|
+
self.robot_utilities: RobotUtilities = robot_utilities
|
|
22
|
+
self.logger = logging.getLogger("api")
|
|
23
|
+
|
|
24
|
+
def generate_media_config(self):
|
|
25
|
+
return self.robot_utilities.generate_media_config()
|
|
26
|
+
|
|
27
|
+
def get_info(self):
|
|
28
|
+
return RobotInfoResponse(
|
|
29
|
+
robot_package=settings.ROBOT_PACKAGE,
|
|
30
|
+
isar_id=settings.ISAR_ID,
|
|
31
|
+
robot_name=settings.ROBOT_NAME,
|
|
32
|
+
robot_capabilities=robot_settings.CAPABILITIES,
|
|
33
|
+
robot_map_name=settings.DEFAULT_MAP,
|
|
34
|
+
plant_short_name=settings.PLANT_SHORT_NAME,
|
|
35
|
+
)
|
|
@@ -21,13 +21,7 @@ from isar.mission_planner.mission_planner_interface import MissionPlannerError
|
|
|
21
21
|
from isar.services.utilities.scheduling_utilities import SchedulingUtilities
|
|
22
22
|
from isar.state_machine.states_enum import States
|
|
23
23
|
from robot_interface.models.mission.mission import Mission
|
|
24
|
-
from robot_interface.models.mission.task import
|
|
25
|
-
TASKS,
|
|
26
|
-
Localize,
|
|
27
|
-
MoveArm,
|
|
28
|
-
ReturnToHome,
|
|
29
|
-
)
|
|
30
|
-
from robot_interface.models.mission.task import Task
|
|
24
|
+
from robot_interface.models.mission.task import TASKS, Localize, MoveArm, ReturnToHome
|
|
31
25
|
|
|
32
26
|
|
|
33
27
|
class SchedulingController:
|
|
@@ -192,7 +186,7 @@ class SchedulingController:
|
|
|
192
186
|
|
|
193
187
|
state: States = self.scheduling_utilities.get_state()
|
|
194
188
|
|
|
195
|
-
if state
|
|
189
|
+
if state == States.Off:
|
|
196
190
|
error_message = (
|
|
197
191
|
f"Conflict - Stop command received in invalid state - State: {state}"
|
|
198
192
|
)
|
|
@@ -301,16 +295,6 @@ class SchedulingController:
|
|
|
301
295
|
)
|
|
302
296
|
return self._api_response(mission)
|
|
303
297
|
|
|
304
|
-
def get_info(self):
|
|
305
|
-
return RobotInfoResponse(
|
|
306
|
-
robot_package=settings.ROBOT_PACKAGE,
|
|
307
|
-
isar_id=settings.ISAR_ID,
|
|
308
|
-
robot_name=settings.ROBOT_NAME,
|
|
309
|
-
robot_capabilities=robot_settings.CAPABILITIES,
|
|
310
|
-
robot_map_name=settings.DEFAULT_MAP,
|
|
311
|
-
plant_short_name=settings.PLANT_SHORT_NAME,
|
|
312
|
-
)
|
|
313
|
-
|
|
314
298
|
def _api_response(self, mission: Mission) -> StartMissionResponse:
|
|
315
299
|
return StartMissionResponse(
|
|
316
300
|
id=mission.id,
|
isar/modules.py
CHANGED
|
@@ -8,6 +8,7 @@ from injector import Injector, Module, multiprovider, provider, singleton
|
|
|
8
8
|
|
|
9
9
|
from isar.apis.api import API
|
|
10
10
|
from isar.apis.schedule.scheduling_controller import SchedulingController
|
|
11
|
+
from isar.apis.robot_control.robot_controller import RobotController
|
|
11
12
|
from isar.apis.security.authentication import Authenticator
|
|
12
13
|
from isar.config.keyvault.keyvault_service import Keyvault
|
|
13
14
|
from isar.config.settings import settings
|
|
@@ -18,6 +19,7 @@ from isar.mission_planner.task_selector_interface import TaskSelectorInterface
|
|
|
18
19
|
from isar.models.communication.queues.queues import Queues
|
|
19
20
|
from isar.services.service_connections.request_handler import RequestHandler
|
|
20
21
|
from isar.services.utilities.scheduling_utilities import SchedulingUtilities
|
|
22
|
+
from isar.services.utilities.robot_utilities import RobotUtilities
|
|
21
23
|
from isar.state_machine.state_machine import StateMachine
|
|
22
24
|
from isar.storage.blob_storage import BlobStorage
|
|
23
25
|
from isar.storage.local_storage import LocalStorage
|
|
@@ -35,9 +37,10 @@ class APIModule(Module):
|
|
|
35
37
|
self,
|
|
36
38
|
authenticator: Authenticator,
|
|
37
39
|
scheduling_controller: SchedulingController,
|
|
40
|
+
robot_controller: RobotController,
|
|
38
41
|
keyvault: Keyvault,
|
|
39
42
|
) -> API:
|
|
40
|
-
return API(authenticator, scheduling_controller, keyvault)
|
|
43
|
+
return API(authenticator, scheduling_controller, robot_controller, keyvault)
|
|
41
44
|
|
|
42
45
|
@provider
|
|
43
46
|
@singleton
|
|
@@ -47,6 +50,14 @@ class APIModule(Module):
|
|
|
47
50
|
) -> SchedulingController:
|
|
48
51
|
return SchedulingController(scheduling_utilities)
|
|
49
52
|
|
|
53
|
+
@provider
|
|
54
|
+
@singleton
|
|
55
|
+
def provide_robot_controller(
|
|
56
|
+
self,
|
|
57
|
+
robot_utilities: RobotUtilities,
|
|
58
|
+
) -> RobotController:
|
|
59
|
+
return RobotController(robot_utilities)
|
|
60
|
+
|
|
50
61
|
|
|
51
62
|
class AuthenticationModule(Module):
|
|
52
63
|
@provider
|
|
@@ -142,7 +153,7 @@ class UploaderModule(Module):
|
|
|
142
153
|
)
|
|
143
154
|
|
|
144
155
|
|
|
145
|
-
class
|
|
156
|
+
class SchedulingUtilitiesModule(Module):
|
|
146
157
|
@provider
|
|
147
158
|
@singleton
|
|
148
159
|
def provide_scheduling_utilities(
|
|
@@ -151,6 +162,13 @@ class UtilitiesModule(Module):
|
|
|
151
162
|
return SchedulingUtilities(queues, mission_planner)
|
|
152
163
|
|
|
153
164
|
|
|
165
|
+
class RobotUtilitiesModule(Module):
|
|
166
|
+
@provider
|
|
167
|
+
@singleton
|
|
168
|
+
def provide_robot_utilities(self, robot: RobotInterface) -> RobotUtilities:
|
|
169
|
+
return RobotUtilities(robot)
|
|
170
|
+
|
|
171
|
+
|
|
154
172
|
class ServiceModule(Module):
|
|
155
173
|
@provider
|
|
156
174
|
@singleton
|
|
@@ -193,7 +211,8 @@ modules: Dict[str, Tuple[Module, Union[str, bool]]] = {
|
|
|
193
211
|
"storage_blob": (BlobStorageModule, settings.STORAGE_BLOB_ENABLED),
|
|
194
212
|
"storage_slimm": (SlimmStorageModule, settings.STORAGE_SLIMM_ENABLED),
|
|
195
213
|
"mqtt": (MqttModule, "required"),
|
|
196
|
-
"utilities": (
|
|
214
|
+
"utilities": (SchedulingUtilitiesModule, "required"),
|
|
215
|
+
"robot_utilities": (RobotUtilitiesModule, "required"),
|
|
197
216
|
}
|
|
198
217
|
|
|
199
218
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
from injector import inject
|
|
4
|
+
|
|
5
|
+
from isar.apis.models.models import MediaConfig
|
|
6
|
+
from robot_interface.robot_interface import RobotInterface
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RobotUtilities:
|
|
10
|
+
"""
|
|
11
|
+
Contains utility functions for getting robot information from the API.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@inject
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
robot: RobotInterface,
|
|
18
|
+
):
|
|
19
|
+
self.robot: RobotInterface = robot
|
|
20
|
+
self.logger = logging.getLogger("api")
|
|
21
|
+
|
|
22
|
+
def generate_media_config(self) -> MediaConfig:
|
|
23
|
+
return self.robot.generate_media_config()
|
|
@@ -32,11 +32,7 @@ from isar.state_machine.states_enum import States
|
|
|
32
32
|
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
|
-
from robot_interface.models.mission.status import
|
|
36
|
-
MissionStatus,
|
|
37
|
-
RobotStatus,
|
|
38
|
-
TaskStatus,
|
|
39
|
-
)
|
|
35
|
+
from robot_interface.models.mission.status import MissionStatus, RobotStatus, TaskStatus
|
|
40
36
|
from robot_interface.models.mission.task import TASKS, Task
|
|
41
37
|
from robot_interface.robot_interface import RobotInterface
|
|
42
38
|
from robot_interface.telemetry.mqtt_client import MqttClientInterface
|
|
@@ -134,7 +130,11 @@ class StateMachine(object):
|
|
|
134
130
|
},
|
|
135
131
|
{
|
|
136
132
|
"trigger": "stop",
|
|
137
|
-
"source": [
|
|
133
|
+
"source": [
|
|
134
|
+
self.initiate_state,
|
|
135
|
+
self.monitor_state,
|
|
136
|
+
self.idle_state,
|
|
137
|
+
],
|
|
138
138
|
"dest": self.stop_state,
|
|
139
139
|
"before": self._stop,
|
|
140
140
|
},
|
|
@@ -371,6 +371,11 @@ class StateMachine(object):
|
|
|
371
371
|
self.iterate_current_task()
|
|
372
372
|
|
|
373
373
|
def _mission_stopped(self) -> None:
|
|
374
|
+
if self.current_mission is None:
|
|
375
|
+
self._queue_empty_response()
|
|
376
|
+
self.reset_state_machine()
|
|
377
|
+
return
|
|
378
|
+
|
|
374
379
|
self.current_mission.status = MissionStatus.Cancelled
|
|
375
380
|
|
|
376
381
|
for task in self.current_mission.tasks:
|
|
@@ -588,6 +593,16 @@ class StateMachine(object):
|
|
|
588
593
|
task_status=self.current_task.status,
|
|
589
594
|
)
|
|
590
595
|
|
|
596
|
+
def _queue_empty_response(self):
|
|
597
|
+
self.queues.stop_mission.output.put(
|
|
598
|
+
ControlMissionResponse(
|
|
599
|
+
mission_id="None",
|
|
600
|
+
mission_status="None",
|
|
601
|
+
task_id="None",
|
|
602
|
+
task_status="None",
|
|
603
|
+
)
|
|
604
|
+
)
|
|
605
|
+
|
|
591
606
|
|
|
592
607
|
def main(state_machine: StateMachine):
|
|
593
608
|
"""Starts a state machine instance."""
|
|
@@ -36,6 +36,9 @@ class Idle(State):
|
|
|
36
36
|
|
|
37
37
|
def _run(self) -> None:
|
|
38
38
|
while True:
|
|
39
|
+
if self.state_machine.should_stop_mission():
|
|
40
|
+
transition = self.state_machine.stop # type: ignore
|
|
41
|
+
break
|
|
39
42
|
start_mission: Optional[StartMissionMessage] = (
|
|
40
43
|
self.state_machine.should_start_mission()
|
|
41
44
|
)
|
|
@@ -49,7 +49,6 @@ class Monitor(State):
|
|
|
49
49
|
if self.task_status_thread:
|
|
50
50
|
self.task_status_thread.wait_for_thread()
|
|
51
51
|
self.task_status_thread = None
|
|
52
|
-
self.request_status_failure_counter = 0
|
|
53
52
|
|
|
54
53
|
def _run(self) -> None:
|
|
55
54
|
transition: Callable
|
|
@@ -76,15 +75,19 @@ class Monitor(State):
|
|
|
76
75
|
except ThreadedRequestNotFinishedError:
|
|
77
76
|
time.sleep(self.state_machine.sleep_time)
|
|
78
77
|
continue
|
|
79
|
-
|
|
80
78
|
except (
|
|
81
79
|
RobotCommunicationTimeoutException,
|
|
82
80
|
RobotCommunicationException,
|
|
83
81
|
) as e:
|
|
84
|
-
|
|
85
|
-
if
|
|
82
|
+
retry_limit_exceeded: bool = self._check_if_exceeded_retry_limit(e)
|
|
83
|
+
if retry_limit_exceeded:
|
|
84
|
+
self.logger.error(
|
|
85
|
+
f"Monitoring task {self.state_machine.current_task.id[:8]} failed "
|
|
86
|
+
f"because: {e.error_description}"
|
|
87
|
+
)
|
|
86
88
|
status = TaskStatus.Failed
|
|
87
89
|
else:
|
|
90
|
+
time.sleep(self.state_machine.sleep_time)
|
|
88
91
|
continue
|
|
89
92
|
|
|
90
93
|
except RobotTaskStatusException as e:
|
|
@@ -111,7 +114,7 @@ class Monitor(State):
|
|
|
111
114
|
)
|
|
112
115
|
break
|
|
113
116
|
|
|
114
|
-
if self.state_machine.current_task
|
|
117
|
+
if self.state_machine.current_task is None:
|
|
115
118
|
self.state_machine.iterate_current_task()
|
|
116
119
|
|
|
117
120
|
self.state_machine.current_task.status = status
|
|
@@ -142,7 +145,7 @@ class Monitor(State):
|
|
|
142
145
|
)
|
|
143
146
|
|
|
144
147
|
self.state_machine.iterate_current_task()
|
|
145
|
-
if self.state_machine.current_task
|
|
148
|
+
if self.state_machine.current_task is None:
|
|
146
149
|
transition = self.state_machine.full_mission_finished # type: ignore
|
|
147
150
|
break
|
|
148
151
|
|
|
@@ -193,6 +196,7 @@ class Monitor(State):
|
|
|
193
196
|
self.logger.info(f"Inspection: {str(inspection.id)[:8]} queued for upload")
|
|
194
197
|
|
|
195
198
|
def _report_task_status(self, task: Task) -> None:
|
|
199
|
+
self.request_status_failure_counter = 0
|
|
196
200
|
if task.status == TaskStatus.Failed:
|
|
197
201
|
self.logger.warning(
|
|
198
202
|
f"Task: {str(task.id)[:8]} was reported as failed by the robot"
|
|
@@ -215,7 +219,7 @@ class Monitor(State):
|
|
|
215
219
|
)
|
|
216
220
|
self.state_machine.current_task.error_message = error_message
|
|
217
221
|
|
|
218
|
-
def
|
|
222
|
+
def _check_if_exceeded_retry_limit(
|
|
219
223
|
self, e: Union[RobotCommunicationTimeoutException, RobotCommunicationException]
|
|
220
224
|
) -> bool:
|
|
221
225
|
self.state_machine.current_mission.error_message = ErrorMessage(
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
isar/__init__.py,sha256=cH8p8bVveu3FUL6kBhldcSlLaoHgD82Kd0-SwSNfGXw,87
|
|
2
|
-
isar/modules.py,sha256=
|
|
2
|
+
isar/modules.py,sha256=da1oE79leMID2cQKrVgahFyo-NAqNa_UA0PNHCA3Zt8,7361
|
|
3
3
|
isar/script.py,sha256=9cIRRTnuMbIAj435tGyoSpTkyGL4huCxfppvMtV2p4Y,5965
|
|
4
4
|
isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
isar/apis/api.py,sha256=
|
|
5
|
+
isar/apis/api.py,sha256=vUy7QbHrKcTHjh2rkU7lqQPkCasI6umha8r6H88JiXE,13942
|
|
6
6
|
isar/apis/models/__init__.py,sha256=NI1BYyN__Ogr00Qqe0XJ-9gEVPva2brXo2RJsbrS4tM,52
|
|
7
|
-
isar/apis/models/
|
|
7
|
+
isar/apis/models/media_connection_type.py,sha256=Z8Jayi5SjBJh_xEd5KdS__A6bM-nofbSAedc6u41iAY,91
|
|
8
|
+
isar/apis/models/models.py,sha256=3zbQbYlj4NX2pyiy8PuoMhY9RKg2a7o2gROHd_yEG3M,1921
|
|
8
9
|
isar/apis/models/start_mission_definition.py,sha256=oY2CRKNkf4DQys0lbz-WTib1Ppw_OUwHqhBTrBhUJQk,8044
|
|
10
|
+
isar/apis/robot_control/robot_controller.py,sha256=en6j-dHIxUXraREz7JETqtxgHl79ks7TBgBwPKc6VQE,1019
|
|
9
11
|
isar/apis/schedule/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
isar/apis/schedule/scheduling_controller.py,sha256=
|
|
12
|
+
isar/apis/schedule/scheduling_controller.py,sha256=ALfFYgNSEBWJPI8L5a9xHQUPksKkkJqEN1pc_7k-ZzU,11053
|
|
11
13
|
isar/apis/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
14
|
isar/apis/security/authentication.py,sha256=TI8U9Y_L6ihHLMeM50ZONd5EPfuHdw_XMU_Q987W4AY,1975
|
|
13
15
|
isar/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -64,16 +66,17 @@ isar/services/service_connections/mqtt/robot_info_publisher.py,sha256=5G6ahslydh
|
|
|
64
66
|
isar/services/service_connections/stid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
67
|
isar/services/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
68
|
isar/services/utilities/queue_utilities.py,sha256=Pw3hehSwkXJNeDv-bDVDfs58VOwtt3i5hpiJ2ZpphuQ,1225
|
|
69
|
+
isar/services/utilities/robot_utilities.py,sha256=90QSZRrPaRXATJOLBNmlkVpHZxGohYB9BBPCsE2gUoA,543
|
|
67
70
|
isar/services/utilities/scheduling_utilities.py,sha256=UUMxhudY2mQRG6Edjq6BG7oxwlqmcu5h6fMyw4Vhl_o,8376
|
|
68
71
|
isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
|
|
69
72
|
isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
-
isar/state_machine/state_machine.py,sha256=
|
|
73
|
+
isar/state_machine/state_machine.py,sha256=ceH0WiQNVMYIe7mVuH62L7OPPGrj1Qx2FuToIYBRQlk,21820
|
|
71
74
|
isar/state_machine/states_enum.py,sha256=BlrUcBWkM5K6D_UZXRwTaUgGpAagWmVZH6HhDBGzVU4,278
|
|
72
75
|
isar/state_machine/states/__init__.py,sha256=kErbKPDTwNfCLijvdyN6_AuOqDwR23nu9F0Qovsnir4,218
|
|
73
|
-
isar/state_machine/states/idle.py,sha256=
|
|
76
|
+
isar/state_machine/states/idle.py,sha256=wKEG3QzmEO3MfFCwbh9vBRZin3sby_cwXhm85Fke9-s,3224
|
|
74
77
|
isar/state_machine/states/initialize.py,sha256=TVXV5Ps3N4_flM88j9pQiX88kZgLzLwzlJy_6hPbgcA,2359
|
|
75
78
|
isar/state_machine/states/initiate.py,sha256=j1wvSC3zVODgRkKOVsQROiuWkjihSBtwCs5GsoivLvc,5655
|
|
76
|
-
isar/state_machine/states/monitor.py,sha256=
|
|
79
|
+
isar/state_machine/states/monitor.py,sha256=bcrLKftME7tWUGCwx_wj6myZToD4BBJT3jq9WMbpd0w,9874
|
|
77
80
|
isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
|
|
78
81
|
isar/state_machine/states/offline.py,sha256=IfEZ6-kl6OfJSRT1eKHOey7AU23tKiSHqpwGqclmH_c,2166
|
|
79
82
|
isar/state_machine/states/paused.py,sha256=TIg1iJvAxGUIfzE_qWp0wrq4Ka0a3zEf3GNwIWLIK0M,1177
|
|
@@ -86,7 +89,7 @@ isar/storage/storage_interface.py,sha256=DYDry4I7aZpDHJhsBF6s8zrgokFAc7fdKJKfA8A
|
|
|
86
89
|
isar/storage/uploader.py,sha256=JBlgaHYdFFUPlkx0eI0HBhP93fr9PIPTaYp6HG0iMeU,6509
|
|
87
90
|
isar/storage/utilities.py,sha256=AGqOzhnyPXSStpJjBstqQ4QgUoHJioQB2DJ1NqeWn_w,3136
|
|
88
91
|
robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
|
-
robot_interface/robot_interface.py,sha256=
|
|
92
|
+
robot_interface/robot_interface.py,sha256=WAH9Pop4Y9M5x3SS7mPllalgmmPJQybFRB2rT0hHAiU,9527
|
|
90
93
|
robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
|
|
91
94
|
robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
95
|
robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -102,15 +105,14 @@ robot_interface/models/mission/task.py,sha256=Qy2XmOmk8HChXMe1y8Dn9PvgA2W98Ypd1V
|
|
|
102
105
|
robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
103
106
|
robot_interface/models/robots/robot_model.py,sha256=pZQsqhn9hh6XE3EjMZhWMzYqg5oJ4CJ4CXeOASKvEf8,452
|
|
104
107
|
robot_interface/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
|
-
robot_interface/telemetry/media_connection_type.py,sha256=Z8Jayi5SjBJh_xEd5KdS__A6bM-nofbSAedc6u41iAY,91
|
|
106
108
|
robot_interface/telemetry/mqtt_client.py,sha256=DkzYZNWFaJkG3AVc0dM4Bj52hZEQj-14Q75zqzQcv9A,2988
|
|
107
|
-
robot_interface/telemetry/payloads.py,sha256=
|
|
109
|
+
robot_interface/telemetry/payloads.py,sha256=JM5E_IHkZpim_zdwc-w52D7dYFBeP4iO1-xupOkHcFQ,1562
|
|
108
110
|
robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
111
|
robot_interface/utilities/json_service.py,sha256=nU2Q_3P9Fq9hs6F_wtUjWtHfl_g1Siy-yDhXXSKwHwg,1018
|
|
110
112
|
robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
|
|
111
|
-
isar-1.24.
|
|
112
|
-
isar-1.24.
|
|
113
|
-
isar-1.24.
|
|
114
|
-
isar-1.24.
|
|
115
|
-
isar-1.24.
|
|
116
|
-
isar-1.24.
|
|
113
|
+
isar-1.24.3.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
|
|
114
|
+
isar-1.24.3.dist-info/METADATA,sha256=ZoTxrm0IQXDQ3vgg0xm6GMfxzAwFiDv8fTnTXrwOl4o,30661
|
|
115
|
+
isar-1.24.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
116
|
+
isar-1.24.3.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
|
|
117
|
+
isar-1.24.3.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
|
|
118
|
+
isar-1.24.3.dist-info/RECORD,,
|
|
@@ -3,6 +3,7 @@ from queue import Queue
|
|
|
3
3
|
from threading import Thread
|
|
4
4
|
from typing import Callable, List
|
|
5
5
|
|
|
6
|
+
from isar.apis.models.models import MediaConfig
|
|
6
7
|
from robot_interface.models.initialize import InitializeParams
|
|
7
8
|
from robot_interface.models.inspection.inspection import Inspection
|
|
8
9
|
from robot_interface.models.mission.mission import Mission
|
|
@@ -224,6 +225,19 @@ class RobotInterface(metaclass=ABCMeta):
|
|
|
224
225
|
"""
|
|
225
226
|
raise NotImplementedError
|
|
226
227
|
|
|
228
|
+
@abstractmethod
|
|
229
|
+
def generate_media_config(self) -> MediaConfig:
|
|
230
|
+
"""
|
|
231
|
+
Generate a JSON containing the url and token needed to establish a media stream
|
|
232
|
+
connection to a robot.
|
|
233
|
+
|
|
234
|
+
Returns
|
|
235
|
+
-------
|
|
236
|
+
MediaConfig
|
|
237
|
+
An object containing the connection information for a media stream connection
|
|
238
|
+
"""
|
|
239
|
+
raise NotImplementedError
|
|
240
|
+
|
|
227
241
|
@abstractmethod
|
|
228
242
|
def get_telemetry_publishers(
|
|
229
243
|
self, queue: Queue, isar_id: str, robot_name: str
|
|
@@ -6,7 +6,6 @@ from alitra import Pose
|
|
|
6
6
|
from transitions import State
|
|
7
7
|
|
|
8
8
|
from robot_interface.models.mission.status import RobotStatus
|
|
9
|
-
from robot_interface.telemetry.media_connection_type import MediaConnectionType
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
@dataclass
|
|
@@ -56,13 +55,6 @@ class VideoStream:
|
|
|
56
55
|
type: str
|
|
57
56
|
|
|
58
57
|
|
|
59
|
-
@dataclass
|
|
60
|
-
class MediaConfig(TelemetryPayload):
|
|
61
|
-
url: str
|
|
62
|
-
token: str
|
|
63
|
-
media_connection_type: MediaConnectionType
|
|
64
|
-
|
|
65
|
-
|
|
66
58
|
@dataclass
|
|
67
59
|
class RobotStatusPayload:
|
|
68
60
|
isar_id: str
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|