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

Files changed (35) hide show
  1. isar/apis/models/models.py +6 -0
  2. isar/apis/schedule/scheduling_controller.py +21 -52
  3. isar/config/open_telemetry.py +52 -12
  4. isar/config/settings.py +17 -3
  5. isar/eventhandlers/eventhandler.py +22 -0
  6. isar/models/events.py +56 -27
  7. isar/robot/robot_status.py +3 -0
  8. isar/services/utilities/scheduling_utilities.py +52 -21
  9. isar/state_machine/state_machine.py +39 -1
  10. isar/state_machine/states/await_next_mission.py +3 -1
  11. isar/state_machine/states/home.py +3 -1
  12. isar/state_machine/states/monitor.py +22 -0
  13. isar/state_machine/states/recharging.py +44 -0
  14. isar/state_machine/states/returning_home.py +15 -1
  15. isar/state_machine/states/robot_standing_still.py +3 -1
  16. isar/state_machine/states/stopping.py +33 -0
  17. isar/state_machine/states_enum.py +1 -0
  18. isar/state_machine/transitions/functions/pause.py +1 -1
  19. isar/state_machine/transitions/functions/resume.py +1 -1
  20. isar/state_machine/transitions/functions/start_mission.py +11 -3
  21. isar/state_machine/transitions/functions/stop.py +3 -30
  22. isar/state_machine/transitions/mission.py +0 -2
  23. isar/state_machine/transitions/return_home.py +11 -1
  24. isar/state_machine/transitions/robot_status.py +10 -0
  25. isar/state_machine/utils/common_event_handlers.py +16 -4
  26. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/METADATA +1 -1
  27. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/RECORD +35 -34
  28. robot_interface/models/inspection/inspection.py +6 -15
  29. robot_interface/models/mission/status.py +1 -0
  30. robot_interface/robot_interface.py +27 -0
  31. robot_interface/telemetry/payloads.py +10 -0
  32. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/WHEEL +0 -0
  33. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/entry_points.txt +0 -0
  34. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/licenses/LICENSE +0 -0
  35. {isar-1.32.3.dist-info → isar-1.33.1.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,3 @@
1
- from abc import ABC
2
- from dataclasses import dataclass, field
3
1
  from datetime import datetime
4
2
  from typing import Optional, Type
5
3
 
@@ -7,42 +5,35 @@ from alitra import Pose, Position
7
5
  from pydantic import BaseModel, Field
8
6
 
9
7
 
10
- @dataclass
11
- class InspectionMetadata(ABC):
8
+ class InspectionMetadata(BaseModel):
12
9
  start_time: datetime
13
10
  robot_pose: Pose
14
11
  target_position: Position
15
12
  file_type: str
16
- tag_id: Optional[str] = field(default=None, init=False)
17
- inspection_description: Optional[str] = field(default=None, init=False)
13
+ tag_id: Optional[str] = None
14
+ inspection_description: Optional[str] = None
18
15
 
19
16
 
20
- @dataclass
21
17
  class ImageMetadata(InspectionMetadata):
22
18
  pass
23
19
 
24
20
 
25
- @dataclass
26
21
  class ThermalImageMetadata(InspectionMetadata):
27
22
  pass
28
23
 
29
24
 
30
- @dataclass
31
25
  class VideoMetadata(InspectionMetadata):
32
- duration: Optional[float] = field(default=None)
26
+ duration: float
33
27
 
34
28
 
35
- @dataclass
36
29
  class ThermalVideoMetadata(InspectionMetadata):
37
- duration: Optional[float] = field(default=None)
30
+ duration: float
38
31
 
39
32
 
40
- @dataclass
41
33
  class AudioMetadata(InspectionMetadata):
42
- duration: Optional[float] = field(default=None)
34
+ duration: float
43
35
 
44
36
 
45
- @dataclass
46
37
  class GasMeasurementMetadata(InspectionMetadata):
47
38
  pass
48
39
 
@@ -30,3 +30,4 @@ class RobotStatus(Enum):
30
30
  BlockedProtectiveStop = "blockedprotectivestop"
31
31
  ReturningHome = "returninghome"
32
32
  InterventionNeeded = "interventionneeded"
33
+ Recharging = "recharging"
@@ -244,3 +244,30 @@ class RobotInterface(metaclass=ABCMeta):
244
244
 
245
245
  """
246
246
  raise NotImplementedError
247
+
248
+ @abstractmethod
249
+ def get_battery_level(self) -> float:
250
+ """
251
+ Method which returns the percent charge remaining in the robot battery.
252
+
253
+ Returns
254
+ -------
255
+ float
256
+ The battery percentage on the robot
257
+
258
+ Raises
259
+ -------
260
+ RobotCommunicationException
261
+ Raised if the robot package is unable to communicate with the robot API.
262
+ The fetching of robot battery level will be attempted again until success
263
+ RobotAPIException
264
+ Raised if the robot package is able to communicate with the API but an error
265
+ occurred while interpreting the response. The fetching of robot battery level
266
+ will be attempted again until success
267
+ RobotException
268
+ Catches other RobotExceptions that may have occurred while retrieving the
269
+ robot battery level. The fetching of robot battery level will
270
+ be attempted again until success
271
+
272
+ """
273
+ raise NotImplementedError
@@ -91,6 +91,16 @@ class MissionPayload:
91
91
  timestamp: datetime
92
92
 
93
93
 
94
+ @dataclass
95
+ class MissionAbortedPayload:
96
+ isar_id: str
97
+ robot_name: str
98
+ mission_id: str
99
+ can_be_continued: bool
100
+ timestamp: datetime
101
+ reason: Optional[str]
102
+
103
+
94
104
  @dataclass
95
105
  class TaskPayload:
96
106
  isar_id: str
File without changes