isar 1.23.1__py3-none-any.whl → 1.23.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.

@@ -8,7 +8,6 @@ from pydantic import BaseModel, Field
8
8
  from isar.apis.models.models import InputPose, InputPosition
9
9
  from isar.config.settings import settings
10
10
  from isar.mission_planner.mission_planner_interface import MissionPlannerError
11
- from robot_interface.models.inspection.inspection import Inspection, InspectionMetadata
12
11
  from robot_interface.models.mission.mission import Mission
13
12
  from robot_interface.models.mission.task import (
14
13
  TASKS,
@@ -21,7 +20,6 @@ from robot_interface.models.mission.task import (
21
20
  TakeThermalVideo,
22
21
  TakeVideo,
23
22
  )
24
- from robot_interface.models.mission.task import Task
25
23
 
26
24
 
27
25
  class InspectionTypes(str, Enum):
@@ -51,7 +49,7 @@ class StartMissionInspectionDefinition(BaseModel):
51
49
  class StartMissionTaskDefinition(BaseModel):
52
50
  type: TaskType = Field(default=TaskType.Inspection)
53
51
  pose: InputPose
54
- inspection: StartMissionInspectionDefinition
52
+ inspection: Optional[StartMissionInspectionDefinition] = None
55
53
  tag: Optional[str] = None
56
54
  id: Optional[str] = None
57
55
 
isar/config/settings.py CHANGED
@@ -8,7 +8,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
8
8
 
9
9
  from isar.config import predefined_missions
10
10
  from robot_interface.models.robots.robot_model import RobotModel
11
- from robot_interface.telemetry.payloads import VideoStream, DocumentInfo
11
+ from robot_interface.telemetry.payloads import DocumentInfo, VideoStream
12
12
 
13
13
 
14
14
  class Settings(BaseSettings):
@@ -54,10 +54,10 @@ class Settings(BaseSettings):
54
54
  # Determines the number of state transitions that are kept in the log
55
55
  STATE_TRANSITIONS_LOG_LENGTH: int = Field(default=20)
56
56
 
57
- # Number of attempts to initiate a step or mission before cancelling
57
+ # Number of attempts to initiate a task or mission before cancelling
58
58
  INITIATE_FAILURE_COUNTER_LIMIT: int = Field(default=10)
59
59
 
60
- # Number of attempts to request a step status in monitor before cancelling
60
+ # Number of attempts to request a task status in monitor before cancelling
61
61
  REQUEST_STATUS_FAILURE_COUNTER_LIMIT: int = Field(default=3)
62
62
 
63
63
  # Number of attempts to stop the robot before giving up
@@ -236,7 +236,6 @@ class Settings(BaseSettings):
236
236
  TOPIC_ISAR_STATUS: str = Field(default="status", validate_default=True)
237
237
  TOPIC_ISAR_MISSION: str = Field(default="mission", validate_default=True)
238
238
  TOPIC_ISAR_TASK: str = Field(default="task", validate_default=True)
239
- TOPIC_ISAR_STEP: str = Field(default="step", validate_default=True)
240
239
  TOPIC_ISAR_INSPECTION_RESULT: str = Field(
241
240
  default="inspection_result", validate_default=True
242
241
  )
@@ -290,7 +289,6 @@ class Settings(BaseSettings):
290
289
  "TOPIC_ISAR_STATUS",
291
290
  "TOPIC_ISAR_MISSION",
292
291
  "TOPIC_ISAR_TASK",
293
- "TOPIC_ISAR_STEP",
294
292
  "TOPIC_ISAR_ROBOT_INFO",
295
293
  "TOPIC_ISAR_ROBOT_HEARTBEAT",
296
294
  "TOPIC_ISAR_INSPECTION_RESULT",
@@ -128,7 +128,7 @@ class SchedulingUtilities:
128
128
  """
129
129
  is_state_machine_ready_to_receive_mission = state == States.Idle
130
130
  if not is_state_machine_ready_to_receive_mission:
131
- error_message = f"Conflict - Mission already in progress - State: {state}"
131
+ error_message = f"Conflict - Robot is not idle - State: {state}"
132
132
  self.logger.warning(error_message)
133
133
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
134
134
 
@@ -67,7 +67,7 @@ class Monitor(State):
67
67
  self._run_get_status_thread(
68
68
  status_function=self.state_machine.robot.task_status,
69
69
  function_argument=self.state_machine.current_task.id,
70
- thread_name="State Machine Monitor Get Step Status",
70
+ thread_name="State Machine Monitor Get Task Status",
71
71
  )
72
72
  try:
73
73
  status: TaskStatus = self.task_status_thread.get_output()
@@ -229,7 +229,7 @@ class Monitor(State):
229
229
  error_description=e.error_description,
230
230
  )
231
231
  self.logger.error(
232
- f"Step will be cancelled after failing to get task status "
232
+ f"Task will be cancelled after failing to get task status "
233
233
  f"{self.request_status_failure_counter} times because: "
234
234
  f"{e.error_description}"
235
235
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isar
3
- Version: 1.23.1
3
+ Version: 1.23.3
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
@@ -5,7 +5,7 @@ isar/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  isar/apis/api.py,sha256=zrNdnMe5GS1xMtPLsF2Za0NKEyYNKMAVim4l027qQA4,13141
6
6
  isar/apis/models/__init__.py,sha256=NI1BYyN__Ogr00Qqe0XJ-9gEVPva2brXo2RJsbrS4tM,52
7
7
  isar/apis/models/models.py,sha256=6E8VhGBti6EKJefYTDNVERxRu_g_omg4J2MriPUPkaw,1709
8
- isar/apis/models/start_mission_definition.py,sha256=EFYkKMQL2o4hqumU1Dq-lKHAS4ZzxlC15XD1AZLpULs,8168
8
+ isar/apis/models/start_mission_definition.py,sha256=oY2CRKNkf4DQys0lbz-WTib1Ppw_OUwHqhBTrBhUJQk,8044
9
9
  isar/apis/schedule/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  isar/apis/schedule/scheduling_controller.py,sha256=GXjvkF4OPRJTWzQEvvxbKc79x2X2uzqbl1ZOv_-9Fpw,11508
11
11
  isar/apis/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -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=hJFfyl4S84nmcyf70Pz8nbGlPf4KTVx0UkgP3uf6T8E,534
18
- isar/config/settings.py,sha256=NgL3UegkJwsRRkV6rgbig6Xi5k4eYlHpzheaEFavFPs,13477
18
+ isar/config/settings.py,sha256=YCX8xV3nNCtEmFxh-kApZsl6hYprPzrQbLuc3c64e6c,13378
19
19
  isar/config/certs/ca-cert.pem,sha256=ijutWtGOAnKx3xPydNLOVoCLip3tGkNKUpr6pTPQfJA,2179
20
20
  isar/config/keyvault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  isar/config/keyvault/keyvault_error.py,sha256=zvPCsZLjboxsxthYkxpRERCTFxYV8R5WmACewAUQLwk,41
@@ -64,7 +64,7 @@ isar/services/service_connections/mqtt/robot_info_publisher.py,sha256=5G6ahslydh
64
64
  isar/services/service_connections/stid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  isar/services/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
66
  isar/services/utilities/queue_utilities.py,sha256=Pw3hehSwkXJNeDv-bDVDfs58VOwtt3i5hpiJ2ZpphuQ,1225
67
- isar/services/utilities/scheduling_utilities.py,sha256=cLnB97EkoZM0GN6kG5ezpzxLzACSoHU_Mv86ncyHdfM,8386
67
+ isar/services/utilities/scheduling_utilities.py,sha256=UUMxhudY2mQRG6Edjq6BG7oxwlqmcu5h6fMyw4Vhl_o,8376
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
70
  isar/state_machine/state_machine.py,sha256=A7qAaXEnErmPQ7--sM7w9VabceS0qJOProlmwMb9iaU,21299
@@ -73,7 +73,7 @@ isar/state_machine/states/__init__.py,sha256=kErbKPDTwNfCLijvdyN6_AuOqDwR23nu9F0
73
73
  isar/state_machine/states/idle.py,sha256=iAKESjETKUt9x3inE7TAPIohVM1iRsYyJjOoBeB3sVw,3079
74
74
  isar/state_machine/states/initialize.py,sha256=TVXV5Ps3N4_flM88j9pQiX88kZgLzLwzlJy_6hPbgcA,2359
75
75
  isar/state_machine/states/initiate.py,sha256=j1wvSC3zVODgRkKOVsQROiuWkjihSBtwCs5GsoivLvc,5655
76
- isar/state_machine/states/monitor.py,sha256=Nts7S9BuKYmOj73cRrkEZHHWXP5kh-2BKfSBH14MFYQ,9297
76
+ isar/state_machine/states/monitor.py,sha256=BktuQm8YSAdxFlhaGGR02pSGsx2jJ2pZR6wQY3fEsEo,9297
77
77
  isar/state_machine/states/off.py,sha256=jjqN_oJMpBtWuY7hP-c9f0w3p2CYCfe-NpmYHHPnmyI,544
78
78
  isar/state_machine/states/offline.py,sha256=ur5wDo4NWRLn7n-p5IUY6aSYcGApmqe_0IbRRywA6qA,2169
79
79
  isar/state_machine/states/paused.py,sha256=TIg1iJvAxGUIfzE_qWp0wrq4Ka0a3zEf3GNwIWLIK0M,1177
@@ -90,7 +90,7 @@ robot_interface/robot_interface.py,sha256=Jbfh1L7lPCjfHS6l3oQ_r0ACZw-KCazVc09Phx
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
93
- robot_interface/models/exceptions/robot_exceptions.py,sha256=PnD5BvWHZfhxODv4abdmQ4PBLk41KcHcH-HYvOXUNNg,9549
93
+ robot_interface/models/exceptions/robot_exceptions.py,sha256=dTNhFguaPumtreYH3rlL-xVDAZk7djZe2CcE1rP3CgE,10064
94
94
  robot_interface/models/initialize/__init__.py,sha256=rz5neEDr59GDbzzI_FF0DId-C-I-50l113P-h-C_QBY,48
95
95
  robot_interface/models/initialize/initialize_params.py,sha256=2eG5Aq5bDKU6tVkaUMAoc46GERBgyaKkqv6yLupdRLc,164
96
96
  robot_interface/models/inspection/__init__.py,sha256=14wfuj4XZazrigKD7fL98khFKz-eckIpEgPcYRj40Kg,227
@@ -103,14 +103,14 @@ robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
103
103
  robot_interface/models/robots/robot_model.py,sha256=pZQsqhn9hh6XE3EjMZhWMzYqg5oJ4CJ4CXeOASKvEf8,452
104
104
  robot_interface/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  robot_interface/telemetry/media_connection_type.py,sha256=Z8Jayi5SjBJh_xEd5KdS__A6bM-nofbSAedc6u41iAY,91
106
- robot_interface/telemetry/mqtt_client.py,sha256=um7j7XDSAlY6-wWLpBl6ZYjmQ-G0lY7f2_NaZ3ciZ7U,2757
106
+ robot_interface/telemetry/mqtt_client.py,sha256=RoXJFQ4YiaSQpHTlZ2LD-ICRPtfUhylEwgyt_3NE4xM,2916
107
107
  robot_interface/telemetry/payloads.py,sha256=FafpIwsOvcTNtaBZqyOX7r5EjG7nZ2uLNhyJo2l5GiI,1767
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.23.1.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
112
- isar-1.23.1.dist-info/METADATA,sha256=iXPUWr1_LQuzNQCRRch3MEfEvyK17NF-RMs8oIgxCaI,30674
113
- isar-1.23.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
114
- isar-1.23.1.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
115
- isar-1.23.1.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
116
- isar-1.23.1.dist-info/RECORD,,
111
+ isar-1.23.3.dist-info/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
112
+ isar-1.23.3.dist-info/METADATA,sha256=4HTu_oT3RXkcLHUhACMaPw4AhMkC8eJb8Ffr9nwnYZ8,30674
113
+ isar-1.23.3.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
114
+ isar-1.23.3.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
115
+ isar-1.23.3.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
116
+ isar-1.23.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -9,13 +9,14 @@ class ErrorReason(str, Enum):
9
9
  RobotInfeasibleTaskException: str = "robot_infeasible_step_exception"
10
10
  RobotInfeasibleMissionException: str = "robot_infeasible_mission_exception"
11
11
  RobotMissionStatusException: str = "robot_mission_status_exception"
12
- RobotStepStatusException: str = "robot_step_status_exception"
12
+ RobotTaskStatusException: str = "robot_task_status_exception"
13
13
  RobotAPIException: str = "robot_api_exception"
14
14
  RobotActionException: str = "robot_action_exception"
15
15
  RobotInitializeException: str = "robot_initialize_exception"
16
16
  RobotRetrieveDataException: str = "robot_retrieve_data_exception"
17
17
  RobotRetrieveInspectionException: str = "robot_retrieve_inspection_exception"
18
18
  RobotTelemetryException: str = "robot_telemetry_exception"
19
+ RobotTelemetryPoseException: str = "robot_telemetry_pose_exception"
19
20
  RobotMapException: str = "robot_map_exception"
20
21
  RobotTransformException: str = "robot_transform_exception"
21
22
  RobotUnknownErrorException: str = "robot_unknown_error_exception"
@@ -66,7 +67,7 @@ class RobotCommunicationTimeoutException(RobotException):
66
67
 
67
68
 
68
69
  # An exception which should be thrown by the robot package if it is unable to start the
69
- # current step.
70
+ # current task.
70
71
  class RobotInfeasibleTaskException(RobotException):
71
72
  def __init__(self, error_description: str) -> None:
72
73
  super().__init__(
@@ -102,11 +103,11 @@ class RobotMissionStatusException(RobotException):
102
103
 
103
104
 
104
105
  # An exception which should be thrown by the robot package if it is unable to collect
105
- # the status of the current step.
106
+ # the status of the current task.
106
107
  class RobotTaskStatusException(RobotException):
107
108
  def __init__(self, error_description: str) -> None:
108
109
  super().__init__(
109
- error_reason=ErrorReason.RobotStepStatusException,
110
+ error_reason=ErrorReason.RobotTaskStatusException,
110
111
  error_description=error_description,
111
112
  )
112
113
 
@@ -165,7 +166,7 @@ class RobotRetrieveDataException(RobotException):
165
166
 
166
167
 
167
168
  # An exception which should be thrown by the robot package if it is unable to collect
168
- # the inspections that were generated for the currently executing step or mission.
169
+ # the inspections that were generated for the currently executing task or mission.
169
170
  class RobotRetrieveInspectionException(RobotException):
170
171
  def __init__(self, error_description: str) -> None:
171
172
  super().__init__(
@@ -189,6 +190,18 @@ class RobotTelemetryException(RobotException):
189
190
  pass
190
191
 
191
192
 
193
+ # An exception which should be thrown by the robot package if it is unable to retrieve
194
+ # telemetry pose data. It should be used exclusively by the telemetry pose publisher.
195
+ class RobotTelemetryPoseException(RobotException):
196
+ def __init__(self, error_description: str) -> None:
197
+ super().__init__(
198
+ error_reason=ErrorReason.RobotTelemetryPoseException,
199
+ error_description=error_description,
200
+ )
201
+
202
+ pass
203
+
204
+
192
205
  # An exception which should be thrown by the robot package if it is unable to load the
193
206
  # configuration for maps and transformations. This could be caused by faulty
194
207
  # configuration and this exception will cause ISAR to crash as further execution is not
@@ -5,7 +5,10 @@ from datetime import datetime, timezone
5
5
  from queue import Queue
6
6
  from typing import Callable, Tuple
7
7
 
8
- from robot_interface.models.exceptions.robot_exceptions import RobotTelemetryException
8
+ from robot_interface.models.exceptions.robot_exceptions import (
9
+ RobotTelemetryException,
10
+ RobotTelemetryPoseException,
11
+ )
9
12
  from robot_interface.telemetry.payloads import CloudHealthPayload
10
13
  from robot_interface.utilities.json_service import EnhancedJSONEncoder
11
14
 
@@ -63,7 +66,7 @@ class MqttTelemetryPublisher(MqttClientInterface):
63
66
  self.retain: bool = retain
64
67
 
65
68
  def run(self, isar_id: str, robot_name: str) -> None:
66
- self.cloud_healt_topic: str = f"isar/{isar_id}/cloud_health"
69
+ self.cloud_health_topic: str = f"isar/{isar_id}/cloud_health"
67
70
  topic: str
68
71
  payload: str
69
72
 
@@ -71,12 +74,15 @@ class MqttTelemetryPublisher(MqttClientInterface):
71
74
  try:
72
75
  payload = self.telemetry_method(isar_id=isar_id, robot_name=robot_name)
73
76
  topic = self.topic
77
+ except RobotTelemetryPoseException:
78
+ time.sleep(self.interval)
79
+ continue
74
80
  except RobotTelemetryException:
75
81
  payload = json.dumps(
76
82
  CloudHealthPayload(isar_id, robot_name, datetime.now(timezone.utc)),
77
83
  cls=EnhancedJSONEncoder,
78
84
  )
79
- topic = self.cloud_healt_topic
85
+ topic = self.cloud_health_topic
80
86
 
81
87
  self.publish(topic=topic, payload=payload, qos=self.qos, retain=self.retain)
82
88
 
File without changes