standardbots 2.0.0.dev1734558734__py3-none-any.whl → 2.0.0.dev1736521253__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 +113 -63
- standardbots/auto_generated/models.py +124 -106
- {standardbots-2.0.0.dev1734558734.dist-info → standardbots-2.0.0.dev1736521253.dist-info}/METADATA +9 -2
- standardbots-2.0.0.dev1736521253.dist-info/RECORD +8 -0
- {standardbots-2.0.0.dev1734558734.dist-info → standardbots-2.0.0.dev1736521253.dist-info}/WHEEL +1 -1
- standardbots-2.0.0.dev1734558734.dist-info/RECORD +0 -8
- {standardbots-2.0.0.dev1734558734.dist-info → standardbots-2.0.0.dev1736521253.dist-info}/top_level.txt +0 -0
|
@@ -932,6 +932,113 @@ class Faults:
|
|
|
932
932
|
self._request_manager = request_manager
|
|
933
933
|
self.user_faults = Faults.UserFaults(request_manager)
|
|
934
934
|
|
|
935
|
+
class General:
|
|
936
|
+
_request_manager: RequestManager
|
|
937
|
+
class BotIdentity:
|
|
938
|
+
def __init__(self, request_manager: RequestManager):
|
|
939
|
+
self._request_manager = request_manager
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
def bot_identity(
|
|
943
|
+
self,
|
|
944
|
+
) -> Response[
|
|
945
|
+
Union[
|
|
946
|
+
models.BotIdentityData,
|
|
947
|
+
models.ErrorResponse,
|
|
948
|
+
None
|
|
949
|
+
],
|
|
950
|
+
models.BotIdentityData
|
|
951
|
+
]:
|
|
952
|
+
"""
|
|
953
|
+
Get information about the robot's identity.
|
|
954
|
+
"""
|
|
955
|
+
path = "/api/v1/identity/bot_identity"
|
|
956
|
+
try:
|
|
957
|
+
response = self._request_manager.request(
|
|
958
|
+
"GET",
|
|
959
|
+
path,
|
|
960
|
+
headers=self._request_manager.json_headers(),
|
|
961
|
+
)
|
|
962
|
+
parsed = None
|
|
963
|
+
if response.status == 200:
|
|
964
|
+
parsed = models.parse_bot_identity_data(json.loads(response.data))
|
|
965
|
+
|
|
966
|
+
is_user_error = response.status >= 400 and response.status <= 500
|
|
967
|
+
is_unavailable = response.status == 503
|
|
968
|
+
if parsed is None and (is_user_error or is_unavailable):
|
|
969
|
+
parsed = models.parse_error_response(json.loads(response.data))
|
|
970
|
+
|
|
971
|
+
return Response(
|
|
972
|
+
parsed,
|
|
973
|
+
response.status,
|
|
974
|
+
response
|
|
975
|
+
)
|
|
976
|
+
except urllib3.exceptions.MaxRetryError:
|
|
977
|
+
return Response(
|
|
978
|
+
models.ErrorResponse(
|
|
979
|
+
error=models.ErrorEnum.InternalServerError,
|
|
980
|
+
message="Connection Refused"
|
|
981
|
+
),
|
|
982
|
+
503,
|
|
983
|
+
None
|
|
984
|
+
)
|
|
985
|
+
class Joints:
|
|
986
|
+
def __init__(self, request_manager: RequestManager):
|
|
987
|
+
self._request_manager = request_manager
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
def get_joints_state(
|
|
991
|
+
self,
|
|
992
|
+
) -> Response[
|
|
993
|
+
Union[
|
|
994
|
+
models.JointsStateResponse,
|
|
995
|
+
models.ErrorResponse,
|
|
996
|
+
None
|
|
997
|
+
],
|
|
998
|
+
models.JointsStateResponse
|
|
999
|
+
]:
|
|
1000
|
+
"""
|
|
1001
|
+
Retrieves information about the state of each joint
|
|
1002
|
+
"""
|
|
1003
|
+
path = "/api/v1/joints"
|
|
1004
|
+
try:
|
|
1005
|
+
response = self._request_manager.request(
|
|
1006
|
+
"GET",
|
|
1007
|
+
path,
|
|
1008
|
+
headers=self._request_manager.json_headers(),
|
|
1009
|
+
)
|
|
1010
|
+
parsed = None
|
|
1011
|
+
if response.status == 200:
|
|
1012
|
+
parsed = models.parse_joints_state_response(json.loads(response.data))
|
|
1013
|
+
|
|
1014
|
+
is_user_error = response.status >= 400 and response.status <= 500
|
|
1015
|
+
is_unavailable = response.status == 503
|
|
1016
|
+
if parsed is None and (is_user_error or is_unavailable):
|
|
1017
|
+
parsed = models.parse_error_response(json.loads(response.data))
|
|
1018
|
+
|
|
1019
|
+
return Response(
|
|
1020
|
+
parsed,
|
|
1021
|
+
response.status,
|
|
1022
|
+
response
|
|
1023
|
+
)
|
|
1024
|
+
except urllib3.exceptions.MaxRetryError:
|
|
1025
|
+
return Response(
|
|
1026
|
+
models.ErrorResponse(
|
|
1027
|
+
error=models.ErrorEnum.InternalServerError,
|
|
1028
|
+
message="Connection Refused"
|
|
1029
|
+
),
|
|
1030
|
+
503,
|
|
1031
|
+
None
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
bot_identity: BotIdentity
|
|
1035
|
+
joints: Joints
|
|
1036
|
+
|
|
1037
|
+
def __init__(self, request_manager: RequestManager):
|
|
1038
|
+
self._request_manager = request_manager
|
|
1039
|
+
self.bot_identity = General.BotIdentity(request_manager)
|
|
1040
|
+
self.joints = General.Joints(request_manager)
|
|
1041
|
+
|
|
935
1042
|
class ChatGPT:
|
|
936
1043
|
_request_manager: RequestManager
|
|
937
1044
|
class Data:
|
|
@@ -1136,63 +1243,6 @@ class IO:
|
|
|
1136
1243
|
self.control = IO.Control(request_manager)
|
|
1137
1244
|
self.status = IO.Status(request_manager)
|
|
1138
1245
|
|
|
1139
|
-
class General:
|
|
1140
|
-
_request_manager: RequestManager
|
|
1141
|
-
class Joints:
|
|
1142
|
-
def __init__(self, request_manager: RequestManager):
|
|
1143
|
-
self._request_manager = request_manager
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
def get_joints_state(
|
|
1147
|
-
self,
|
|
1148
|
-
) -> Response[
|
|
1149
|
-
Union[
|
|
1150
|
-
models.JointsStateResponse,
|
|
1151
|
-
models.ErrorResponse,
|
|
1152
|
-
None
|
|
1153
|
-
],
|
|
1154
|
-
models.JointsStateResponse
|
|
1155
|
-
]:
|
|
1156
|
-
"""
|
|
1157
|
-
Retrieves information about the state of each joint
|
|
1158
|
-
"""
|
|
1159
|
-
path = "/api/v1/joints"
|
|
1160
|
-
try:
|
|
1161
|
-
response = self._request_manager.request(
|
|
1162
|
-
"GET",
|
|
1163
|
-
path,
|
|
1164
|
-
headers=self._request_manager.json_headers(),
|
|
1165
|
-
)
|
|
1166
|
-
parsed = None
|
|
1167
|
-
if response.status == 200:
|
|
1168
|
-
parsed = models.parse_joints_state_response(json.loads(response.data))
|
|
1169
|
-
|
|
1170
|
-
is_user_error = response.status >= 400 and response.status <= 500
|
|
1171
|
-
is_unavailable = response.status == 503
|
|
1172
|
-
if parsed is None and (is_user_error or is_unavailable):
|
|
1173
|
-
parsed = models.parse_error_response(json.loads(response.data))
|
|
1174
|
-
|
|
1175
|
-
return Response(
|
|
1176
|
-
parsed,
|
|
1177
|
-
response.status,
|
|
1178
|
-
response
|
|
1179
|
-
)
|
|
1180
|
-
except urllib3.exceptions.MaxRetryError:
|
|
1181
|
-
return Response(
|
|
1182
|
-
models.ErrorResponse(
|
|
1183
|
-
error=models.ErrorEnum.InternalServerError,
|
|
1184
|
-
message="Connection Refused"
|
|
1185
|
-
),
|
|
1186
|
-
503,
|
|
1187
|
-
None
|
|
1188
|
-
)
|
|
1189
|
-
|
|
1190
|
-
joints: Joints
|
|
1191
|
-
|
|
1192
|
-
def __init__(self, request_manager: RequestManager):
|
|
1193
|
-
self._request_manager = request_manager
|
|
1194
|
-
self.joints = General.Joints(request_manager)
|
|
1195
|
-
|
|
1196
1246
|
class Poses:
|
|
1197
1247
|
_request_manager: RequestManager
|
|
1198
1248
|
class ConstructPose:
|
|
@@ -1662,15 +1712,15 @@ class Recovery:
|
|
|
1662
1712
|
self,
|
|
1663
1713
|
) -> Response[
|
|
1664
1714
|
Union[
|
|
1665
|
-
models.
|
|
1715
|
+
models.FailureStateResponse,
|
|
1666
1716
|
models.ErrorResponse,
|
|
1667
1717
|
models.ErrorResponse,
|
|
1668
1718
|
None
|
|
1669
1719
|
],
|
|
1670
|
-
models.
|
|
1720
|
+
models.FailureStateResponse
|
|
1671
1721
|
]:
|
|
1672
1722
|
"""
|
|
1673
|
-
|
|
1723
|
+
Attempts to recover the robot from a fault state. Inspect the response to determine if additional recovery actions are required.
|
|
1674
1724
|
|
|
1675
1725
|
"""
|
|
1676
1726
|
path = "/api/v1/recovery/recover"
|
|
@@ -1682,7 +1732,7 @@ class Recovery:
|
|
|
1682
1732
|
)
|
|
1683
1733
|
parsed = None
|
|
1684
1734
|
if response.status == 200:
|
|
1685
|
-
parsed = models.
|
|
1735
|
+
parsed = models.parse_failure_state_response(json.loads(response.data))
|
|
1686
1736
|
if response.status == 400:
|
|
1687
1737
|
parsed = models.parse_error_response(json.loads(response.data))
|
|
1688
1738
|
|
|
@@ -2493,9 +2543,9 @@ class StandardBotsRobot(Default):
|
|
|
2493
2543
|
movement: Movement
|
|
2494
2544
|
camera: Camera
|
|
2495
2545
|
faults: Faults
|
|
2546
|
+
general: General
|
|
2496
2547
|
chat_gpt: ChatGPT
|
|
2497
2548
|
io: IO
|
|
2498
|
-
general: General
|
|
2499
2549
|
poses: Poses
|
|
2500
2550
|
recovery: Recovery
|
|
2501
2551
|
ros: ROS
|
|
@@ -2517,9 +2567,9 @@ class StandardBotsRobot(Default):
|
|
|
2517
2567
|
self.movement = Movement(self._request_manager)
|
|
2518
2568
|
self.camera = Camera(self._request_manager)
|
|
2519
2569
|
self.faults = Faults(self._request_manager)
|
|
2570
|
+
self.general = General(self._request_manager)
|
|
2520
2571
|
self.chat_gpt = ChatGPT(self._request_manager)
|
|
2521
2572
|
self.io = IO(self._request_manager)
|
|
2522
|
-
self.general = General(self._request_manager)
|
|
2523
2573
|
self.poses = Poses(self._request_manager)
|
|
2524
2574
|
self.recovery = Recovery(self._request_manager)
|
|
2525
2575
|
self.ros = ROS(self._request_manager)
|
|
@@ -224,6 +224,81 @@ def parse_arm_position_update_request_response_kind_enum(data: object) -> ArmPos
|
|
|
224
224
|
def serialize_arm_position_update_request_response_kind_enum(data: Union[ArmPositionUpdateRequestResponseKindEnum, str]) -> object:
|
|
225
225
|
return ArmPositionUpdateRequestResponseKindEnum(data).value
|
|
226
226
|
|
|
227
|
+
@dataclass
|
|
228
|
+
class BotIdentityData:
|
|
229
|
+
"""Data about the robot's identity"""
|
|
230
|
+
robotId: Union[str, None] = None
|
|
231
|
+
alias: Union[str, None] = None
|
|
232
|
+
robotOperationMode: Union[str, None] = None
|
|
233
|
+
applicationUrl: Union[str, None] = None
|
|
234
|
+
|
|
235
|
+
def validate_robotId(self, value: str) -> Tuple[bool, str]:
|
|
236
|
+
if value is None:
|
|
237
|
+
return [True, ""]
|
|
238
|
+
|
|
239
|
+
if not isinstance(value, str):
|
|
240
|
+
return [False, "robotId must be of type str for BotIdentityData, got " + type(value).__name__]
|
|
241
|
+
|
|
242
|
+
return [True, ""]
|
|
243
|
+
|
|
244
|
+
def validate_alias(self, value: str) -> Tuple[bool, str]:
|
|
245
|
+
if value is None:
|
|
246
|
+
return [True, ""]
|
|
247
|
+
|
|
248
|
+
if not isinstance(value, str):
|
|
249
|
+
return [False, "alias must be of type str for BotIdentityData, got " + type(value).__name__]
|
|
250
|
+
|
|
251
|
+
return [True, ""]
|
|
252
|
+
|
|
253
|
+
def validate_robotOperationMode(self, value: str) -> Tuple[bool, str]:
|
|
254
|
+
if value is None:
|
|
255
|
+
return [True, ""]
|
|
256
|
+
|
|
257
|
+
if not isinstance(value, str):
|
|
258
|
+
return [False, "robotOperationMode must be of type str for BotIdentityData, got " + type(value).__name__]
|
|
259
|
+
|
|
260
|
+
return [True, ""]
|
|
261
|
+
|
|
262
|
+
def validate_applicationUrl(self, value: str) -> Tuple[bool, str]:
|
|
263
|
+
if value is None:
|
|
264
|
+
return [True, ""]
|
|
265
|
+
|
|
266
|
+
if not isinstance(value, str):
|
|
267
|
+
return [False, "applicationUrl must be of type str for BotIdentityData, got " + type(value).__name__]
|
|
268
|
+
|
|
269
|
+
return [True, ""]
|
|
270
|
+
|
|
271
|
+
def __post_init__(self):
|
|
272
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
273
|
+
is_valid, error_str = self.validate_robotId(self.robotId)
|
|
274
|
+
if not is_valid:
|
|
275
|
+
raise TypeError(error_str)
|
|
276
|
+
is_valid, error_str = self.validate_alias(self.alias)
|
|
277
|
+
if not is_valid:
|
|
278
|
+
raise TypeError(error_str)
|
|
279
|
+
is_valid, error_str = self.validate_robotOperationMode(self.robotOperationMode)
|
|
280
|
+
if not is_valid:
|
|
281
|
+
raise TypeError(error_str)
|
|
282
|
+
is_valid, error_str = self.validate_applicationUrl(self.applicationUrl)
|
|
283
|
+
if not is_valid:
|
|
284
|
+
raise TypeError(error_str)
|
|
285
|
+
|
|
286
|
+
def parse_bot_identity_data(data: object):
|
|
287
|
+
return BotIdentityData(
|
|
288
|
+
robotId=parse_str(data["robotId"]) if "robotId" in data and data.get("robotId") is not None else None,
|
|
289
|
+
alias=parse_str(data["alias"]) if "alias" in data and data.get("alias") is not None else None,
|
|
290
|
+
robotOperationMode=parse_str(data["robotOperationMode"]) if "robotOperationMode" in data and data.get("robotOperationMode") is not None else None,
|
|
291
|
+
applicationUrl=parse_str(data["applicationUrl"]) if "applicationUrl" in data and data.get("applicationUrl") is not None else None,
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
def serialize_bot_identity_data(data: BotIdentityData) -> object:
|
|
295
|
+
return {
|
|
296
|
+
"robotId": None if data.robotId is None else serialize_str(data.robotId),
|
|
297
|
+
"alias": None if data.alias is None else serialize_str(data.alias),
|
|
298
|
+
"robotOperationMode": None if data.robotOperationMode is None else serialize_str(data.robotOperationMode),
|
|
299
|
+
"applicationUrl": None if data.applicationUrl is None else serialize_str(data.applicationUrl),
|
|
300
|
+
}
|
|
301
|
+
|
|
227
302
|
class BrakesStateEnum(Enum):
|
|
228
303
|
Engaged = "engaged"
|
|
229
304
|
"""Robot Brakes are engaged, robot is not able to move"""
|
|
@@ -1941,70 +2016,6 @@ def serialize_quaternion(data: Quaternion) -> object:
|
|
|
1941
2016
|
"w": None if data.w is None else serialize_f_64(data.w),
|
|
1942
2017
|
}
|
|
1943
2018
|
|
|
1944
|
-
class RecoveryStateEnum(Enum):
|
|
1945
|
-
Success = "Success"
|
|
1946
|
-
"""Enum Success = `Success`"""
|
|
1947
|
-
Interrupted = "Interrupted"
|
|
1948
|
-
"""Enum Interrupted = `Interrupted`"""
|
|
1949
|
-
NonIdle = "NonIdle"
|
|
1950
|
-
"""Enum NonIdle = `NonIdle`"""
|
|
1951
|
-
Braked = "Braked"
|
|
1952
|
-
"""Enum Braked = `Braked`"""
|
|
1953
|
-
PlanningFailure = "PlanningFailure"
|
|
1954
|
-
"""Enum PlanningFailure = `PlanningFailure`"""
|
|
1955
|
-
ExecutionFailure = "ExecutionFailure"
|
|
1956
|
-
"""Enum ExecutionFailure = `ExecutionFailure`"""
|
|
1957
|
-
ControlSystemFailure = "ControlSystemFailure"
|
|
1958
|
-
"""Enum ControlSystemFailure = `ControlSystemFailure`"""
|
|
1959
|
-
EStopTriggered = "EStopTriggered"
|
|
1960
|
-
"""Enum EStopTriggered = `EStopTriggered`"""
|
|
1961
|
-
GripperFailure = "GripperFailure"
|
|
1962
|
-
"""Enum GripperFailure = `GripperFailure`"""
|
|
1963
|
-
OutOfJointLimitsFailure = "OutOfJointLimitsFailure"
|
|
1964
|
-
"""Enum OutOfJointLimitsFailure = `OutOfJointLimitsFailure`"""
|
|
1965
|
-
CollisionFailure = "CollisionFailure"
|
|
1966
|
-
"""Enum CollisionFailure = `CollisionFailure`"""
|
|
1967
|
-
TorqueCollisionFailure = "TorqueCollisionFailure"
|
|
1968
|
-
"""Enum TorqueCollisionFailure = `TorqueCollisionFailure`"""
|
|
1969
|
-
InBoxingPositionFailure = "InBoxingPositionFailure"
|
|
1970
|
-
"""Enum InBoxingPositionFailure = `InBoxingPositionFailure`"""
|
|
1971
|
-
PowerBoardCheckFailure = "PowerBoardCheckFailure"
|
|
1972
|
-
"""Enum PowerBoardCheckFailure = `PowerBoardCheckFailure`"""
|
|
1973
|
-
MotionPlannerFailure = "MotionPlannerFailure"
|
|
1974
|
-
"""Enum MotionPlannerFailure = `MotionPlannerFailure`"""
|
|
1975
|
-
MotionPlannerFailureStartPositionCollision = "MotionPlannerFailureStartPositionCollision"
|
|
1976
|
-
"""Enum MotionPlannerFailureStartPositionCollision = `MotionPlannerFailureStartPositionCollision`"""
|
|
1977
|
-
IOFailure = "IOFailure"
|
|
1978
|
-
"""Enum IOFailure = `IOFailure`"""
|
|
1979
|
-
InvalidRoutineLoadedFailure = "InvalidRoutineLoadedFailure"
|
|
1980
|
-
"""Enum InvalidRoutineLoadedFailure = `InvalidRoutineLoadedFailure`"""
|
|
1981
|
-
InferenceFailure = "InferenceFailure"
|
|
1982
|
-
"""Enum InferenceFailure = `InferenceFailure`"""
|
|
1983
|
-
CameraFailure = "CameraFailure"
|
|
1984
|
-
"""Enum CameraFailure = `CameraFailure`"""
|
|
1985
|
-
HaasFailure = "HaasFailure"
|
|
1986
|
-
"""Enum HaasFailure = `HaasFailure`"""
|
|
1987
|
-
BotmanHeartbeatLost = "BotmanHeartbeatLost"
|
|
1988
|
-
"""Enum BotmanHeartbeatLost = `BotmanHeartbeatLost`"""
|
|
1989
|
-
InternalFailure = "InternalFailure"
|
|
1990
|
-
"""Enum InternalFailure = `InternalFailure`"""
|
|
1991
|
-
TorqueLimitExceeded = "TorqueLimitExceeded"
|
|
1992
|
-
"""Enum TorqueLimitExceeded = `TorqueLimitExceeded`"""
|
|
1993
|
-
StepPlayFailure = "StepPlayFailure"
|
|
1994
|
-
"""Enum StepPlayFailure = `StepPlayFailure`"""
|
|
1995
|
-
UnbrakeFailure = "UnbrakeFailure"
|
|
1996
|
-
"""Enum UnbrakeFailure = `UnbrakeFailure`"""
|
|
1997
|
-
WeldFailure = "WeldFailure"
|
|
1998
|
-
"""Enum WeldFailure = `WeldFailure`"""
|
|
1999
|
-
TriggerFaultFailure = "TriggerFaultFailure"
|
|
2000
|
-
"""Enum TriggerFaultFailure = `TriggerFaultFailure`"""
|
|
2001
|
-
|
|
2002
|
-
def parse_recovery_state_enum(data: object) -> RecoveryStateEnum:
|
|
2003
|
-
return RecoveryStateEnum(data)
|
|
2004
|
-
|
|
2005
|
-
def serialize_recovery_state_enum(data: Union[RecoveryStateEnum, str]) -> object:
|
|
2006
|
-
return RecoveryStateEnum(data).value
|
|
2007
|
-
|
|
2008
2019
|
class RecoveryTypeEnum(Enum):
|
|
2009
2020
|
Recoverable = "Recoverable"
|
|
2010
2021
|
"""Enum Recoverable = `Recoverable`"""
|
|
@@ -2035,6 +2046,28 @@ def parse_robot_control_mode_enum(data: object) -> RobotControlModeEnum:
|
|
|
2035
2046
|
def serialize_robot_control_mode_enum(data: Union[RobotControlModeEnum, str]) -> object:
|
|
2036
2047
|
return RobotControlModeEnum(data).value
|
|
2037
2048
|
|
|
2049
|
+
class RobotStatusEnum(Enum):
|
|
2050
|
+
Idle = "Idle"
|
|
2051
|
+
"""Enum Idle = `Idle`"""
|
|
2052
|
+
RunningAdHocCommand = "RunningAdHocCommand"
|
|
2053
|
+
"""Enum RunningAdHocCommand = `RunningAdHocCommand`"""
|
|
2054
|
+
RoutineRunning = "RoutineRunning"
|
|
2055
|
+
"""Enum RoutineRunning = `RoutineRunning`"""
|
|
2056
|
+
Antigravity = "Antigravity"
|
|
2057
|
+
"""Enum Antigravity = `Antigravity`"""
|
|
2058
|
+
AntigravitySlow = "AntigravitySlow"
|
|
2059
|
+
"""Enum AntigravitySlow = `AntigravitySlow`"""
|
|
2060
|
+
Failure = "Failure"
|
|
2061
|
+
"""Enum Failure = `Failure`"""
|
|
2062
|
+
Recovering = "Recovering"
|
|
2063
|
+
"""Enum Recovering = `Recovering`"""
|
|
2064
|
+
|
|
2065
|
+
def parse_robot_status_enum(data: object) -> RobotStatusEnum:
|
|
2066
|
+
return RobotStatusEnum(data)
|
|
2067
|
+
|
|
2068
|
+
def serialize_robot_status_enum(data: Union[RobotStatusEnum, str]) -> object:
|
|
2069
|
+
return RobotStatusEnum(data).value
|
|
2070
|
+
|
|
2038
2071
|
class ROSControlStateEnum(Enum):
|
|
2039
2072
|
Enabled = "enabled"
|
|
2040
2073
|
"""ROS control is enabled."""
|
|
@@ -3553,7 +3586,7 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
3553
3586
|
max_width_outer: Union[float, None] = None
|
|
3554
3587
|
force: Union[float, None] = None
|
|
3555
3588
|
max_force: Union[float, None] = None
|
|
3556
|
-
finger_mounting_position: Union[
|
|
3589
|
+
finger_mounting_position: Union[str, None] = None
|
|
3557
3590
|
finger_offset: Union[float, None] = None
|
|
3558
3591
|
finger_angle: Union[float, None] = None
|
|
3559
3592
|
finger_length: Union[float, None] = None
|
|
@@ -3669,12 +3702,12 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
3669
3702
|
|
|
3670
3703
|
return [True, ""]
|
|
3671
3704
|
|
|
3672
|
-
def validate_finger_mounting_position(self, value:
|
|
3705
|
+
def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
|
|
3673
3706
|
if value is None:
|
|
3674
3707
|
return [True, ""]
|
|
3675
3708
|
|
|
3676
|
-
if not isinstance(value,
|
|
3677
|
-
return [False, "finger_mounting_position must be of type
|
|
3709
|
+
if not isinstance(value, str):
|
|
3710
|
+
return [False, "finger_mounting_position must be of type str for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
|
|
3678
3711
|
|
|
3679
3712
|
return [True, ""]
|
|
3680
3713
|
|
|
@@ -3806,7 +3839,7 @@ def parse_on_robot_2_fg_14_gripper_configuration(data: object):
|
|
|
3806
3839
|
max_width_outer=parse_f_64(data["max_width_outer"]) if "max_width_outer" in data and data.get("max_width_outer") is not None else None,
|
|
3807
3840
|
force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
|
|
3808
3841
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
|
|
3809
|
-
finger_mounting_position=
|
|
3842
|
+
finger_mounting_position=parse_str(data["finger_mounting_position"]) if "finger_mounting_position" in data and data.get("finger_mounting_position") is not None else None,
|
|
3810
3843
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
|
|
3811
3844
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
|
|
3812
3845
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
|
|
@@ -3829,7 +3862,7 @@ def serialize_on_robot_2_fg_14_gripper_configuration(data: OnRobot2FG14GripperCo
|
|
|
3829
3862
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
3830
3863
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
3831
3864
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
3832
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
3865
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
|
|
3833
3866
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
3834
3867
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
3835
3868
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -3853,7 +3886,7 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
3853
3886
|
max_width_outer: Union[float, None] = None
|
|
3854
3887
|
force: Union[float, None] = None
|
|
3855
3888
|
max_force: Union[float, None] = None
|
|
3856
|
-
finger_mounting_position: Union[
|
|
3889
|
+
finger_mounting_position: Union[str, None] = None
|
|
3857
3890
|
finger_offset: Union[float, None] = None
|
|
3858
3891
|
finger_angle: Union[float, None] = None
|
|
3859
3892
|
finger_length: Union[float, None] = None
|
|
@@ -3969,12 +4002,12 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
3969
4002
|
|
|
3970
4003
|
return [True, ""]
|
|
3971
4004
|
|
|
3972
|
-
def validate_finger_mounting_position(self, value:
|
|
4005
|
+
def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
|
|
3973
4006
|
if value is None:
|
|
3974
4007
|
return [True, ""]
|
|
3975
4008
|
|
|
3976
|
-
if not isinstance(value,
|
|
3977
|
-
return [False, "finger_mounting_position must be of type
|
|
4009
|
+
if not isinstance(value, str):
|
|
4010
|
+
return [False, "finger_mounting_position must be of type str for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
|
|
3978
4011
|
|
|
3979
4012
|
return [True, ""]
|
|
3980
4013
|
|
|
@@ -4106,7 +4139,7 @@ def parse_on_robot_2_fg_7_gripper_configuration(data: object):
|
|
|
4106
4139
|
max_width_outer=parse_f_64(data["max_width_outer"]) if "max_width_outer" in data and data.get("max_width_outer") is not None else None,
|
|
4107
4140
|
force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
|
|
4108
4141
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
|
|
4109
|
-
finger_mounting_position=
|
|
4142
|
+
finger_mounting_position=parse_str(data["finger_mounting_position"]) if "finger_mounting_position" in data and data.get("finger_mounting_position") is not None else None,
|
|
4110
4143
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
|
|
4111
4144
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
|
|
4112
4145
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
|
|
@@ -4129,7 +4162,7 @@ def serialize_on_robot_2_fg_7_gripper_configuration(data: OnRobot2FG7GripperConf
|
|
|
4129
4162
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
4130
4163
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
4131
4164
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
4132
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
4165
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
|
|
4133
4166
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
4134
4167
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
4135
4168
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -4431,36 +4464,6 @@ def serialize_orientation(data: Orientation) -> object:
|
|
|
4431
4464
|
"quaternion": None if data.quaternion is None else serialize_quaternion(data.quaternion),
|
|
4432
4465
|
}
|
|
4433
4466
|
|
|
4434
|
-
@dataclass
|
|
4435
|
-
class RecoveryStatusResponse:
|
|
4436
|
-
"""Recovery status response"""
|
|
4437
|
-
state: Union[RecoveryStateEnum, None] = None
|
|
4438
|
-
|
|
4439
|
-
def validate_state(self, value: RecoveryStateEnum) -> Tuple[bool, str]:
|
|
4440
|
-
if value is None:
|
|
4441
|
-
return [True, ""]
|
|
4442
|
-
|
|
4443
|
-
if not ((isinstance(value, str) and RecoveryStateEnum in ['Success', 'Interrupted', 'NonIdle', 'Braked', 'PlanningFailure', 'ExecutionFailure', 'ControlSystemFailure', 'EStopTriggered', 'GripperFailure', 'OutOfJointLimitsFailure', 'CollisionFailure', 'TorqueCollisionFailure', 'InBoxingPositionFailure', 'PowerBoardCheckFailure', 'MotionPlannerFailure', 'MotionPlannerFailureStartPositionCollision', 'IOFailure', 'InvalidRoutineLoadedFailure', 'InferenceFailure', 'CameraFailure', 'HaasFailure', 'BotmanHeartbeatLost', 'InternalFailure', 'TorqueLimitExceeded', 'StepPlayFailure', 'UnbrakeFailure', 'WeldFailure', 'TriggerFaultFailure']) or isinstance(value, RecoveryStateEnum)):
|
|
4444
|
-
return [False, "state must be of type RecoveryStateEnum for RecoveryStatusResponse, got " + type(value).__name__]
|
|
4445
|
-
|
|
4446
|
-
return [True, ""]
|
|
4447
|
-
|
|
4448
|
-
def __post_init__(self):
|
|
4449
|
-
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
4450
|
-
is_valid, error_str = self.validate_state(self.state)
|
|
4451
|
-
if not is_valid:
|
|
4452
|
-
raise TypeError(error_str)
|
|
4453
|
-
|
|
4454
|
-
def parse_recovery_status_response(data: object):
|
|
4455
|
-
return RecoveryStatusResponse(
|
|
4456
|
-
state=parse_recovery_state_enum(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
4457
|
-
)
|
|
4458
|
-
|
|
4459
|
-
def serialize_recovery_status_response(data: RecoveryStatusResponse) -> object:
|
|
4460
|
-
return {
|
|
4461
|
-
"state": None if data.state is None else serialize_recovery_state_enum(data.state),
|
|
4462
|
-
}
|
|
4463
|
-
|
|
4464
4467
|
@dataclass
|
|
4465
4468
|
class FailureStateDetails:
|
|
4466
4469
|
"""Failure state details."""
|
|
@@ -5588,9 +5591,19 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
|
|
|
5588
5591
|
@dataclass
|
|
5589
5592
|
class FailureStateResponse:
|
|
5590
5593
|
"""Failure state response informs user of how and whether the robot may be recovered."""
|
|
5594
|
+
status: Union[RobotStatusEnum, None] = None
|
|
5591
5595
|
failed: Union[bool, None] = None
|
|
5592
5596
|
failure: Union[FailureStateDetails, None] = None
|
|
5593
5597
|
|
|
5598
|
+
def validate_status(self, value: RobotStatusEnum) -> Tuple[bool, str]:
|
|
5599
|
+
if value is None:
|
|
5600
|
+
return [True, ""]
|
|
5601
|
+
|
|
5602
|
+
if not ((isinstance(value, str) and RobotStatusEnum in ['Idle', 'RunningAdHocCommand', 'RoutineRunning', 'Antigravity', 'AntigravitySlow', 'Failure', 'Recovering']) or isinstance(value, RobotStatusEnum)):
|
|
5603
|
+
return [False, "status must be of type RobotStatusEnum for FailureStateResponse, got " + type(value).__name__]
|
|
5604
|
+
|
|
5605
|
+
return [True, ""]
|
|
5606
|
+
|
|
5594
5607
|
def validate_failed(self, value: bool) -> Tuple[bool, str]:
|
|
5595
5608
|
if value is None:
|
|
5596
5609
|
return [True, ""]
|
|
@@ -5611,6 +5624,9 @@ class FailureStateResponse:
|
|
|
5611
5624
|
|
|
5612
5625
|
def __post_init__(self):
|
|
5613
5626
|
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5627
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
5628
|
+
if not is_valid:
|
|
5629
|
+
raise TypeError(error_str)
|
|
5614
5630
|
is_valid, error_str = self.validate_failed(self.failed)
|
|
5615
5631
|
if not is_valid:
|
|
5616
5632
|
raise TypeError(error_str)
|
|
@@ -5620,12 +5636,14 @@ class FailureStateResponse:
|
|
|
5620
5636
|
|
|
5621
5637
|
def parse_failure_state_response(data: object):
|
|
5622
5638
|
return FailureStateResponse(
|
|
5639
|
+
status=parse_robot_status_enum(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
5623
5640
|
failed=parse_bool(data["failed"]) if "failed" in data and data.get("failed") is not None else None,
|
|
5624
5641
|
failure=parse_failure_state_details(data["failure"]) if "failure" in data and data.get("failure") is not None else None,
|
|
5625
5642
|
)
|
|
5626
5643
|
|
|
5627
5644
|
def serialize_failure_state_response(data: FailureStateResponse) -> object:
|
|
5628
5645
|
return {
|
|
5646
|
+
"status": None if data.status is None else serialize_robot_status_enum(data.status),
|
|
5629
5647
|
"failed": None if data.failed is None else serialize_bool(data.failed),
|
|
5630
5648
|
"failure": None if data.failure is None else serialize_failure_state_details(data.failure),
|
|
5631
5649
|
}
|
{standardbots-2.0.0.dev1734558734.dist-info → standardbots-2.0.0.dev1736521253.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: standardbots
|
|
3
|
-
Version: 2.0.0.
|
|
3
|
+
Version: 2.0.0.dev1736521253
|
|
4
4
|
Summary: Standard Bots RO1 Robotics API
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Standard Bots Support
|
|
@@ -10,6 +10,13 @@ Requires-Python: >=3.7
|
|
|
10
10
|
Requires-Dist: setuptools>=21.0.0
|
|
11
11
|
Requires-Dist: typing_extensions>=4.3.0
|
|
12
12
|
Requires-Dist: urllib3>=1.26.7
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: author-email
|
|
15
|
+
Dynamic: description
|
|
16
|
+
Dynamic: keywords
|
|
17
|
+
Dynamic: requires-dist
|
|
18
|
+
Dynamic: requires-python
|
|
19
|
+
Dynamic: summary
|
|
13
20
|
|
|
14
21
|
Standard Bots RO1 Robotics API. # noqa: E501
|
|
15
22
|
|
|
@@ -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=60i0Alae1dIC3BFK_s0YZRMvVcC3VmxKVsuhSJGDzHc,91377
|
|
4
|
+
standardbots/auto_generated/models.py,sha256=KOKTkI8z_Z6QAe5_QezTgrq6_6QX7pJmFIAPS96N_2c,259088
|
|
5
|
+
standardbots-2.0.0.dev1736521253.dist-info/METADATA,sha256=-5-qigZaqTavNWXoRzBG-5-M84ouRZSax8S_CaHwKwk,558
|
|
6
|
+
standardbots-2.0.0.dev1736521253.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
7
|
+
standardbots-2.0.0.dev1736521253.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
+
standardbots-2.0.0.dev1736521253.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=mKYO66ZFWbqJcC99_sKBqgo_biWbJmGj4TPqYQB3K7M,89516
|
|
4
|
-
standardbots/auto_generated/models.py,sha256=Xn63-fnwnSqCrVMCu5XruZevuhjfoeGnkCfBJRoDy-I,259118
|
|
5
|
-
standardbots-2.0.0.dev1734558734.dist-info/METADATA,sha256=31lUjcoQ6Z83jpjWtGbKbGIv3cfNBrgXFjg37d9M4aw,416
|
|
6
|
-
standardbots-2.0.0.dev1734558734.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
standardbots-2.0.0.dev1734558734.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
-
standardbots-2.0.0.dev1734558734.dist-info/RECORD,,
|
|
File without changes
|