isar 1.20.3__py3-none-any.whl → 1.21.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of isar might be problematic. Click here for more details.

isar/config/settings.py CHANGED
@@ -341,3 +341,7 @@ class RobotSettings(BaseSettings):
341
341
 
342
342
 
343
343
  robot_settings = RobotSettings()
344
+
345
+ if not settings.RUN_MISSION_STEPWISE: # If mission-wise, do not run localize missions
346
+ if "localize" in robot_settings.CAPABILITIES:
347
+ robot_settings.CAPABILITIES.remove("localize")
isar/script.py CHANGED
@@ -10,7 +10,7 @@ import isar
10
10
  from isar.apis.api import API
11
11
  from isar.config.keyvault.keyvault_service import Keyvault
12
12
  from isar.config.log import setup_loggers
13
- from isar.config.settings import settings
13
+ from isar.config.settings import robot_settings, settings
14
14
  from isar.models.communication.queues.queues import Queues
15
15
  from isar.modules import get_injector
16
16
  from isar.services.service_connections.mqtt.mqtt_client import MqttClient
@@ -72,6 +72,8 @@ def print_startup_info():
72
72
  print_setting("Plant code", settings.PLANT_CODE)
73
73
  print_setting("Plant name", settings.PLANT_NAME)
74
74
  print_setting("Plant shortname", settings.PLANT_SHORT_NAME)
75
+ print_setting(fillchar="-")
76
+ print_setting("Robot capabilities", robot_settings.CAPABILITIES)
75
77
  print_setting(fillchar="*")
76
78
  print()
77
79
 
@@ -122,6 +122,12 @@ class StateMachine(object):
122
122
  "dest": self.monitor_state,
123
123
  "before": self._initiated,
124
124
  },
125
+ {
126
+ "trigger": "pause_full_mission",
127
+ "source": [self.initiate_state, self.monitor_state],
128
+ "dest": self.paused_state,
129
+ "before": self._mission_paused,
130
+ },
125
131
  {
126
132
  "trigger": "pause",
127
133
  "source": [self.initiate_state, self.monitor_state],
@@ -166,6 +172,12 @@ class StateMachine(object):
166
172
  "dest": self.initiate_state,
167
173
  "before": self._resume,
168
174
  },
175
+ {
176
+ "trigger": "resume_full_mission",
177
+ "source": self.paused_state,
178
+ "dest": self.monitor_state,
179
+ "before": self._resume,
180
+ },
169
181
  {
170
182
  "trigger": "step_finished",
171
183
  "source": self.monitor_state,
@@ -282,6 +294,8 @@ class StateMachine(object):
282
294
  self.current_task.reset_task()
283
295
  self.update_current_step()
284
296
 
297
+ self.robot.resume()
298
+
285
299
  def _mission_finished(self) -> None:
286
300
  fail_statuses: List[TaskStatus] = [
287
301
  TaskStatus.Cancelled,
@@ -348,6 +362,8 @@ class StateMachine(object):
348
362
  self.publish_task_status(task=self.current_task)
349
363
  self.publish_step_status(step=self.current_step)
350
364
 
365
+ self.robot.pause()
366
+
351
367
  def _stop(self) -> None:
352
368
  self.stopped = True
353
369
 
@@ -59,7 +59,10 @@ class Monitor(State):
59
59
  break
60
60
 
61
61
  if self.state_machine.should_pause_mission():
62
- transition = self.state_machine.pause # type: ignore
62
+ if self.state_machine.stepwise_mission:
63
+ transition = self.state_machine.pause # type: ignore
64
+ else:
65
+ transition = self.state_machine.pause_full_mission # type: ignore
63
66
  break
64
67
 
65
68
  if not self.step_status_thread:
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  import time
3
- from typing import TYPE_CHECKING, Callable
3
+ from typing import Callable, TYPE_CHECKING
4
4
 
5
5
  from transitions import State
6
6
 
@@ -26,7 +26,10 @@ class Paused(State):
26
26
  break
27
27
 
28
28
  if self.state_machine.should_resume_mission():
29
- transition = self.state_machine.resume # type: ignore
29
+ if self.state_machine.stepwise_mission:
30
+ transition = self.state_machine.resume # type: ignore
31
+ else:
32
+ transition = self.state_machine.resume_full_mission # type: ignore
30
33
  break
31
34
 
32
35
  time.sleep(self.state_machine.sleep_time)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isar
3
- Version: 1.20.3
3
+ Version: 1.21.0
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
@@ -1,6 +1,6 @@
1
1
  isar/__init__.py,sha256=cH8p8bVveu3FUL6kBhldcSlLaoHgD82Kd0-SwSNfGXw,87
2
2
  isar/modules.py,sha256=aO8bLSC4i_Qo4bOJ6aFfwAZRTJAw8o9SOOfkceUGCiU,6708
3
- isar/script.py,sha256=145KXMqKWkP5SjB2MyvO1HmIPJnFOQdwwWM3jy6s-9A,5260
3
+ isar/script.py,sha256=xhMMIuulPaaPTcP9-meF0xqNSPDQ7T1W_6yKK6K2RFg,5377
4
4
  isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  isar/apis/api.py,sha256=vSXfkWR7iITWbh4BsDzjEDtQrz6KS-vi2S8AeaeDc3Q,13112
6
6
  isar/apis/models/__init__.py,sha256=NI1BYyN__Ogr00Qqe0XJ-9gEVPva2brXo2RJsbrS4tM,52
@@ -15,7 +15,7 @@ isar/config/configuration_error.py,sha256=rO6WOhafX6xvVib8WxV-eY483Z0PpN-9PxGsq5
15
15
  isar/config/log.py,sha256=zHFLmGWQRn8TrcsxUS6KHpJt2JE86kYazU7b-bkcN9o,2285
16
16
  isar/config/logging.conf,sha256=mYO1xf27gAopEMHhGzY7-mwyfN16rwRLkPNMvy3zn2g,1127
17
17
  isar/config/settings.env,sha256=-kivj0osAAKlInnY81ugySTlcImhVABbnj9kUoBDLu8,535
18
- isar/config/settings.py,sha256=pZrZGe60WoMNl_SlCzJFavU3Qqil_ocCuaKcKfDn0KM,13175
18
+ isar/config/settings.py,sha256=yU1Zgc1Sbby3vHqv2JeIFAK8nXV_8ZAhuE7HzsZiqxc,13368
19
19
  isar/config/certs/ca-cert.pem,sha256=gSBTyY0tKSFnssyvrvbFvHpQwii0kEkBryklVmevdtc,2029
20
20
  isar/config/keyvault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  isar/config/keyvault/keyvault_error.py,sha256=zvPCsZLjboxsxthYkxpRERCTFxYV8R5WmACewAUQLwk,41
@@ -67,16 +67,16 @@ isar/services/utilities/queue_utilities.py,sha256=Pw3hehSwkXJNeDv-bDVDfs58VOwtt3
67
67
  isar/services/utilities/scheduling_utilities.py,sha256=LFimEmacML3J9q-FNLfKPhcAr-R3f2rkYkbsoro0Gyo,8434
68
68
  isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
69
69
  isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- isar/state_machine/state_machine.py,sha256=-i7m2xVcgL3cW6AIMGAom97wzt433MXM8EQEGUykAJA,23653
70
+ isar/state_machine/state_machine.py,sha256=UcCQEEscwrOgWqjWVhkeEqRGFm2pLEomud3ROl96qro,24204
71
71
  isar/state_machine/states_enum.py,sha256=BlrUcBWkM5K6D_UZXRwTaUgGpAagWmVZH6HhDBGzVU4,278
72
72
  isar/state_machine/states/__init__.py,sha256=kErbKPDTwNfCLijvdyN6_AuOqDwR23nu9F0Qovsnir4,218
73
73
  isar/state_machine/states/idle.py,sha256=_nrM17s4artaHezanl28_WcNyJod1_hkCyzAqZlPQiE,3034
74
74
  isar/state_machine/states/initialize.py,sha256=KUuyXVwzWK5bJNspA1JnYO_Xwu8fPPK6bnHK4mtwf5A,2359
75
75
  isar/state_machine/states/initiate.py,sha256=WqBROOGAh0DVB0f39RFkpqzkr0qrHMyrBGkh2svBbKw,5652
76
- isar/state_machine/states/monitor.py,sha256=t0wtRPrjnWnGQ8JXia7kLkSc8tyd33mBI7UDDAsJ6FM,10874
76
+ isar/state_machine/states/monitor.py,sha256=KdCPzE6JrnJg3wk936AxWFzp4IuR9a43Dq3-8mL0qAI,11043
77
77
  isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
78
78
  isar/state_machine/states/offline.py,sha256=wEMMIwM4JWfmDjI7pe9yKce_Mfz9aXqs6WEkxn8cx5I,2125
79
- isar/state_machine/states/paused.py,sha256=HqrvONw6r6AoYPUyFGGOy2ToT7Tid8JEw2pKp2ZhZ7Y,1004
79
+ isar/state_machine/states/paused.py,sha256=qFSauRwalyws8K5bDZ5wkcRDVYyevTDVRtbXkiF9rZc,1174
80
80
  isar/state_machine/states/stop.py,sha256=zu7bVKR5zfkzU7iCrh8Pe2WRDHHzU2RBeFBxFK6Z-eA,3348
81
81
  isar/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
82
  isar/storage/blob_storage.py,sha256=oKdml1VVN8iTr-d_5H4Lz5E7zrhJRknCzOxHD-tO7m8,3230
@@ -86,7 +86,7 @@ isar/storage/storage_interface.py,sha256=DYDry4I7aZpDHJhsBF6s8zrgokFAc7fdKJKfA8A
86
86
  isar/storage/uploader.py,sha256=te3GyiSeu96MhbiqQ7ueIMUPLSKblx3UqYAshkxfVIE,6368
87
87
  isar/storage/utilities.py,sha256=eTyY56WCTda5YswE9znWNeNEoTbT3jokNbwcLVmmQjA,3113
88
88
  robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
- robot_interface/robot_interface.py,sha256=i2qw1V9mLO-ljtS7LiRliQ7XNmmBJIwD4NG8mDfwMEI,8317
89
+ robot_interface/robot_interface.py,sha256=pY1Wuka0fTP-kCmkEndAcFytkS73cEE2zIHv-v5Fm1E,9466
90
90
  robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
91
91
  robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -108,9 +108,9 @@ robot_interface/telemetry/payloads.py,sha256=eMK7mjZPsLY6yvu7AK-OcdvkeUpChzDrySD
108
108
  robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  robot_interface/utilities/json_service.py,sha256=nU2Q_3P9Fq9hs6F_wtUjWtHfl_g1Siy-yDhXXSKwHwg,1018
110
110
  robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
111
- isar-1.20.3.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
112
- isar-1.20.3.dist-info/METADATA,sha256=ljf9l0Vw8U6loDX4bnu7GBfiX96A4WGNCyEfYzzcFpU,30574
113
- isar-1.20.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
114
- isar-1.20.3.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
115
- isar-1.20.3.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
116
- isar-1.20.3.dist-info/RECORD,,
111
+ isar-1.21.0.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
112
+ isar-1.21.0.dist-info/METADATA,sha256=6vIZ_8bCeYRnMyMp6Fod4KXHjcxFsncfsmbX4fuATgg,30574
113
+ isar-1.21.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
114
+ isar-1.21.0.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
115
+ isar-1.21.0.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
116
+ isar-1.21.0.dist-info/RECORD,,
@@ -142,6 +142,44 @@ class RobotInterface(metaclass=ABCMeta):
142
142
  """
143
143
  raise NotImplementedError
144
144
 
145
+ @abstractmethod
146
+ def pause(self) -> None:
147
+ """Pauses the execution of the current step and stops the movement of the robot.
148
+
149
+ Returns
150
+ -------
151
+ None
152
+
153
+ Raises
154
+ ------
155
+ RobotActionException
156
+ If the robot fails to perform the requested action to pause mission execution
157
+ the action to pause will be attempted again until a certain number of retries
158
+ RobotException
159
+ Will catch other RobotExceptions and retry to pause the mission
160
+
161
+ """
162
+ raise NotImplementedError
163
+
164
+ @abstractmethod
165
+ def resume(self) -> None:
166
+ """Resumes the execution of the current step and continues the rest of the mission.
167
+
168
+ Returns
169
+ -------
170
+ None
171
+
172
+ Raises
173
+ ------
174
+ RobotActionException
175
+ If the robot fails to perform the requested action to resume mission execution
176
+ the action to resume will be attempted again until a certain number of retries
177
+ RobotException
178
+ Will catch other RobotExceptions and retry to resume the mission
179
+
180
+ """
181
+ raise NotImplementedError
182
+
145
183
  @abstractmethod
146
184
  def get_inspections(self, step: InspectionStep) -> Sequence[Inspection]:
147
185
  """Return the inspections connected to the given step.
File without changes
File without changes