isar 1.33.4__py3-none-any.whl → 1.33.5__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.

@@ -1,12 +1,15 @@
1
1
  import logging
2
2
 
3
3
  from fastapi import HTTPException
4
+ from opentelemetry import trace
4
5
 
5
6
  from isar.apis.models.models import RobotInfoResponse
6
7
  from isar.config.settings import robot_settings, settings
7
8
  from isar.services.utilities.robot_utilities import RobotUtilities
8
9
  from robot_interface.models.robots.media import MediaConfig
9
10
 
11
+ tracer = trace.get_tracer(__name__)
12
+
10
13
 
11
14
  class RobotController:
12
15
  def __init__(
@@ -16,6 +19,7 @@ class RobotController:
16
19
  self.robot_utilities: RobotUtilities = robot_utilities
17
20
  self.logger = logging.getLogger("api")
18
21
 
22
+ @tracer.start_as_current_span("generate_media_config")
19
23
  def generate_media_config(self) -> MediaConfig:
20
24
  media_config: MediaConfig = self.robot_utilities.generate_media_config()
21
25
  if media_config is None:
@@ -25,6 +29,7 @@ class RobotController:
25
29
  )
26
30
  return media_config
27
31
 
32
+ @tracer.start_as_current_span("get_info")
28
33
  def get_info(self) -> RobotInfoResponse:
29
34
  return RobotInfoResponse(
30
35
  robot_package=settings.ROBOT_PACKAGE,
@@ -2,6 +2,7 @@ import logging
2
2
  from http import HTTPStatus
3
3
 
4
4
  from fastapi import Body, HTTPException, Path
5
+ from opentelemetry import trace
5
6
 
6
7
  from isar.apis.models.models import (
7
8
  ControlMissionResponse,
@@ -20,6 +21,8 @@ from isar.state_machine.states_enum import States
20
21
  from robot_interface.models.mission.mission import Mission
21
22
  from robot_interface.models.mission.task import TASKS, InspectionTask, MoveArm
22
23
 
24
+ tracer = trace.get_tracer(__name__)
25
+
23
26
 
24
27
  class SchedulingController:
25
28
  def __init__(
@@ -29,6 +32,7 @@ class SchedulingController:
29
32
  self.scheduling_utilities: SchedulingUtilities = scheduling_utilities
30
33
  self.logger = logging.getLogger("api")
31
34
 
35
+ @tracer.start_as_current_span("start_mission_by_id")
32
36
  def start_mission_by_id(
33
37
  self,
34
38
  mission_id: str = Path(
@@ -54,6 +58,7 @@ class SchedulingController:
54
58
 
55
59
  return self._api_response(mission)
56
60
 
61
+ @tracer.start_as_current_span("start_mission")
57
62
  def start_mission(
58
63
  self,
59
64
  mission_definition: StartMissionDefinition = Body(
@@ -98,6 +103,7 @@ class SchedulingController:
98
103
  self.scheduling_utilities.start_mission(mission=mission)
99
104
  return self._api_response(mission)
100
105
 
106
+ @tracer.start_as_current_span("return_home")
101
107
  def return_home(self) -> None:
102
108
  self.logger.info("Received request to return home")
103
109
 
@@ -108,6 +114,7 @@ class SchedulingController:
108
114
 
109
115
  self.scheduling_utilities.return_home()
110
116
 
117
+ @tracer.start_as_current_span("pause_mission")
111
118
  def pause_mission(self) -> ControlMissionResponse:
112
119
  self.logger.info("Received request to pause current mission")
113
120
 
@@ -131,6 +138,7 @@ class SchedulingController:
131
138
  )
132
139
  return pause_mission_response
133
140
 
141
+ @tracer.start_as_current_span("resume_mission")
134
142
  def resume_mission(self) -> ControlMissionResponse:
135
143
  self.logger.info("Received request to resume current mission")
136
144
 
@@ -148,6 +156,7 @@ class SchedulingController:
148
156
  )
149
157
  return resume_mission_response
150
158
 
159
+ @tracer.start_as_current_span("stop_mission")
151
160
  def stop_mission(
152
161
  self,
153
162
  mission_id: StopMissionDefinition = Body(
@@ -181,6 +190,7 @@ class SchedulingController:
181
190
  )
182
191
  return stop_mission_response
183
192
 
193
+ @tracer.start_as_current_span("start_move_arm_mission")
184
194
  def start_move_arm_mission(
185
195
  self,
186
196
  arm_pose_literal: str = Path(
@@ -227,6 +237,7 @@ class SchedulingController:
227
237
  self.scheduling_utilities.start_mission(mission=mission)
228
238
  return self._api_response(mission)
229
239
 
240
+ @tracer.start_as_current_span("release_intervention_needed")
230
241
  def release_intervention_needed(self) -> None:
231
242
  self.logger.info("Received request to release intervention needed state")
232
243
 
isar/config/settings.py CHANGED
@@ -30,7 +30,7 @@ class Settings(BaseSettings):
30
30
  REQUEST_TIMEOUT: int = Field(default=30)
31
31
 
32
32
  # Timeout in seconds for checking whether there is a message on a queue
33
- QUEUE_TIMEOUT: int = Field(default=3)
33
+ QUEUE_TIMEOUT: int = Field(default=10)
34
34
 
35
35
  # Sleep time for while loops in the finite state machine in seconds
36
36
  # The sleep is used to throttle the system on every iteration in the loop
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isar
3
- Version: 1.33.4
3
+ Version: 1.33.5
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
@@ -6,9 +6,9 @@ isar/apis/api.py,sha256=VM_WBlHJ4Juv9A0FvaUTeaMVYCN6a7pAojxIGCmDtf0,14154
6
6
  isar/apis/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  isar/apis/models/models.py,sha256=iRyqflpjGopm4KJjgRrOnC2swNEk3a-iwVynzw3Nm6c,1992
8
8
  isar/apis/models/start_mission_definition.py,sha256=v-wt1XDd53Sw7DCdFAkxBBut-xd_uGJa7qMJnE3VI9k,6364
9
- isar/apis/robot_control/robot_controller.py,sha256=0EHjMqOBdfJlMrCItGPz5X-4X2kc-2XlNnUU2LOcLfc,1219
9
+ isar/apis/robot_control/robot_controller.py,sha256=RSVlxbw9D668tHWItVLtyjvAnsJkCs2yUSkU3iqeAcY,1393
10
10
  isar/apis/schedule/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- isar/apis/schedule/scheduling_controller.py,sha256=RKtQmNtcepG0mgu5ihidc2J7ZJ9c1plIgUQCEBz_3SE,9476
11
+ isar/apis/schedule/scheduling_controller.py,sha256=w7YJfN5vSRfnd_56ilPi0WRnScsGzo1m8pTQyj2w7bA,9980
12
12
  isar/apis/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  isar/apis/security/authentication.py,sha256=Se2puhe2TUBmfio2RLma52-VSLRhqvWgu0Cd1bhdwMo,2000
14
14
  isar/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -16,7 +16,7 @@ isar/config/configuration_error.py,sha256=rO6WOhafX6xvVib8WxV-eY483Z0PpN-9PxGsq5
16
16
  isar/config/log.py,sha256=f_mLLz5RSa0kZkdpi1m0iMdwwDc4RQp12mnT6gu2exE,1303
17
17
  isar/config/logging.conf,sha256=a7ZBvZkrMDaPU3eRGAjL_eZz6hZsa6BaRJOfx8mbnnM,629
18
18
  isar/config/open_telemetry.py,sha256=Lgu0lbRQA-zz6ZDoBKKk0whQex5w18jl1wjqWzHUGdg,3634
19
- isar/config/settings.py,sha256=etvCAo1ndds9zTE1yK2CBjWPS_5cD6oM1lJ0R74nnqU,14242
19
+ isar/config/settings.py,sha256=5A_hxq6AFzg94ROz8yIK8KKZcygwJAosM4ROKJOeCfU,14243
20
20
  isar/config/certs/ca-cert.pem,sha256=qoNljfad_qcMxhXJIUMLd7nT-Qwf_d4dYSdoOFEOE8I,2179
21
21
  isar/config/keyvault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  isar/config/keyvault/keyvault_error.py,sha256=zvPCsZLjboxsxthYkxpRERCTFxYV8R5WmACewAUQLwk,41
@@ -97,13 +97,13 @@ isar/storage/local_storage.py,sha256=Rn-iiiz9DI7PzIhevOMshPIaqzJaqBXeVJMQRhVSl2M
97
97
  isar/storage/storage_interface.py,sha256=x-imVeQTdL6dCaTaPTHpXwCR6N4e27WxK_Vpumg0x-Y,1230
98
98
  isar/storage/uploader.py,sha256=oaGhHqYrtyvJoFUuD7ZyBgdPNkYaSgQokQZkAjmd4vI,10702
99
99
  isar/storage/utilities.py,sha256=oLH0Rp7UtrQQdilfITnmXO1Z0ExdeDhBImYHid55vBA,3449
100
- isar-1.33.4.dist-info/licenses/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
100
+ isar-1.33.5.dist-info/licenses/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
101
101
  robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
102
  robot_interface/robot_interface.py,sha256=A6t19lcNU_6AfkYKY5DaF0sheym_SZEAawbfaj36Kjk,8997
103
103
  robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
104
104
  robot_interface/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  robot_interface/models/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- robot_interface/models/exceptions/robot_exceptions.py,sha256=VrsWPf4g0qN5sJRKhc3ER_Wt5drK0MZRuECU-csIlDA,10026
106
+ robot_interface/models/exceptions/robot_exceptions.py,sha256=UFya2u-slcf2ebc3ZVCs-Kp1SS9PQvKdWInYMBEQ8BY,10404
107
107
  robot_interface/models/initialize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  robot_interface/models/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  robot_interface/models/inspection/inspection.py,sha256=cjAvekL8r82s7bgukWeXpYylHvJG_oRSCJNISPVCvZg,2238
@@ -121,8 +121,8 @@ robot_interface/telemetry/payloads.py,sha256=RfLlm_te-bV_xcLtbBx27bgE8gkwPAhWBTF
121
121
  robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
122
  robot_interface/utilities/json_service.py,sha256=9N1zijW7K4d3WFR2autpaS8U9o1ibymiOX-6stTKCyk,1243
123
123
  robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
124
- isar-1.33.4.dist-info/METADATA,sha256=kFWjErpSnEh4cucIUoioOsgWRnzcxU9BsI65g3hUKqI,31190
125
- isar-1.33.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
- isar-1.33.4.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
127
- isar-1.33.4.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
128
- isar-1.33.4.dist-info/RECORD,,
124
+ isar-1.33.5.dist-info/METADATA,sha256=NsNwJPhbo_FDVWvBhXwlElPGRsgIXk7-kVlchgZNnXw,31190
125
+ isar-1.33.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
+ isar-1.33.5.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
127
+ isar-1.33.5.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
128
+ isar-1.33.5.dist-info/RECORD,,
@@ -8,6 +8,7 @@ class ErrorReason(str, Enum):
8
8
  RobotCommunicationTimeoutException = "robot_communication_timeout_exception"
9
9
  RobotInfeasibleTaskException = "robot_infeasible_task_exception"
10
10
  RobotInfeasibleMissionException = "robot_infeasible_mission_exception"
11
+ RobotUnreliableDockingStatusException = "robot_unreliable_docking_status_exception"
11
12
  RobotMissionStatusException = "robot_mission_status_exception"
12
13
  RobotTaskStatusException = "robot_task_status_exception"
13
14
  RobotAPIException = "robot_api_exception"
@@ -88,6 +89,16 @@ class RobotInfeasibleMissionException(RobotException):
88
89
  pass
89
90
 
90
91
 
92
+ class RobotUnreliableDockingStatusException(RobotException):
93
+ def __init__(self, error_description: str) -> None:
94
+ super().__init__(
95
+ error_reason=ErrorReason.RobotUnreliableDockingStatusException,
96
+ error_description=error_description,
97
+ )
98
+
99
+ pass
100
+
101
+
91
102
  # An exception which should be thrown by the robot package if it is unable to collect
92
103
  # the status of the current mission.
93
104
  class RobotMissionStatusException(RobotException):
File without changes