isar 1.33.6__py3-none-any.whl → 1.33.8__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
@@ -59,6 +59,9 @@ class Settings(BaseSettings):
59
59
  # issues
60
60
  REQUEST_STATUS_COMMUNICATION_RECONNECT_DELAY: float = Field(default=10)
61
61
 
62
+ # Time allowed to clear the robot status before giving up
63
+ CLEAR_ROBOT_STATUS_TIMEOUT: int = Field(default=3)
64
+
62
65
  # Number of attempts for state transitions resume and pause if failed
63
66
  STATE_TRANSITION_NUM_RETIRES: int = Field(default=10)
64
67
 
@@ -78,6 +81,7 @@ class Settings(BaseSettings):
78
81
  ROBOT_STATUS_PUBLISH_INTERVAL: float = Field(default=1)
79
82
  ROBOT_HEARTBEAT_PUBLISH_INTERVAL: float = Field(default=1)
80
83
  ROBOT_INFO_PUBLISH_INTERVAL: float = Field(default=5)
84
+ ROBOT_API_BATTERY_POLL_INTERVAL: float = Field(default=5)
81
85
  ROBOT_API_STATUS_POLL_INTERVAL: float = Field(default=5)
82
86
  THREAD_CHECK_INTERVAL: float = Field(default=0.01)
83
87
 
isar/models/events.py CHANGED
@@ -42,6 +42,8 @@ class Event(Queue[T]):
42
42
  if timeout is not None:
43
43
  raise EventTimeoutError
44
44
  return None
45
+ except ValueError:
46
+ raise EventConflictError
45
47
 
46
48
  def clear_event(self) -> None:
47
49
  while True:
@@ -49,6 +51,8 @@ class Event(Queue[T]):
49
51
  self.get(block=False)
50
52
  except Empty:
51
53
  break
54
+ except ValueError:
55
+ break
52
56
 
53
57
  def has_event(self) -> bool:
54
58
  return (
@@ -123,6 +127,7 @@ class StateMachineEvents:
123
127
  self.stop_mission: Event[bool] = Event("stop_mission")
124
128
  self.pause_mission: Event[bool] = Event("pause_mission")
125
129
  self.task_status_request: Event[str] = Event("task_status_request")
130
+ self.clear_robot_status: Event[bool] = Event("clear_robot_status")
126
131
 
127
132
 
128
133
  class RobotServiceEvents:
@@ -132,6 +137,7 @@ class RobotServiceEvents:
132
137
  self.mission_started: Event[bool] = Event("mission_started")
133
138
  self.mission_failed: Event[ErrorMessage] = Event("mission_failed")
134
139
  self.robot_status_changed: Event[bool] = Event("robot_status_changed")
140
+ self.robot_status_cleared: Event[bool] = Event("robot_status_cleared")
135
141
  self.mission_failed_to_stop: Event[ErrorMessage] = Event(
136
142
  "mission_failed_to_stop"
137
143
  )
isar/models/status.py ADDED
@@ -0,0 +1,16 @@
1
+ from enum import Enum
2
+
3
+
4
+ class IsarStatus(Enum):
5
+ Available = "available"
6
+ ReturnHomePaused = "returnhomepaused"
7
+ Paused = "paused"
8
+ Busy = "busy"
9
+ Home = "home"
10
+ Offline = "offline"
11
+ BlockedProtectiveStop = "blockedprotectivestop"
12
+ ReturningHome = "returninghome"
13
+ InterventionNeeded = "interventionneeded"
14
+ Recharging = "recharging"
15
+ Lockdown = "lockdown"
16
+ GoingToLockdown = "goingtolockdown"
isar/robot/robot.py CHANGED
@@ -9,6 +9,7 @@ from isar.models.events import (
9
9
  SharedState,
10
10
  StateMachineEvents,
11
11
  )
12
+ from isar.robot.robot_battery import RobotBatteryThread
12
13
  from isar.robot.robot_pause_mission import RobotPauseMissionThread
13
14
  from isar.robot.robot_start_mission import RobotStartMissionThread
14
15
  from isar.robot.robot_status import RobotStatusThread
@@ -29,6 +30,7 @@ class Robot(object):
29
30
  self.shared_state: SharedState = shared_state
30
31
  self.robot: RobotInterface = robot
31
32
  self.start_mission_thread: Optional[RobotStartMissionThread] = None
33
+ self.robot_battery_thread: Optional[RobotBatteryThread] = None
32
34
  self.robot_status_thread: Optional[RobotStatusThread] = None
33
35
  self.robot_task_status_thread: Optional[RobotTaskStatusThread] = None
34
36
  self.stop_mission_thread: Optional[RobotStopMissionThread] = None
@@ -39,6 +41,11 @@ class Robot(object):
39
41
  self.signal_thread_quitting.set()
40
42
  if self.robot_status_thread is not None and self.robot_status_thread.is_alive():
41
43
  self.robot_status_thread.join()
44
+ if (
45
+ self.robot_battery_thread is not None
46
+ and self.robot_battery_thread.is_alive()
47
+ ):
48
+ self.robot_battery_thread.join()
42
49
  if (
43
50
  self.robot_task_status_thread is not None
44
51
  and self.robot_task_status_thread.is_alive()
@@ -52,6 +59,7 @@ class Robot(object):
52
59
  if self.stop_mission_thread is not None and self.stop_mission_thread.is_alive():
53
60
  self.stop_mission_thread.join()
54
61
  self.robot_status_thread = None
62
+ self.robot_battery_thread = None
55
63
  self.robot_task_status_thread = None
56
64
  self.start_mission_thread = None
57
65
 
@@ -143,10 +151,19 @@ class Robot(object):
143
151
 
144
152
  def run(self) -> None:
145
153
  self.robot_status_thread = RobotStatusThread(
146
- self.robot, self.signal_thread_quitting, self.shared_state
154
+ robot=self.robot,
155
+ signal_thread_quitting=self.signal_thread_quitting,
156
+ shared_state=self.shared_state,
157
+ state_machine_events=self.state_machine_events,
158
+ robot_service_events=self.robot_service_events,
147
159
  )
148
160
  self.robot_status_thread.start()
149
161
 
162
+ self.robot_battery_thread = RobotBatteryThread(
163
+ self.robot, self.signal_thread_quitting, self.shared_state
164
+ )
165
+ self.robot_battery_thread.start()
166
+
150
167
  while not self.signal_thread_quitting.wait(0):
151
168
  self._start_mission_event_handler(self.state_machine_events.start_mission)
152
169
 
@@ -0,0 +1,60 @@
1
+ import logging
2
+ import time
3
+ from threading import Event, Thread
4
+
5
+ from isar.config.settings import settings
6
+ from isar.models.events import SharedState
7
+ from robot_interface.models.exceptions.robot_exceptions import RobotException
8
+ from robot_interface.robot_interface import RobotInterface
9
+
10
+
11
+ class RobotBatteryThread(Thread):
12
+ def __init__(
13
+ self,
14
+ robot: RobotInterface,
15
+ signal_thread_quitting: Event,
16
+ shared_state: SharedState,
17
+ ):
18
+ self.logger = logging.getLogger("robot")
19
+ self.shared_state: SharedState = shared_state
20
+ self.robot: RobotInterface = robot
21
+ self.signal_thread_quitting: Event = signal_thread_quitting
22
+ self.last_robot_battery_poll_time: float = time.time()
23
+ self.force_battery_poll_next_iteration: bool = True
24
+ Thread.__init__(self, name="Robot battery thread")
25
+
26
+ def stop(self) -> None:
27
+ return
28
+
29
+ def _is_ready_to_poll_for_battery(self) -> bool:
30
+ if self.force_battery_poll_next_iteration:
31
+ self.force_battery_poll_next_iteration = False
32
+ return True
33
+
34
+ time_since_last_robot_battery_poll = (
35
+ time.time() - self.last_robot_battery_poll_time
36
+ )
37
+ return (
38
+ time_since_last_robot_battery_poll
39
+ > settings.ROBOT_API_BATTERY_POLL_INTERVAL
40
+ )
41
+
42
+ def run(self):
43
+ if self.signal_thread_quitting.is_set():
44
+ return
45
+
46
+ thread_check_interval = settings.THREAD_CHECK_INTERVAL
47
+
48
+ while not self.signal_thread_quitting.wait(thread_check_interval):
49
+ if not self._is_ready_to_poll_for_battery():
50
+ continue
51
+ try:
52
+ self.last_robot_battery_poll_time = time.time()
53
+
54
+ robot_battery_level = self.robot.get_battery_level()
55
+
56
+ self.shared_state.robot_battery_level.update(robot_battery_level)
57
+ except RobotException as e:
58
+ self.logger.error(f"Failed to retrieve robot battery level: {e}")
59
+ continue
60
+ self.logger.info("Exiting robot battery thread")
@@ -3,7 +3,7 @@ import time
3
3
  from threading import Event, Thread
4
4
 
5
5
  from isar.config.settings import settings
6
- from isar.models.events import SharedState
6
+ from isar.models.events import RobotServiceEvents, SharedState, StateMachineEvents
7
7
  from robot_interface.models.exceptions.robot_exceptions import RobotException
8
8
  from robot_interface.robot_interface import RobotInterface
9
9
 
@@ -14,26 +14,32 @@ class RobotStatusThread(Thread):
14
14
  robot: RobotInterface,
15
15
  signal_thread_quitting: Event,
16
16
  shared_state: SharedState,
17
+ robot_service_events: RobotServiceEvents,
18
+ state_machine_events: StateMachineEvents,
17
19
  ):
18
20
  self.logger = logging.getLogger("robot")
19
21
  self.shared_state: SharedState = shared_state
22
+ self.robot_service_events: RobotServiceEvents = robot_service_events
23
+ self.state_machine_events: StateMachineEvents = state_machine_events
20
24
  self.robot: RobotInterface = robot
21
25
  self.signal_thread_quitting: Event = signal_thread_quitting
22
- self.last_robot_status_poll_time: float = (
23
- time.time() - settings.ROBOT_API_STATUS_POLL_INTERVAL
24
- )
26
+ self.robot_status_poll_interval: float = settings.ROBOT_API_STATUS_POLL_INTERVAL
27
+ self.last_robot_status_poll_time: float = time.time()
28
+ self.force_status_poll_next_iteration: bool = True
25
29
  Thread.__init__(self, name="Robot status thread")
26
30
 
27
31
  def stop(self) -> None:
28
32
  return
29
33
 
30
34
  def _is_ready_to_poll_for_status(self) -> bool:
35
+ if self.force_status_poll_next_iteration:
36
+ self.force_status_poll_next_iteration = False
37
+ return True
38
+
31
39
  time_since_last_robot_status_poll = (
32
40
  time.time() - self.last_robot_status_poll_time
33
41
  )
34
- return (
35
- time_since_last_robot_status_poll > settings.ROBOT_API_STATUS_POLL_INTERVAL
36
- )
42
+ return time_since_last_robot_status_poll > self.robot_status_poll_interval
37
43
 
38
44
  def run(self):
39
45
  if self.signal_thread_quitting.is_set():
@@ -42,16 +48,23 @@ class RobotStatusThread(Thread):
42
48
  thread_check_interval = settings.THREAD_CHECK_INTERVAL
43
49
 
44
50
  while not self.signal_thread_quitting.wait(thread_check_interval):
51
+ if self.state_machine_events.clear_robot_status.consume_event() is not None:
52
+ self.shared_state.robot_status.clear_event()
53
+ self.robot_service_events.robot_status_changed.clear_event()
54
+ self.robot_service_events.robot_status_cleared.trigger_event(True)
55
+ self.force_status_poll_next_iteration = True
56
+
45
57
  if not self._is_ready_to_poll_for_status():
46
58
  continue
59
+
47
60
  try:
48
61
  self.last_robot_status_poll_time = time.time()
49
62
 
50
63
  robot_status = self.robot.robot_status()
51
- robot_battery_level = self.robot.get_battery_level()
52
64
 
53
- self.shared_state.robot_status.update(robot_status)
54
- self.shared_state.robot_battery_level.update(robot_battery_level)
65
+ if robot_status is not self.shared_state.robot_status.check():
66
+ self.shared_state.robot_status.update(robot_status)
67
+ self.robot_service_events.robot_status_changed.trigger_event(True)
55
68
  except RobotException as e:
56
69
  self.logger.error(f"Failed to retrieve robot status: {e}")
57
70
  continue
@@ -94,6 +94,12 @@ class SchedulingUtilities:
94
94
  status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
95
95
  detail="Could not plan mission",
96
96
  )
97
+ except Exception as e:
98
+ self.logger.error(e)
99
+ raise HTTPException(
100
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
101
+ detail="Could not return mission",
102
+ )
97
103
 
98
104
  def verify_robot_capable_of_mission(
99
105
  self, mission: Mission, robot_capabilities: List[str]
@@ -171,6 +177,10 @@ class SchedulingUtilities:
171
177
  ------
172
178
  HTTTPException 408 Request timeout
173
179
  If there is a timeout while communicating with the state machine
180
+ HTTPException 409 Conflict
181
+ If the state machine is not ready to receive a mission
182
+ HTTPException 500 Internal Server Error
183
+ If there is an unexpected error while sending the mission to the state machine
174
184
  """
175
185
  try:
176
186
  mission_start_response = self._send_command(
@@ -195,6 +205,14 @@ class SchedulingUtilities:
195
205
  )
196
206
  self.logger.warning(error_message)
197
207
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
208
+ except Exception as e:
209
+ error_message = (
210
+ f"Unexpected error while sending mission to state machine: {e}"
211
+ )
212
+ self.logger.error(error_message)
213
+ raise HTTPException(
214
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
215
+ )
198
216
  self.logger.info("OK - Mission started in ISAR")
199
217
 
200
218
  def return_home(
@@ -206,6 +224,10 @@ class SchedulingUtilities:
206
224
  ------
207
225
  HTTTPException 408 Request timeout
208
226
  If there is a timeout while communicating with the state machine
227
+ HTTPException 409 Conflict
228
+ If the state machine is not ready to receive a return home mission
229
+ HTTPException 500 Internal Server Error
230
+ If there is an unexpected error while sending the return home command
209
231
  """
210
232
  try:
211
233
  self._send_command(
@@ -220,6 +242,12 @@ class SchedulingUtilities:
220
242
  error_message = "State machine has entered a state which cannot start a return home mission"
221
243
  self.logger.warning(error_message)
222
244
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
245
+ except Exception as e:
246
+ error_message = f"Unexpected error while sending return home command: {e}"
247
+ self.logger.error(error_message)
248
+ raise HTTPException(
249
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
250
+ )
223
251
  self.logger.info("OK - Return home mission started in ISAR")
224
252
 
225
253
  def pause_mission(self) -> ControlMissionResponse:
@@ -229,6 +257,8 @@ class SchedulingUtilities:
229
257
  ------
230
258
  HTTTPException 408 Request timeout
231
259
  If there is a timeout while communicating with the state machine
260
+ HTTPException 409 Conflict
261
+ If the state machine is not in a state which can pause a mission
232
262
  """
233
263
  try:
234
264
  response = self._send_command(True, self.api_events.pause_mission)
@@ -244,6 +274,12 @@ class SchedulingUtilities:
244
274
  )
245
275
  self.logger.warning(error_message)
246
276
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
277
+ except Exception as e:
278
+ error_message = f"Unexpected error while pausing mission: {e}"
279
+ self.logger.error(error_message)
280
+ raise HTTPException(
281
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
282
+ )
247
283
 
248
284
  def resume_mission(self) -> ControlMissionResponse:
249
285
  """Resume mission
@@ -252,6 +288,10 @@ class SchedulingUtilities:
252
288
  ------
253
289
  HTTTPException 408 Request timeout
254
290
  If there is a timeout while communicating with the state machine
291
+ HTTPException 409 Conflict
292
+ If the state machine is not in a state which can resume a mission
293
+ HTTPException 500 Internal Server Error
294
+ If there is an unexpected error while resuming the mission
255
295
  """
256
296
  try:
257
297
  response = self._send_command(True, self.api_events.resume_mission)
@@ -267,6 +307,12 @@ class SchedulingUtilities:
267
307
  raise HTTPException(
268
308
  status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
269
309
  )
310
+ except Exception as e:
311
+ error_message = f"Unexpected error while resuming mission: {e}"
312
+ self.logger.error(error_message)
313
+ raise HTTPException(
314
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
315
+ )
270
316
 
271
317
  def stop_mission(self, mission_id: str = "") -> ControlMissionResponse:
272
318
  """Stop mission
@@ -279,6 +325,10 @@ class SchedulingUtilities:
279
325
  The request was understood, but attempting to stop the mission failed
280
326
  HTTPException 408 Request timeout
281
327
  If there is a timeout while communicating with the state machine
328
+ HTTPException 409 Conflict
329
+ If the state machine is not in a state which can stop a mission
330
+ HTTPException 500 Internal Server Error
331
+ If there is an unexpected error while stopping the mission
282
332
  """
283
333
  try:
284
334
  stop_mission_response: ControlMissionResponse = self._send_command(
@@ -293,7 +343,7 @@ class SchedulingUtilities:
293
343
  )
294
344
 
295
345
  if stop_mission_response.mission_status != MissionStatus.Cancelled.value:
296
- error_message = "Failed to stop mission"
346
+ error_message = f"Failed to stop mission, mission status is {stop_mission_response.mission_status}"
297
347
  self.logger.error(error_message)
298
348
  raise HTTPException(
299
349
  status_code=HTTPStatus.CONFLICT, detail=error_message
@@ -308,6 +358,14 @@ class SchedulingUtilities:
308
358
  )
309
359
  self.logger.warning(error_message)
310
360
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
361
+ except HTTPException as e:
362
+ raise e
363
+ except Exception as e:
364
+ error_message = f"Unexpected error while stopping mission: {e}"
365
+ self.logger.error(error_message)
366
+ raise HTTPException(
367
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
368
+ )
311
369
  self.logger.info("OK - Mission successfully stopped")
312
370
  return stop_mission_response
313
371
 
@@ -316,6 +374,10 @@ class SchedulingUtilities:
316
374
 
317
375
  Raises
318
376
  ------
377
+ HTTPException 409 Conflict
378
+ If the state machine is not in intervention needed state
379
+ HTTPException 408 Request timeout
380
+ If there is a timeout while communicating with the state machine
319
381
  HTTPException 500 Internal Server Error
320
382
  If the intervention needed state could not be released
321
383
  """
@@ -332,12 +394,22 @@ class SchedulingUtilities:
332
394
  error_message = "Cannot release intervention needed as it is not in intervention needed state"
333
395
  self.logger.warning(error_message)
334
396
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
397
+ except Exception as e:
398
+ error_message = (
399
+ f"Unexpected error while releasing intervention needed state: {e}"
400
+ )
401
+ self.logger.error(error_message)
402
+ raise HTTPException(
403
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
404
+ )
335
405
 
336
406
  def lock_down_robot(self) -> None:
337
407
  """Lock down robot
338
408
 
339
409
  Raises
340
410
  ------
411
+ HTTPException 409 Conflict
412
+ If the state machine is not in a state which can be locked down
341
413
  HTTPException 500 Internal Server Error
342
414
  If the robot could not be locked down
343
415
  """
@@ -352,12 +424,20 @@ class SchedulingUtilities:
352
424
  error_message = "Cannot send robot to lockdown as it is already in lockdown"
353
425
  self.logger.warning(error_message)
354
426
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
427
+ except Exception as e:
428
+ error_message = f"Unexpected error while locking down robot: {e}"
429
+ self.logger.error(error_message)
430
+ raise HTTPException(
431
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
432
+ )
355
433
 
356
434
  def release_robot_lockdown(self) -> None:
357
435
  """Release robot from lockdown
358
436
 
359
437
  Raises
360
438
  ------
439
+ HTTPException 409 Conflict
440
+ If the state machine is not in lockdown
361
441
  HTTPException 500 Internal Server Error
362
442
  If the robot could not be released from lockdown
363
443
  """
@@ -376,6 +456,12 @@ class SchedulingUtilities:
376
456
  )
377
457
  self.logger.warning(error_message)
378
458
  raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=error_message)
459
+ except Exception as e:
460
+ error_message = f"Unexpected error while releasing robot from lockdown: {e}"
461
+ self.logger.error(error_message)
462
+ raise HTTPException(
463
+ status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=error_message
464
+ )
379
465
 
380
466
  def _send_command(self, input: T1, api_event: APIEvent[T1, T2]) -> T2:
381
467
  if api_event.request.has_event():
@@ -15,6 +15,7 @@ from isar.mission_planner.task_selector_interface import (
15
15
  TaskSelectorStop,
16
16
  )
17
17
  from isar.models.events import Events, SharedState
18
+ from isar.models.status import IsarStatus
18
19
  from isar.services.service_connections.mqtt.mqtt_client import props_expiry
19
20
  from isar.state_machine.states.await_next_mission import AwaitNextMission
20
21
  from isar.state_machine.states.blocked_protective_stop import BlockedProtectiveStop
@@ -45,15 +46,15 @@ from robot_interface.models.exceptions.robot_exceptions import (
45
46
  )
46
47
  from robot_interface.models.inspection.inspection import Inspection
47
48
  from robot_interface.models.mission.mission import Mission
48
- from robot_interface.models.mission.status import RobotStatus, TaskStatus
49
+ from robot_interface.models.mission.status import TaskStatus
49
50
  from robot_interface.models.mission.task import TASKS, InspectionTask, Task
50
51
  from robot_interface.robot_interface import RobotInterface
51
52
  from robot_interface.telemetry.mqtt_client import MqttClientInterface
52
53
  from robot_interface.telemetry.payloads import (
53
54
  InterventionNeededPayload,
55
+ IsarStatusPayload,
54
56
  MissionAbortedPayload,
55
57
  MissionPayload,
56
- RobotStatusPayload,
57
58
  TaskPayload,
58
59
  )
59
60
  from robot_interface.utilities.json_service import EnhancedJSONEncoder
@@ -213,6 +214,9 @@ class StateMachine(object):
213
214
  self.send_task_status()
214
215
 
215
216
  def battery_level_is_above_mission_start_threshold(self):
217
+ if not self.shared_state.robot_battery_level.check():
218
+ self.logger.warning("Battery level is None")
219
+ return False
216
220
  return (
217
221
  not self.shared_state.robot_battery_level.check()
218
222
  < settings.ROBOT_MISSION_BATTERY_START_THRESHOLD
@@ -367,7 +371,7 @@ class StateMachine(object):
367
371
  if not self.mqtt_publisher:
368
372
  return
369
373
 
370
- payload: RobotStatusPayload = RobotStatusPayload(
374
+ payload: IsarStatusPayload = IsarStatusPayload(
371
375
  isar_id=settings.ISAR_ID,
372
376
  robot_name=settings.ROBOT_NAME,
373
377
  status=self._current_status(),
@@ -381,31 +385,31 @@ class StateMachine(object):
381
385
  retain=True,
382
386
  )
383
387
 
384
- def _current_status(self) -> RobotStatus:
388
+ def _current_status(self) -> IsarStatus:
385
389
  if self.current_state == States.AwaitNextMission:
386
- return RobotStatus.Available
390
+ return IsarStatus.Available
387
391
  elif self.current_state == States.ReturnHomePaused:
388
- return RobotStatus.ReturnHomePaused
392
+ return IsarStatus.ReturnHomePaused
389
393
  elif self.current_state == States.Paused:
390
- return RobotStatus.Paused
394
+ return IsarStatus.Paused
391
395
  elif self.current_state == States.Home:
392
- return RobotStatus.Home
396
+ return IsarStatus.Home
393
397
  elif self.current_state == States.ReturningHome:
394
- return RobotStatus.ReturningHome
398
+ return IsarStatus.ReturningHome
395
399
  elif self.current_state == States.Offline:
396
- return RobotStatus.Offline
400
+ return IsarStatus.Offline
397
401
  elif self.current_state == States.BlockedProtectiveStop:
398
- return RobotStatus.BlockedProtectiveStop
402
+ return IsarStatus.BlockedProtectiveStop
399
403
  elif self.current_state == States.InterventionNeeded:
400
- return RobotStatus.InterventionNeeded
404
+ return IsarStatus.InterventionNeeded
401
405
  elif self.current_state == States.Recharging:
402
- return RobotStatus.Recharging
406
+ return IsarStatus.Recharging
403
407
  elif self.current_state == States.Lockdown:
404
- return RobotStatus.Lockdown
408
+ return IsarStatus.Lockdown
405
409
  elif self.current_state == States.GoingToLockdown:
406
- return RobotStatus.GoingToLockdown
410
+ return IsarStatus.GoingToLockdown
407
411
  else:
408
- return RobotStatus.Busy
412
+ return IsarStatus.Busy
409
413
 
410
414
  def _log_state_transition(self, next_state) -> None:
411
415
  """Logs all state transitions that are not self-transitions."""
@@ -1,7 +1,7 @@
1
1
  from typing import TYPE_CHECKING, List
2
2
 
3
3
  from isar.eventhandlers.eventhandler import EventHandlerBase, EventHandlerMapping
4
- from isar.models.events import Event
4
+ from isar.state_machine.utils.common_event_handlers import robot_status_event_handler
5
5
  from robot_interface.models.mission.status import RobotStatus
6
6
 
7
7
  if TYPE_CHECKING:
@@ -11,19 +11,19 @@ if TYPE_CHECKING:
11
11
  class BlockedProtectiveStop(EventHandlerBase):
12
12
 
13
13
  def __init__(self, state_machine: "StateMachine"):
14
+ events = state_machine.events
14
15
  shared_state = state_machine.shared_state
15
16
 
16
- def _robot_status_event_handler(event: Event[RobotStatus]):
17
- robot_status: RobotStatus = event.check()
18
- if robot_status != RobotStatus.BlockedProtectiveStop:
19
- return state_machine.robot_status_changed # type: ignore
20
- return None
21
-
22
17
  event_handlers: List[EventHandlerMapping] = [
23
18
  EventHandlerMapping(
24
19
  name="robot_status_event",
25
- event=shared_state.robot_status,
26
- handler=_robot_status_event_handler,
20
+ event=events.robot_service_events.robot_status_changed,
21
+ handler=lambda event: robot_status_event_handler(
22
+ state_machine=state_machine,
23
+ expected_status=RobotStatus.BlockedProtectiveStop,
24
+ status_changed_event=event,
25
+ status_event=shared_state.robot_status,
26
+ ),
27
27
  ),
28
28
  ]
29
29
  super().__init__(
@@ -20,17 +20,6 @@ class Home(EventHandlerBase):
20
20
  events = state_machine.events
21
21
  shared_state = state_machine.shared_state
22
22
 
23
- def _robot_status_event_handler(
24
- event: Event[RobotStatus],
25
- ) -> Optional[Callable]:
26
- robot_status: RobotStatus = event.check()
27
- if not (
28
- robot_status == RobotStatus.Available
29
- or robot_status == RobotStatus.Home
30
- ):
31
- return state_machine.robot_status_changed # type: ignore
32
- return None
33
-
34
23
  def _send_to_lockdown_event_handler(event: Event[bool]):
35
24
  should_send_robot_home: bool = event.consume_event()
36
25
  if should_send_robot_home:
@@ -40,6 +29,21 @@ class Home(EventHandlerBase):
40
29
  return state_machine.reached_lockdown # type: ignore
41
30
  return None
42
31
 
32
+ def _robot_status_event_handler(
33
+ state_machine: "StateMachine",
34
+ status_changed_event: Event[bool],
35
+ status_event: Event[RobotStatus],
36
+ ) -> Optional[Callable]:
37
+ if not status_changed_event.consume_event():
38
+ return None
39
+ robot_status: Optional[RobotStatus] = status_event.check()
40
+ if not (
41
+ robot_status == RobotStatus.Available
42
+ or robot_status == RobotStatus.Home
43
+ ):
44
+ return state_machine.robot_status_changed # type: ignore
45
+ return None
46
+
43
47
  event_handlers: List[EventHandlerMapping] = [
44
48
  EventHandlerMapping(
45
49
  name="start_mission_event",
@@ -60,8 +64,12 @@ class Home(EventHandlerBase):
60
64
  ),
61
65
  EventHandlerMapping(
62
66
  name="robot_status_event",
63
- event=shared_state.robot_status,
64
- handler=_robot_status_event_handler,
67
+ event=events.robot_service_events.robot_status_changed,
68
+ handler=lambda event: _robot_status_event_handler(
69
+ state_machine=state_machine,
70
+ status_changed_event=event,
71
+ status_event=shared_state.robot_status,
72
+ ),
65
73
  ),
66
74
  EventHandlerMapping(
67
75
  name="send_to_lockdown_event",
@@ -1,7 +1,7 @@
1
1
  from typing import TYPE_CHECKING, List
2
2
 
3
3
  from isar.eventhandlers.eventhandler import EventHandlerBase, EventHandlerMapping
4
- from isar.models.events import Event
4
+ from isar.state_machine.utils.common_event_handlers import robot_status_event_handler
5
5
  from robot_interface.models.mission.status import RobotStatus
6
6
 
7
7
  if TYPE_CHECKING:
@@ -11,20 +11,19 @@ if TYPE_CHECKING:
11
11
  class Offline(EventHandlerBase):
12
12
 
13
13
  def __init__(self, state_machine: "StateMachine"):
14
-
14
+ events = state_machine.events
15
15
  shared_state = state_machine.shared_state
16
16
 
17
- def _robot_status_event_handler(event: Event[RobotStatus]):
18
- robot_status: RobotStatus = event.check()
19
- if robot_status != RobotStatus.Offline:
20
- return state_machine.robot_status_changed # type: ignore
21
- return None
22
-
23
17
  event_handlers: List[EventHandlerMapping] = [
24
18
  EventHandlerMapping(
25
19
  name="robot_status_event",
26
- event=shared_state.robot_status,
27
- handler=_robot_status_event_handler,
20
+ event=events.robot_service_events.robot_status_changed,
21
+ handler=lambda event: robot_status_event_handler(
22
+ state_machine=state_machine,
23
+ expected_status=RobotStatus.Offline,
24
+ status_changed_event=event,
25
+ status_event=shared_state.robot_status,
26
+ ),
28
27
  ),
29
28
  ]
30
29
  super().__init__(
@@ -1,5 +1,7 @@
1
+ import time
1
2
  from typing import TYPE_CHECKING
2
3
 
4
+ from isar.config.settings import settings
3
5
  from robot_interface.models.mission.status import RobotStatus
4
6
 
5
7
  if TYPE_CHECKING:
@@ -19,3 +21,16 @@ def is_available_or_home(state_machine: "StateMachine") -> bool:
19
21
  def is_blocked_protective_stop(state_machine: "StateMachine") -> bool:
20
22
  robot_status = state_machine.shared_state.robot_status.check()
21
23
  return robot_status == RobotStatus.BlockedProtectiveStop
24
+
25
+
26
+ def clear_robot_status(state_machine: "StateMachine") -> bool:
27
+ state_machine.events.state_machine_events.clear_robot_status.trigger_event(True)
28
+ start_time: float = time.time()
29
+ while time.time() - start_time < settings.CLEAR_ROBOT_STATUS_TIMEOUT:
30
+ if (
31
+ state_machine.events.robot_service_events.robot_status_cleared.consume_event()
32
+ ):
33
+ return True
34
+ time.sleep(settings.FSM_SLEEP_TIME)
35
+ state_machine.logger.error("Timed out waiting for robot status to be cleared")
36
+ return False
@@ -12,6 +12,7 @@ from isar.state_machine.transitions.functions.return_home import (
12
12
  should_retry_return_home,
13
13
  start_return_home_mission,
14
14
  )
15
+ from isar.state_machine.transitions.functions.robot_status import clear_robot_status
15
16
  from isar.state_machine.transitions.functions.start_mission import (
16
17
  initialize_robot,
17
18
  trigger_start_mission_event,
@@ -58,11 +59,19 @@ def get_return_home_transitions(state_machine: "StateMachine") -> List[dict]:
58
59
  "trigger": "returned_home",
59
60
  "source": state_machine.returning_home_state,
60
61
  "dest": state_machine.home_state,
62
+ "conditions": [
63
+ def_transition(state_machine, clear_robot_status),
64
+ ],
61
65
  "before": [
62
66
  def_transition(state_machine, reset_return_home_failure_counter),
63
67
  def_transition(state_machine, return_home_finished),
64
68
  ],
65
69
  },
70
+ {
71
+ "trigger": "returned_home",
72
+ "source": state_machine.returning_home_state,
73
+ "dest": state_machine.intervention_needed_state,
74
+ },
66
75
  {
67
76
  "trigger": "starting_recharging",
68
77
  "source": state_machine.returning_home_state,
@@ -43,9 +43,12 @@ def return_home_event_handler(
43
43
  def robot_status_event_handler(
44
44
  state_machine: "StateMachine",
45
45
  expected_status: RobotStatus,
46
- event: Event[RobotStatus],
46
+ status_changed_event: Event[bool],
47
+ status_event: Event[RobotStatus],
47
48
  ) -> Optional[Callable]:
48
- robot_status: RobotStatus = event.check()
49
+ if not status_changed_event.consume_event():
50
+ return None
51
+ robot_status: Optional[RobotStatus] = status_event.check()
49
52
  if robot_status != expected_status:
50
53
  return state_machine.robot_status_changed # type: ignore
51
54
  return None
isar/storage/uploader.py CHANGED
@@ -146,6 +146,9 @@ class Uploader:
146
146
  )
147
147
  except Empty:
148
148
  continue
149
+ except Exception as e:
150
+ self.logger.error(f"Unexpected error in uploader thread: {e}")
151
+ continue
149
152
 
150
153
  def _upload(self, item: BlobItem) -> StoragePaths:
151
154
  inspection_paths: StoragePaths
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isar
3
- Version: 1.33.6
3
+ Version: 1.33.8
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
@@ -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=5A_hxq6AFzg94ROz8yIK8KKZcygwJAosM4ROKJOeCfU,14243
19
+ isar/config/settings.py,sha256=XMPU4d1V6FspjvMmto5TFmC8Slt8Nrpmn9n_tsyPTYk,14423
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
@@ -42,11 +42,13 @@ isar/mission_planner/mission_planner_interface.py,sha256=UgpPIM4FbrWOD7fGY3Ul64k
42
42
  isar/mission_planner/sequential_task_selector.py,sha256=66agRPHuJnEa1vArPyty4muTasAZ50XPjjrSaTdY_Cc,643
43
43
  isar/mission_planner/task_selector_interface.py,sha256=pnLeaGPIuyXThcflZ_A7YL2b2xQjFT88hAZidkMomxU,707
44
44
  isar/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- isar/models/events.py,sha256=GzoOzwZA5PgPuI8Uc-bR3Kvrj-OJuSUIHPynZrkjgU8,5521
46
- isar/robot/robot.py,sha256=jeDVTWneDPFfHcpa4QUVx6DscE7gAiZ85UMuB-Xwm9o,6853
45
+ isar/models/events.py,sha256=t3INc7FuoZMzQq65kkJOEVltrQ2Wf4uXXQw8XgcYVrk,5792
46
+ isar/models/status.py,sha256=RCsf0p6FEsOFr4FGA6wekRdJIPrCOHMYuteXs2Mwwhk,430
47
+ isar/robot/robot.py,sha256=sn-JfJE6lC6Auo13fdS556Uwq_xZE6VSrR4DhNcgOno,7560
48
+ isar/robot/robot_battery.py,sha256=goLdgmn61QCgE2Ja3YuiwE_sqJzIhCkS3u90sz1kdug,2089
47
49
  isar/robot/robot_pause_mission.py,sha256=BFTLVFOnCeuLlyz1Lu12_6EgYBhk8frsviCs-kGq7AA,2277
48
50
  isar/robot/robot_start_mission.py,sha256=RPYH9VtXDFdPqhOpt6kSbT17RHkJQPKkQ6d4784_pFE,3210
49
- isar/robot/robot_status.py,sha256=OXx18Qj0bvb2sKzn5-yKXWGdZ9GYyCOIgiTaGof-0Wc,2055
51
+ isar/robot/robot_status.py,sha256=8201XW9SmYFLVjys9zk972a8ge9aEgCsdm-V1S2VTjM,2924
50
52
  isar/robot/robot_stop_mission.py,sha256=lKWY9LsBeeMsBZHJEN-Mfm2h3DYoBQT71TgEKlxw9ng,2269
51
53
  isar/robot/robot_task_status.py,sha256=jefIDfrbly7vWZztWA2zLmK5Yz1NSEytw2YUmprccNA,3161
52
54
  isar/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -60,20 +62,20 @@ isar/services/service_connections/mqtt/robot_heartbeat_publisher.py,sha256=SKPvY
60
62
  isar/services/service_connections/mqtt/robot_info_publisher.py,sha256=AxokGk51hRPTxxD2r0P9braPJCMrf1InaCxrUBKkF4g,1402
61
63
  isar/services/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
64
  isar/services/utilities/robot_utilities.py,sha256=4zCigsLXfqDC8POHchktSq81zr1_pTaRve_LQsVr6Mk,514
63
- isar/services/utilities/scheduling_utilities.py,sha256=yIhvYeWjU4e6n0R84yfSve-CqUCENg1vqoSPuHTfcOE,15584
65
+ isar/services/utilities/scheduling_utilities.py,sha256=DOI4K2IRDWiYjAXL891VTDLXWoJnw3Z9FYQF4uKVooM,19782
64
66
  isar/services/utilities/threaded_request.py,sha256=py4G-_RjnIdHljmKFAcQ6ddqMmp-ZYV39Ece-dqRqjs,1874
65
67
  isar/state_machine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- isar/state_machine/state_machine.py,sha256=CUDTwPEOVpyV8up5bhVLKLkPDcc1mMx_NchmqCe27z0,19730
68
+ isar/state_machine/state_machine.py,sha256=lF25XC6vpNO8Mj3DWnmfPBKjS1atl7GdtGbBs2TkaUs,19887
67
69
  isar/state_machine/states_enum.py,sha256=EzqLHsNbR7KBMIY5Fa_CDaHm9v6g8UFzq9DJs4x0OU8,746
68
70
  isar/state_machine/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
71
  isar/state_machine/states/await_next_mission.py,sha256=3_KrK7nWu1Dm-VA3Rt1gwVsUbn9WuB7MoqLCfobGJSM,2749
70
- isar/state_machine/states/blocked_protective_stop.py,sha256=GEOvxnHXjpCsrh3aa8Idtn1zMYv5HLQzj9qQAq8HvaU,1180
72
+ isar/state_machine/states/blocked_protective_stop.py,sha256=HJr_jH8OdHMuX8zhjlF5jtNAfMCxkA1X7nOGmkAz-RY,1263
71
73
  isar/state_machine/states/going_to_lockdown.py,sha256=RLMOH2lXiT3hQhfUtbBVAUfwKUd33yxbjq4uZDZ_Tkc,3388
72
- isar/state_machine/states/home.py,sha256=aWJYsGkv8zVaKZJ4OUbbRPHyI4j8Jj9Uy0PvLx6jI2U,2984
74
+ isar/state_machine/states/home.py,sha256=mCwXSb9LygNpY4qaKEkEYC3nP-6HdsSGmEyjsENumgM,3396
73
75
  isar/state_machine/states/intervention_needed.py,sha256=A0QYz1vD1tDKAealihXDuoGuMLtXrRfn_AwFoaUhT_Q,1640
74
76
  isar/state_machine/states/lockdown.py,sha256=mWjhjtky5GbW6BLjsi2TsS0LXI-yq7l29FaqZ2TbTek,1375
75
77
  isar/state_machine/states/monitor.py,sha256=wmiJrbKntnNw9ExS6-VdJJuW2Q3Jzl9DozmZmEXJ0Cw,5285
76
- isar/state_machine/states/offline.py,sha256=5wdNzC1wG0cWrpuT_r_mk8UNFHA4QSyg8ejXUTAg4Io,1137
78
+ isar/state_machine/states/offline.py,sha256=k1UdcRWLd6lJiL5cnpHKBkvMY4xZMt_x7XIauy-Rgww,1219
77
79
  isar/state_machine/states/paused.py,sha256=1ADoTJ3b137k7dmZYxeyGVhyrRF8qotxoV1NaWCbBUk,2870
78
80
  isar/state_machine/states/pausing.py,sha256=r0GywI1-JDOJLZEnxhnq_yFKza37eL45qHP0ir8SBsY,2762
79
81
  isar/state_machine/states/pausing_return_home.py,sha256=USyBLWpJqrsJ2hsdyW6i-gvEsog2l7OMJLdgIj-hq0Y,2808
@@ -85,25 +87,25 @@ isar/state_machine/states/stopping_go_to_lockdown.py,sha256=npbz0aFbbCpsEbmBYc8w
85
87
  isar/state_machine/states/stopping_return_home.py,sha256=ub952Ulas3a0lsV_dI4liBiInADo3zaPAGod2bPe_18,2985
86
88
  isar/state_machine/states/unknown_status.py,sha256=Y-g9cgme5zriyZ6YUzFRYhOvv9ZylCSwfaY8MJ7xEJ0,1791
87
89
  isar/state_machine/transitions/mission.py,sha256=lwXdC5Jn19gO-wrSaZp3_77mLnvj-CaBYZk61U-qgoo,8211
88
- isar/state_machine/transitions/return_home.py,sha256=0tB2n07_eq7J3-Aq3v5ob8Mh-yyCkSNu07OgD9NkCY0,6374
90
+ isar/state_machine/transitions/return_home.py,sha256=ho4Nae-C5BaxVFciFL546EuoMSDIWLqT58E8bNraW4o,6749
89
91
  isar/state_machine/transitions/robot_status.py,sha256=qJMurCpuficOiXs9us4lZJ5p_kOFSwKxJigiXfB1OS8,2430
90
92
  isar/state_machine/transitions/functions/fail_mission.py,sha256=fBwLW22d8MyrH4047hb3eXn87yLq4v5SkLSIhV9Ge5k,947
91
93
  isar/state_machine/transitions/functions/finish_mission.py,sha256=TRQrk7HdllmAkwsp25HRZAFAk46Y1hLx3jmkIAKrHDI,1442
92
94
  isar/state_machine/transitions/functions/pause.py,sha256=QCIKTpB_CAkUVaSy02i2cpLJAWx3-qGN5RPbK9L2qPY,983
93
95
  isar/state_machine/transitions/functions/resume.py,sha256=SAu4hWomPlrvO0lnpc6uM3rj79Bwq01acnaTEvNbO9U,2116
94
96
  isar/state_machine/transitions/functions/return_home.py,sha256=5WPO40MtuRKm9-NtyrS6m0IVEit14MXfMKjgZ2sCXRU,1666
95
- isar/state_machine/transitions/functions/robot_status.py,sha256=2P3EfP2c06GY-LUquyBTyHn1Ard31Hl3UeT-e-VaIWE,768
97
+ isar/state_machine/transitions/functions/robot_status.py,sha256=bA8G5WtY7TA88MKpdOcR6qftFjW8OttntmptZDXpTKg,1365
96
98
  isar/state_machine/transitions/functions/start_mission.py,sha256=tIpZzYXCoeC6ZWj18UB4DiZuICpxfzFUK23wfunad7Q,2864
97
99
  isar/state_machine/transitions/functions/stop.py,sha256=4idsNh7v6CRJivD36oKnVmdKlP7mSugTLCh9n12R1-U,2114
98
100
  isar/state_machine/transitions/functions/utils.py,sha256=Wa72Ocq4QT1E6qkpEJZQ3h5o33pGvx7Tlkt2JZ2Grbk,314
99
- isar/state_machine/utils/common_event_handlers.py,sha256=yFZzTmTLVWzHU4RNW3q9gc6NU9eajNn50L-vt6geH38,6318
101
+ isar/state_machine/utils/common_event_handlers.py,sha256=LqXPB4qojzz0LqKF14g4pUd0HYBqZiCV83I4UMgy9DY,6450
100
102
  isar/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
101
103
  isar/storage/blob_storage.py,sha256=d44z3XpZDUbiKwN8Av2gytTJxnefMXrp5VhiGm4PWxU,3703
102
104
  isar/storage/local_storage.py,sha256=Rn-iiiz9DI7PzIhevOMshPIaqzJaqBXeVJMQRhVSl2M,2191
103
105
  isar/storage/storage_interface.py,sha256=x-imVeQTdL6dCaTaPTHpXwCR6N4e27WxK_Vpumg0x-Y,1230
104
- isar/storage/uploader.py,sha256=oaGhHqYrtyvJoFUuD7ZyBgdPNkYaSgQokQZkAjmd4vI,10702
106
+ isar/storage/uploader.py,sha256=0BBrxyZGGRkNxGeZeoREucegs4yKUow2523oLEie07o,10841
105
107
  isar/storage/utilities.py,sha256=oLH0Rp7UtrQQdilfITnmXO1Z0ExdeDhBImYHid55vBA,3449
106
- isar-1.33.6.dist-info/licenses/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
108
+ isar-1.33.8.dist-info/licenses/LICENSE,sha256=3fc2-ebLwHWwzfQbulGNRdcNob3SBQeCfEVUDYxsuqw,14058
107
109
  robot_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
110
  robot_interface/robot_interface.py,sha256=A6t19lcNU_6AfkYKY5DaF0sheym_SZEAawbfaj36Kjk,8997
109
111
  robot_interface/test_robot_interface.py,sha256=FV1urn7SbsMyWBIcTKjsBwAG4IsXeZ6pLHE0mA9EGGs,692
@@ -115,7 +117,7 @@ robot_interface/models/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
115
117
  robot_interface/models/inspection/inspection.py,sha256=cjAvekL8r82s7bgukWeXpYylHvJG_oRSCJNISPVCvZg,2238
116
118
  robot_interface/models/mission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
119
  robot_interface/models/mission/mission.py,sha256=MQ9p5cuclLXexaZu9bkDh5-aN99eunvYC0vP-Z_kUwI,960
118
- robot_interface/models/mission/status.py,sha256=sCYeqIFgCSCBy8UocUWup3U6g45G0af5mdeST-G7Zfc,922
120
+ robot_interface/models/mission/status.py,sha256=3KHA02Jer-HSOwFmUhRkE6cr81H1zPgbwB3p4IjchEY,702
119
121
  robot_interface/models/mission/task.py,sha256=YzaqJ_KIIm-3S2Y2-BG4Pdkc8sjFMzMx5jj8FtXSmFg,4744
120
122
  robot_interface/models/robots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
121
123
  robot_interface/models/robots/battery_state.py,sha256=ktOtJ8ltdK0k_i7BoqYfhc5dbOzIG6Oo-uWC67fCWio,98
@@ -123,12 +125,12 @@ robot_interface/models/robots/media.py,sha256=8A-CuuubfngzPprs6zWB9hSaqe3jzgsE8r
123
125
  robot_interface/models/robots/robot_model.py,sha256=-0jNKWPcEgtF_2klb1It3u0SCoAR0hSW9nce58Zq0Co,417
124
126
  robot_interface/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
127
  robot_interface/telemetry/mqtt_client.py,sha256=0P1S9mWdJcByGoSOwwn2NPQr9I-OX4b1VPbrIYOU-Zo,4334
126
- robot_interface/telemetry/payloads.py,sha256=RfLlm_te-bV_xcLtbBx27bgE8gkwPAhWBTF9JrxY7f8,3209
128
+ robot_interface/telemetry/payloads.py,sha256=A0SWiG609k6o6-Y3vhDWE6an2-_m7D_ND85ohfW4qWs,3236
127
129
  robot_interface/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
130
  robot_interface/utilities/json_service.py,sha256=9N1zijW7K4d3WFR2autpaS8U9o1ibymiOX-6stTKCyk,1243
129
131
  robot_interface/utilities/uuid_string_factory.py,sha256=_NQIbBQ56w0qqO0MUDP6aPpHbxW7ATRhK8HnQiBSLkc,76
130
- isar-1.33.6.dist-info/METADATA,sha256=vYkbIytrQRoVeNmSZw0byZnvMgocqVQ2ttxSQ9xS-2g,31190
131
- isar-1.33.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
132
- isar-1.33.6.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
133
- isar-1.33.6.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
134
- isar-1.33.6.dist-info/RECORD,,
132
+ isar-1.33.8.dist-info/METADATA,sha256=0a9aP_euTxYn_zJaBBvt1LXK8w92gQU2GOLmDr0PJ-Y,31190
133
+ isar-1.33.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
134
+ isar-1.33.8.dist-info/entry_points.txt,sha256=TFam7uNNw7J0iiDYzsH2gfG0u1eV1wh3JTw_HkhgKLk,49
135
+ isar-1.33.8.dist-info/top_level.txt,sha256=UwIML2RtuQKCyJJkatcSnyp6-ldDjboB9k9JgKipO-U,21
136
+ isar-1.33.8.dist-info/RECORD,,
@@ -23,14 +23,8 @@ class TaskStatus(str, Enum):
23
23
 
24
24
  class RobotStatus(Enum):
25
25
  Available = "available"
26
- ReturnHomePaused = "returnhomepaused"
27
26
  Paused = "paused"
28
27
  Busy = "busy"
29
28
  Home = "home"
30
29
  Offline = "offline"
31
30
  BlockedProtectiveStop = "blockedprotectivestop"
32
- ReturningHome = "returninghome"
33
- InterventionNeeded = "interventionneeded"
34
- Recharging = "recharging"
35
- Lockdown = "lockdown"
36
- GoingToLockdown = "goingtolockdown"
@@ -4,9 +4,10 @@ from typing import List, Optional
4
4
 
5
5
  from alitra import Pose
6
6
 
7
+ from isar.models.status import IsarStatus
7
8
  from isar.storage.storage_interface import BlobStoragePath
8
9
  from robot_interface.models.exceptions.robot_exceptions import ErrorReason
9
- from robot_interface.models.mission.status import MissionStatus, RobotStatus, TaskStatus
10
+ from robot_interface.models.mission.status import MissionStatus, TaskStatus
10
11
  from robot_interface.models.mission.task import TaskTypes
11
12
  from robot_interface.models.robots.battery_state import BatteryState
12
13
 
@@ -53,10 +54,10 @@ class DocumentInfo:
53
54
 
54
55
 
55
56
  @dataclass
56
- class RobotStatusPayload:
57
+ class IsarStatusPayload:
57
58
  isar_id: str
58
59
  robot_name: str
59
- status: RobotStatus
60
+ status: IsarStatus
60
61
  timestamp: datetime
61
62
 
62
63
 
File without changes