standardbots 2.20241003.30__py3-none-any.whl → 2.20241003.32__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 standardbots might be problematic. Click here for more details.
- standardbots/auto_generated/apis.py +39 -4
- standardbots/auto_generated/models.py +198 -87
- {standardbots-2.20241003.30.dist-info → standardbots-2.20241003.32.dist-info}/METADATA +1 -1
- standardbots-2.20241003.32.dist-info/RECORD +8 -0
- standardbots-2.20241003.30.dist-info/RECORD +0 -8
- {standardbots-2.20241003.30.dist-info → standardbots-2.20241003.32.dist-info}/WHEEL +0 -0
- {standardbots-2.20241003.30.dist-info → standardbots-2.20241003.32.dist-info}/top_level.txt +0 -0
|
@@ -1002,15 +1002,15 @@ class Recovery:
|
|
|
1002
1002
|
self,
|
|
1003
1003
|
) -> Response[
|
|
1004
1004
|
Union[
|
|
1005
|
-
models.
|
|
1005
|
+
models.FailureStateResponse,
|
|
1006
1006
|
models.ErrorResponse,
|
|
1007
1007
|
models.ErrorResponse,
|
|
1008
1008
|
None
|
|
1009
1009
|
],
|
|
1010
|
-
models.
|
|
1010
|
+
models.FailureStateResponse
|
|
1011
1011
|
]:
|
|
1012
1012
|
"""
|
|
1013
|
-
|
|
1013
|
+
Attempts to recover the robot from a fault state. Inspect the response to determine if additional recovery actions are required.
|
|
1014
1014
|
|
|
1015
1015
|
"""
|
|
1016
1016
|
path = "/api/v1/recovery/recover"
|
|
@@ -1021,7 +1021,7 @@ class Recovery:
|
|
|
1021
1021
|
)
|
|
1022
1022
|
parsed = None
|
|
1023
1023
|
if response.status == 200:
|
|
1024
|
-
parsed = models.
|
|
1024
|
+
parsed = models.parse_failure_state_response(json.loads(response.data))
|
|
1025
1025
|
if response.status == 400:
|
|
1026
1026
|
parsed = models.parse_error_response(json.loads(response.data))
|
|
1027
1027
|
|
|
@@ -1036,6 +1036,41 @@ class Recovery:
|
|
|
1036
1036
|
response
|
|
1037
1037
|
)
|
|
1038
1038
|
|
|
1039
|
+
def get_status(
|
|
1040
|
+
self,
|
|
1041
|
+
) -> Response[
|
|
1042
|
+
Union[
|
|
1043
|
+
models.FailureStateResponse,
|
|
1044
|
+
models.ErrorResponse,
|
|
1045
|
+
None
|
|
1046
|
+
],
|
|
1047
|
+
models.FailureStateResponse
|
|
1048
|
+
]:
|
|
1049
|
+
"""
|
|
1050
|
+
Get the robot's recovery status.
|
|
1051
|
+
|
|
1052
|
+
"""
|
|
1053
|
+
path = "/api/v1/recovery/status"
|
|
1054
|
+
response = self._request_manager.request(
|
|
1055
|
+
"GET",
|
|
1056
|
+
path,
|
|
1057
|
+
headers=self._request_manager.json_headers(),
|
|
1058
|
+
)
|
|
1059
|
+
parsed = None
|
|
1060
|
+
if response.status == 200:
|
|
1061
|
+
parsed = models.parse_failure_state_response(json.loads(response.data))
|
|
1062
|
+
|
|
1063
|
+
is_user_error = response.status >= 400 and response.status < 500
|
|
1064
|
+
is_unavailable = response.status == 503
|
|
1065
|
+
if parsed is None and (is_user_error or is_unavailable):
|
|
1066
|
+
parsed = models.parse_error_response(json.loads(response.data))
|
|
1067
|
+
|
|
1068
|
+
return Response(
|
|
1069
|
+
parsed,
|
|
1070
|
+
response.status,
|
|
1071
|
+
response
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1039
1074
|
recover: Recover
|
|
1040
1075
|
|
|
1041
1076
|
def __init__(self, request_manager: RequestManager):
|
|
@@ -1419,69 +1419,23 @@ def serialize_quaternion(data: Quaternion) -> object:
|
|
|
1419
1419
|
"w": None if data.w is None else serialize_f_64(data.w),
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
|
-
class
|
|
1423
|
-
|
|
1424
|
-
"""Enum
|
|
1425
|
-
|
|
1426
|
-
"""Enum
|
|
1427
|
-
|
|
1428
|
-
"""Enum
|
|
1429
|
-
|
|
1430
|
-
"""Enum
|
|
1431
|
-
|
|
1432
|
-
"""Enum
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
GripperFailure = "GripperFailure"
|
|
1440
|
-
"""Enum GripperFailure = `GripperFailure`"""
|
|
1441
|
-
OutOfJointLimitsFailure = "OutOfJointLimitsFailure"
|
|
1442
|
-
"""Enum OutOfJointLimitsFailure = `OutOfJointLimitsFailure`"""
|
|
1443
|
-
CollisionFailure = "CollisionFailure"
|
|
1444
|
-
"""Enum CollisionFailure = `CollisionFailure`"""
|
|
1445
|
-
TorqueCollisionFailure = "TorqueCollisionFailure"
|
|
1446
|
-
"""Enum TorqueCollisionFailure = `TorqueCollisionFailure`"""
|
|
1447
|
-
InBoxingPositionFailure = "InBoxingPositionFailure"
|
|
1448
|
-
"""Enum InBoxingPositionFailure = `InBoxingPositionFailure`"""
|
|
1449
|
-
PowerBoardCheckFailure = "PowerBoardCheckFailure"
|
|
1450
|
-
"""Enum PowerBoardCheckFailure = `PowerBoardCheckFailure`"""
|
|
1451
|
-
MotionPlannerFailure = "MotionPlannerFailure"
|
|
1452
|
-
"""Enum MotionPlannerFailure = `MotionPlannerFailure`"""
|
|
1453
|
-
MotionPlannerFailureStartPositionCollision = "MotionPlannerFailureStartPositionCollision"
|
|
1454
|
-
"""Enum MotionPlannerFailureStartPositionCollision = `MotionPlannerFailureStartPositionCollision`"""
|
|
1455
|
-
IOFailure = "IOFailure"
|
|
1456
|
-
"""Enum IOFailure = `IOFailure`"""
|
|
1457
|
-
InvalidRoutineLoadedFailure = "InvalidRoutineLoadedFailure"
|
|
1458
|
-
"""Enum InvalidRoutineLoadedFailure = `InvalidRoutineLoadedFailure`"""
|
|
1459
|
-
InferenceFailure = "InferenceFailure"
|
|
1460
|
-
"""Enum InferenceFailure = `InferenceFailure`"""
|
|
1461
|
-
CameraFailure = "CameraFailure"
|
|
1462
|
-
"""Enum CameraFailure = `CameraFailure`"""
|
|
1463
|
-
HaasFailure = "HaasFailure"
|
|
1464
|
-
"""Enum HaasFailure = `HaasFailure`"""
|
|
1465
|
-
BotmanHeartbeatLost = "BotmanHeartbeatLost"
|
|
1466
|
-
"""Enum BotmanHeartbeatLost = `BotmanHeartbeatLost`"""
|
|
1467
|
-
InternalFailure = "InternalFailure"
|
|
1468
|
-
"""Enum InternalFailure = `InternalFailure`"""
|
|
1469
|
-
TorqueLimitExceeded = "TorqueLimitExceeded"
|
|
1470
|
-
"""Enum TorqueLimitExceeded = `TorqueLimitExceeded`"""
|
|
1471
|
-
StepPlayFailure = "StepPlayFailure"
|
|
1472
|
-
"""Enum StepPlayFailure = `StepPlayFailure`"""
|
|
1473
|
-
UnbrakeFailure = "UnbrakeFailure"
|
|
1474
|
-
"""Enum UnbrakeFailure = `UnbrakeFailure`"""
|
|
1475
|
-
WeldFailure = "WeldFailure"
|
|
1476
|
-
"""Enum WeldFailure = `WeldFailure`"""
|
|
1477
|
-
TriggerFaultFailure = "TriggerFaultFailure"
|
|
1478
|
-
"""Enum TriggerFaultFailure = `TriggerFaultFailure`"""
|
|
1479
|
-
|
|
1480
|
-
def parse_recovery_state_enum(data: object) -> RecoveryStateEnum:
|
|
1481
|
-
return RecoveryStateEnum(data)
|
|
1482
|
-
|
|
1483
|
-
def serialize_recovery_state_enum(data: Union[RecoveryStateEnum, str]) -> object:
|
|
1484
|
-
return RecoveryStateEnum(data).value
|
|
1422
|
+
class RecoveryTypeEnum(Enum):
|
|
1423
|
+
Recoverable = "Recoverable"
|
|
1424
|
+
"""Enum Recoverable = `Recoverable`"""
|
|
1425
|
+
NotRecoverable = "NotRecoverable"
|
|
1426
|
+
"""Enum NotRecoverable = `NotRecoverable`"""
|
|
1427
|
+
Restart = "Restart"
|
|
1428
|
+
"""Enum Restart = `Restart`"""
|
|
1429
|
+
GuidedMode = "GuidedMode"
|
|
1430
|
+
"""Enum GuidedMode = `GuidedMode`"""
|
|
1431
|
+
ManualRecoveryMode = "ManualRecoveryMode"
|
|
1432
|
+
"""Enum ManualRecoveryMode = `ManualRecoveryMode`"""
|
|
1433
|
+
|
|
1434
|
+
def parse_recovery_type_enum(data: object) -> RecoveryTypeEnum:
|
|
1435
|
+
return RecoveryTypeEnum(data)
|
|
1436
|
+
|
|
1437
|
+
def serialize_recovery_type_enum(data: Union[RecoveryTypeEnum, str]) -> object:
|
|
1438
|
+
return RecoveryTypeEnum(data).value
|
|
1485
1439
|
|
|
1486
1440
|
class RobotControlModeEnum(Enum):
|
|
1487
1441
|
Api = "api"
|
|
@@ -1495,6 +1449,28 @@ def parse_robot_control_mode_enum(data: object) -> RobotControlModeEnum:
|
|
|
1495
1449
|
def serialize_robot_control_mode_enum(data: Union[RobotControlModeEnum, str]) -> object:
|
|
1496
1450
|
return RobotControlModeEnum(data).value
|
|
1497
1451
|
|
|
1452
|
+
class RobotStatusEnum(Enum):
|
|
1453
|
+
Idle = "Idle"
|
|
1454
|
+
"""Enum Idle = `Idle`"""
|
|
1455
|
+
RunningAdHocCommand = "RunningAdHocCommand"
|
|
1456
|
+
"""Enum RunningAdHocCommand = `RunningAdHocCommand`"""
|
|
1457
|
+
RoutineRunning = "RoutineRunning"
|
|
1458
|
+
"""Enum RoutineRunning = `RoutineRunning`"""
|
|
1459
|
+
Antigravity = "Antigravity"
|
|
1460
|
+
"""Enum Antigravity = `Antigravity`"""
|
|
1461
|
+
AntigravitySlow = "AntigravitySlow"
|
|
1462
|
+
"""Enum AntigravitySlow = `AntigravitySlow`"""
|
|
1463
|
+
Failure = "Failure"
|
|
1464
|
+
"""Enum Failure = `Failure`"""
|
|
1465
|
+
Recovering = "Recovering"
|
|
1466
|
+
"""Enum Recovering = `Recovering`"""
|
|
1467
|
+
|
|
1468
|
+
def parse_robot_status_enum(data: object) -> RobotStatusEnum:
|
|
1469
|
+
return RobotStatusEnum(data)
|
|
1470
|
+
|
|
1471
|
+
def serialize_robot_status_enum(data: Union[RobotStatusEnum, str]) -> object:
|
|
1472
|
+
return RobotStatusEnum(data).value
|
|
1473
|
+
|
|
1498
1474
|
class ROSControlStateEnum(Enum):
|
|
1499
1475
|
Enabled = "enabled"
|
|
1500
1476
|
"""ROS control is enabled."""
|
|
@@ -2261,7 +2237,7 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
2261
2237
|
max_width_outer: Union[float, None] = None
|
|
2262
2238
|
force: Union[float, None] = None
|
|
2263
2239
|
max_force: Union[float, None] = None
|
|
2264
|
-
finger_mounting_position: Union[
|
|
2240
|
+
finger_mounting_position: Union[str, None] = None
|
|
2265
2241
|
finger_offset: Union[float, None] = None
|
|
2266
2242
|
finger_angle: Union[float, None] = None
|
|
2267
2243
|
finger_length: Union[float, None] = None
|
|
@@ -2377,12 +2353,12 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
2377
2353
|
|
|
2378
2354
|
return [True, ""]
|
|
2379
2355
|
|
|
2380
|
-
def validate_finger_mounting_position(self, value:
|
|
2356
|
+
def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
|
|
2381
2357
|
if value is None:
|
|
2382
2358
|
return [True, ""]
|
|
2383
2359
|
|
|
2384
|
-
if not isinstance(value,
|
|
2385
|
-
return [False, "finger_mounting_position must be of type
|
|
2360
|
+
if not isinstance(value, str):
|
|
2361
|
+
return [False, "finger_mounting_position must be of type str for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
|
|
2386
2362
|
|
|
2387
2363
|
return [True, ""]
|
|
2388
2364
|
|
|
@@ -2514,7 +2490,7 @@ def parse_on_robot_2_fg_14_gripper_configuration(data: object):
|
|
|
2514
2490
|
max_width_outer=parse_f_64(data["max_width_outer"]) if "max_width_outer" in data else None,
|
|
2515
2491
|
force=parse_f_64(data["force"]) if "force" in data else None,
|
|
2516
2492
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data else None,
|
|
2517
|
-
finger_mounting_position=
|
|
2493
|
+
finger_mounting_position=parse_str(data["finger_mounting_position"]) if "finger_mounting_position" in data else None,
|
|
2518
2494
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data else None,
|
|
2519
2495
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data else None,
|
|
2520
2496
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data else None,
|
|
@@ -2537,7 +2513,7 @@ def serialize_on_robot_2_fg_14_gripper_configuration(data: OnRobot2FG14GripperCo
|
|
|
2537
2513
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
2538
2514
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
2539
2515
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
2540
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
2516
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
|
|
2541
2517
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
2542
2518
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
2543
2519
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -2561,7 +2537,7 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
2561
2537
|
max_width_outer: Union[float, None] = None
|
|
2562
2538
|
force: Union[float, None] = None
|
|
2563
2539
|
max_force: Union[float, None] = None
|
|
2564
|
-
finger_mounting_position: Union[
|
|
2540
|
+
finger_mounting_position: Union[str, None] = None
|
|
2565
2541
|
finger_offset: Union[float, None] = None
|
|
2566
2542
|
finger_angle: Union[float, None] = None
|
|
2567
2543
|
finger_length: Union[float, None] = None
|
|
@@ -2677,12 +2653,12 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
2677
2653
|
|
|
2678
2654
|
return [True, ""]
|
|
2679
2655
|
|
|
2680
|
-
def validate_finger_mounting_position(self, value:
|
|
2656
|
+
def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
|
|
2681
2657
|
if value is None:
|
|
2682
2658
|
return [True, ""]
|
|
2683
2659
|
|
|
2684
|
-
if not isinstance(value,
|
|
2685
|
-
return [False, "finger_mounting_position must be of type
|
|
2660
|
+
if not isinstance(value, str):
|
|
2661
|
+
return [False, "finger_mounting_position must be of type str for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
|
|
2686
2662
|
|
|
2687
2663
|
return [True, ""]
|
|
2688
2664
|
|
|
@@ -2814,7 +2790,7 @@ def parse_on_robot_2_fg_7_gripper_configuration(data: object):
|
|
|
2814
2790
|
max_width_outer=parse_f_64(data["max_width_outer"]) if "max_width_outer" in data else None,
|
|
2815
2791
|
force=parse_f_64(data["force"]) if "force" in data else None,
|
|
2816
2792
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data else None,
|
|
2817
|
-
finger_mounting_position=
|
|
2793
|
+
finger_mounting_position=parse_str(data["finger_mounting_position"]) if "finger_mounting_position" in data else None,
|
|
2818
2794
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data else None,
|
|
2819
2795
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data else None,
|
|
2820
2796
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data else None,
|
|
@@ -2837,7 +2813,7 @@ def serialize_on_robot_2_fg_7_gripper_configuration(data: OnRobot2FG7GripperConf
|
|
|
2837
2813
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
2838
2814
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
2839
2815
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
2840
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
2816
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
|
|
2841
2817
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
2842
2818
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
2843
2819
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -3095,33 +3071,108 @@ def serialize_orientation(data: Orientation) -> object:
|
|
|
3095
3071
|
}
|
|
3096
3072
|
|
|
3097
3073
|
@dataclass
|
|
3098
|
-
class
|
|
3099
|
-
"""
|
|
3100
|
-
|
|
3074
|
+
class FailureStateDetails:
|
|
3075
|
+
"""Failure state details."""
|
|
3076
|
+
failure_trace_id: Union[str, None] = None
|
|
3077
|
+
kind: Union[str, None] = None
|
|
3078
|
+
failed_step: Union[str, None] = None
|
|
3079
|
+
reason: Union[str, None] = None
|
|
3080
|
+
recovery_type: Union[RecoveryTypeEnum, None] = None
|
|
3081
|
+
is_recoverable_with_wrist_button: Union[bool, None] = None
|
|
3101
3082
|
|
|
3102
|
-
def
|
|
3083
|
+
def validate_failure_trace_id(self, value: str) -> Tuple[bool, str]:
|
|
3103
3084
|
if value is None:
|
|
3104
3085
|
return [True, ""]
|
|
3105
3086
|
|
|
3106
|
-
if not
|
|
3107
|
-
return [False, "
|
|
3087
|
+
if not isinstance(value, str):
|
|
3088
|
+
return [False, "failure_trace_id must be of type str for FailureStateDetails, got " + type(value).__name__]
|
|
3089
|
+
|
|
3090
|
+
return [True, ""]
|
|
3091
|
+
|
|
3092
|
+
def validate_kind(self, value: str) -> Tuple[bool, str]:
|
|
3093
|
+
if value is None:
|
|
3094
|
+
return [True, ""]
|
|
3095
|
+
|
|
3096
|
+
if not isinstance(value, str):
|
|
3097
|
+
return [False, "kind must be of type str for FailureStateDetails, got " + type(value).__name__]
|
|
3098
|
+
|
|
3099
|
+
return [True, ""]
|
|
3100
|
+
|
|
3101
|
+
def validate_failed_step(self, value: str) -> Tuple[bool, str]:
|
|
3102
|
+
if value is None:
|
|
3103
|
+
return [True, ""]
|
|
3104
|
+
|
|
3105
|
+
if not isinstance(value, str):
|
|
3106
|
+
return [False, "failed_step must be of type str for FailureStateDetails, got " + type(value).__name__]
|
|
3107
|
+
|
|
3108
|
+
return [True, ""]
|
|
3109
|
+
|
|
3110
|
+
def validate_reason(self, value: str) -> Tuple[bool, str]:
|
|
3111
|
+
if value is None:
|
|
3112
|
+
return [True, ""]
|
|
3113
|
+
|
|
3114
|
+
if not isinstance(value, str):
|
|
3115
|
+
return [False, "reason must be of type str for FailureStateDetails, got " + type(value).__name__]
|
|
3116
|
+
|
|
3117
|
+
return [True, ""]
|
|
3118
|
+
|
|
3119
|
+
def validate_recovery_type(self, value: RecoveryTypeEnum) -> Tuple[bool, str]:
|
|
3120
|
+
if value is None:
|
|
3121
|
+
return [True, ""]
|
|
3122
|
+
|
|
3123
|
+
if not ((isinstance(value, str) and RecoveryTypeEnum in ['Recoverable', 'NotRecoverable', 'Restart', 'GuidedMode', 'ManualRecoveryMode']) or isinstance(value, RecoveryTypeEnum)):
|
|
3124
|
+
return [False, "recovery_type must be of type RecoveryTypeEnum for FailureStateDetails, got " + type(value).__name__]
|
|
3125
|
+
|
|
3126
|
+
return [True, ""]
|
|
3127
|
+
|
|
3128
|
+
def validate_is_recoverable_with_wrist_button(self, value: bool) -> Tuple[bool, str]:
|
|
3129
|
+
if value is None:
|
|
3130
|
+
return [True, ""]
|
|
3131
|
+
|
|
3132
|
+
if not isinstance(value, bool):
|
|
3133
|
+
return [False, "is_recoverable_with_wrist_button must be of type bool for FailureStateDetails, got " + type(value).__name__]
|
|
3108
3134
|
|
|
3109
3135
|
return [True, ""]
|
|
3110
3136
|
|
|
3111
3137
|
def __post_init__(self):
|
|
3112
3138
|
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
3113
|
-
is_valid, error_str = self.
|
|
3139
|
+
is_valid, error_str = self.validate_failure_trace_id(self.failure_trace_id)
|
|
3140
|
+
if not is_valid:
|
|
3141
|
+
raise TypeError(error_str)
|
|
3142
|
+
is_valid, error_str = self.validate_kind(self.kind)
|
|
3143
|
+
if not is_valid:
|
|
3144
|
+
raise TypeError(error_str)
|
|
3145
|
+
is_valid, error_str = self.validate_failed_step(self.failed_step)
|
|
3146
|
+
if not is_valid:
|
|
3147
|
+
raise TypeError(error_str)
|
|
3148
|
+
is_valid, error_str = self.validate_reason(self.reason)
|
|
3149
|
+
if not is_valid:
|
|
3150
|
+
raise TypeError(error_str)
|
|
3151
|
+
is_valid, error_str = self.validate_recovery_type(self.recovery_type)
|
|
3152
|
+
if not is_valid:
|
|
3153
|
+
raise TypeError(error_str)
|
|
3154
|
+
is_valid, error_str = self.validate_is_recoverable_with_wrist_button(self.is_recoverable_with_wrist_button)
|
|
3114
3155
|
if not is_valid:
|
|
3115
3156
|
raise TypeError(error_str)
|
|
3116
3157
|
|
|
3117
|
-
def
|
|
3118
|
-
return
|
|
3119
|
-
|
|
3158
|
+
def parse_failure_state_details(data: object):
|
|
3159
|
+
return FailureStateDetails(
|
|
3160
|
+
failure_trace_id=parse_str(data["failure_trace_id"]) if "failure_trace_id" in data else None,
|
|
3161
|
+
kind=parse_str(data["kind"]) if "kind" in data else None,
|
|
3162
|
+
failed_step=parse_str(data["failed_step"]) if "failed_step" in data else None,
|
|
3163
|
+
reason=parse_str(data["reason"]) if "reason" in data else None,
|
|
3164
|
+
recovery_type=parse_recovery_type_enum(data["recovery_type"]) if "recovery_type" in data else None,
|
|
3165
|
+
is_recoverable_with_wrist_button=parse_bool(data["is_recoverable_with_wrist_button"]) if "is_recoverable_with_wrist_button" in data else None,
|
|
3120
3166
|
)
|
|
3121
3167
|
|
|
3122
|
-
def
|
|
3168
|
+
def serialize_failure_state_details(data: FailureStateDetails) -> object:
|
|
3123
3169
|
return {
|
|
3124
|
-
"
|
|
3170
|
+
"failure_trace_id": None if data.failure_trace_id is None else serialize_str(data.failure_trace_id),
|
|
3171
|
+
"kind": None if data.kind is None else serialize_str(data.kind),
|
|
3172
|
+
"failed_step": None if data.failed_step is None else serialize_str(data.failed_step),
|
|
3173
|
+
"reason": None if data.reason is None else serialize_str(data.reason),
|
|
3174
|
+
"recovery_type": None if data.recovery_type is None else serialize_recovery_type_enum(data.recovery_type),
|
|
3175
|
+
"is_recoverable_with_wrist_button": None if data.is_recoverable_with_wrist_button is None else serialize_bool(data.is_recoverable_with_wrist_button),
|
|
3125
3176
|
}
|
|
3126
3177
|
|
|
3127
3178
|
@dataclass
|
|
@@ -4067,6 +4118,66 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
|
|
|
4067
4118
|
"orientation": serialize_orientation(data.orientation),
|
|
4068
4119
|
}
|
|
4069
4120
|
|
|
4121
|
+
@dataclass
|
|
4122
|
+
class FailureStateResponse:
|
|
4123
|
+
"""Failure state response informs user of how and whether the robot may be recovered."""
|
|
4124
|
+
status: Union[RobotStatusEnum, None] = None
|
|
4125
|
+
failed: Union[bool, None] = None
|
|
4126
|
+
failure: Union[FailureStateDetails, None] = None
|
|
4127
|
+
|
|
4128
|
+
def validate_status(self, value: RobotStatusEnum) -> Tuple[bool, str]:
|
|
4129
|
+
if value is None:
|
|
4130
|
+
return [True, ""]
|
|
4131
|
+
|
|
4132
|
+
if not ((isinstance(value, str) and RobotStatusEnum in ['Idle', 'RunningAdHocCommand', 'RoutineRunning', 'Antigravity', 'AntigravitySlow', 'Failure', 'Recovering']) or isinstance(value, RobotStatusEnum)):
|
|
4133
|
+
return [False, "status must be of type RobotStatusEnum for FailureStateResponse, got " + type(value).__name__]
|
|
4134
|
+
|
|
4135
|
+
return [True, ""]
|
|
4136
|
+
|
|
4137
|
+
def validate_failed(self, value: bool) -> Tuple[bool, str]:
|
|
4138
|
+
if value is None:
|
|
4139
|
+
return [True, ""]
|
|
4140
|
+
|
|
4141
|
+
if not isinstance(value, bool):
|
|
4142
|
+
return [False, "failed must be of type bool for FailureStateResponse, got " + type(value).__name__]
|
|
4143
|
+
|
|
4144
|
+
return [True, ""]
|
|
4145
|
+
|
|
4146
|
+
def validate_failure(self, value: FailureStateDetails) -> Tuple[bool, str]:
|
|
4147
|
+
if value is None:
|
|
4148
|
+
return [True, ""]
|
|
4149
|
+
|
|
4150
|
+
if not isinstance(value, FailureStateDetails):
|
|
4151
|
+
return [False, "failure must be of type FailureStateDetails for FailureStateResponse, got " + type(value).__name__]
|
|
4152
|
+
|
|
4153
|
+
return [True, ""]
|
|
4154
|
+
|
|
4155
|
+
def __post_init__(self):
|
|
4156
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
4157
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
4158
|
+
if not is_valid:
|
|
4159
|
+
raise TypeError(error_str)
|
|
4160
|
+
is_valid, error_str = self.validate_failed(self.failed)
|
|
4161
|
+
if not is_valid:
|
|
4162
|
+
raise TypeError(error_str)
|
|
4163
|
+
is_valid, error_str = self.validate_failure(self.failure)
|
|
4164
|
+
if not is_valid:
|
|
4165
|
+
raise TypeError(error_str)
|
|
4166
|
+
|
|
4167
|
+
def parse_failure_state_response(data: object):
|
|
4168
|
+
return FailureStateResponse(
|
|
4169
|
+
status=parse_robot_status_enum(data["status"]) if "status" in data else None,
|
|
4170
|
+
failed=parse_bool(data["failed"]) if "failed" in data else None,
|
|
4171
|
+
failure=parse_failure_state_details(data["failure"]) if "failure" in data else None,
|
|
4172
|
+
)
|
|
4173
|
+
|
|
4174
|
+
def serialize_failure_state_response(data: FailureStateResponse) -> object:
|
|
4175
|
+
return {
|
|
4176
|
+
"status": None if data.status is None else serialize_robot_status_enum(data.status),
|
|
4177
|
+
"failed": None if data.failed is None else serialize_bool(data.failed),
|
|
4178
|
+
"failure": None if data.failure is None else serialize_failure_state_details(data.failure),
|
|
4179
|
+
}
|
|
4180
|
+
|
|
4070
4181
|
@dataclass
|
|
4071
4182
|
class ArmPositionUpdateRequestResponseFormat:
|
|
4072
4183
|
"""Specify how the response should be sent
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
standardbots/__init__.py,sha256=PT6Z2HPama2fb6SaNhF3J1skpYABQWGgDzKEtQY6BDM,29
|
|
2
|
+
standardbots/auto_generated/__init__.py,sha256=PZtDUzYcjIO6R-gE-0NzY0vFXk1Je1tJ3je0ivV5o-k,98
|
|
3
|
+
standardbots/auto_generated/apis.py,sha256=6GKDzPEQxlZq9Fd6FZ9AtLxCtUjz2YvlRJubhHoqtN0,44252
|
|
4
|
+
standardbots/auto_generated/models.py,sha256=8iCxLKk9yMTpDAK3iGb_Cm4dSC9Zgi5QGG06RhrUHcM,187495
|
|
5
|
+
standardbots-2.20241003.32.dist-info/METADATA,sha256=4wJg7nnIjwlqRNcA8klf7ou_-K41Yi4gN2FEpxe--yE,410
|
|
6
|
+
standardbots-2.20241003.32.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
+
standardbots-2.20241003.32.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
+
standardbots-2.20241003.32.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
standardbots/__init__.py,sha256=PT6Z2HPama2fb6SaNhF3J1skpYABQWGgDzKEtQY6BDM,29
|
|
2
|
-
standardbots/auto_generated/__init__.py,sha256=PZtDUzYcjIO6R-gE-0NzY0vFXk1Je1tJ3je0ivV5o-k,98
|
|
3
|
-
standardbots/auto_generated/apis.py,sha256=X3s53ToX5JQTTcEvdlXX9HUGs5zSB6awlcQnSRRgZI0,43254
|
|
4
|
-
standardbots/auto_generated/models.py,sha256=HZewZAGX_n3N3huuUFhVgmje84aCXayv9KjHQzb-8GM,183749
|
|
5
|
-
standardbots-2.20241003.30.dist-info/METADATA,sha256=bYfK28TrdtE8wFNVqikdsKcExStMmulYCNqO_AfwxfU,410
|
|
6
|
-
standardbots-2.20241003.30.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
standardbots-2.20241003.30.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
-
standardbots-2.20241003.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|