standardbots 2.0.0.dev1736549072__tar.gz → 2.2024924.1__tar.gz
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-2.0.0.dev1736549072 → standardbots-2.2024924.1}/PKG-INFO +2 -9
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/setup.py +1 -1
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/auto_generated/apis.py +65 -115
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/auto_generated/models.py +250 -328
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/PKG-INFO +2 -9
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/setup.cfg +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/__init__.py +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/auto_generated/__init__.py +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/SOURCES.txt +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/dependency_links.txt +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/requires.txt +0 -0
- {standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: standardbots
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2024924.1
|
|
4
4
|
Summary: Standard Bots RO1 Robotics API
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Standard Bots Support
|
|
@@ -10,13 +10,6 @@ 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
|
|
20
13
|
|
|
21
14
|
Standard Bots RO1 Robotics API. # noqa: E501
|
|
22
15
|
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/auto_generated/apis.py
RENAMED
|
@@ -188,7 +188,7 @@ class Default:
|
|
|
188
188
|
return self.control_gripper(
|
|
189
189
|
body=models.GripperCommandRequest(
|
|
190
190
|
kind=models.GripperKindEnum.DhCgi,
|
|
191
|
-
|
|
191
|
+
dh_pgc=models.DHCGIGripperCommandRequest(
|
|
192
192
|
target_diameter, target_force, target_speed
|
|
193
193
|
),
|
|
194
194
|
),
|
|
@@ -713,7 +713,7 @@ class Camera:
|
|
|
713
713
|
None
|
|
714
714
|
]:
|
|
715
715
|
"""
|
|
716
|
-
Retrieve the latest RGB frame from the camera.
|
|
716
|
+
Retrieve the latest RGB frame from the camera.
|
|
717
717
|
"""
|
|
718
718
|
path = "/api/v1/camera/frame/rgb"
|
|
719
719
|
try:
|
|
@@ -932,113 +932,6 @@ 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
|
-
|
|
1042
935
|
class ChatGPT:
|
|
1043
936
|
_request_manager: RequestManager
|
|
1044
937
|
class Data:
|
|
@@ -1243,6 +1136,63 @@ class IO:
|
|
|
1243
1136
|
self.control = IO.Control(request_manager)
|
|
1244
1137
|
self.status = IO.Status(request_manager)
|
|
1245
1138
|
|
|
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
|
+
|
|
1246
1196
|
class Poses:
|
|
1247
1197
|
_request_manager: RequestManager
|
|
1248
1198
|
class ConstructPose:
|
|
@@ -1712,15 +1662,15 @@ class Recovery:
|
|
|
1712
1662
|
self,
|
|
1713
1663
|
) -> Response[
|
|
1714
1664
|
Union[
|
|
1715
|
-
models.
|
|
1665
|
+
models.RecoveryStatusResponse,
|
|
1716
1666
|
models.ErrorResponse,
|
|
1717
1667
|
models.ErrorResponse,
|
|
1718
1668
|
None
|
|
1719
1669
|
],
|
|
1720
|
-
models.
|
|
1670
|
+
models.RecoveryStatusResponse
|
|
1721
1671
|
]:
|
|
1722
1672
|
"""
|
|
1723
|
-
|
|
1673
|
+
Recovers the robot from a fault state.
|
|
1724
1674
|
|
|
1725
1675
|
"""
|
|
1726
1676
|
path = "/api/v1/recovery/recover"
|
|
@@ -1732,7 +1682,7 @@ class Recovery:
|
|
|
1732
1682
|
)
|
|
1733
1683
|
parsed = None
|
|
1734
1684
|
if response.status == 200:
|
|
1735
|
-
parsed = models.
|
|
1685
|
+
parsed = models.parse_recovery_status_response(json.loads(response.data))
|
|
1736
1686
|
if response.status == 400:
|
|
1737
1687
|
parsed = models.parse_error_response(json.loads(response.data))
|
|
1738
1688
|
|
|
@@ -2543,9 +2493,9 @@ class StandardBotsRobot(Default):
|
|
|
2543
2493
|
movement: Movement
|
|
2544
2494
|
camera: Camera
|
|
2545
2495
|
faults: Faults
|
|
2546
|
-
general: General
|
|
2547
2496
|
chat_gpt: ChatGPT
|
|
2548
2497
|
io: IO
|
|
2498
|
+
general: General
|
|
2549
2499
|
poses: Poses
|
|
2550
2500
|
recovery: Recovery
|
|
2551
2501
|
ros: ROS
|
|
@@ -2567,9 +2517,9 @@ class StandardBotsRobot(Default):
|
|
|
2567
2517
|
self.movement = Movement(self._request_manager)
|
|
2568
2518
|
self.camera = Camera(self._request_manager)
|
|
2569
2519
|
self.faults = Faults(self._request_manager)
|
|
2570
|
-
self.general = General(self._request_manager)
|
|
2571
2520
|
self.chat_gpt = ChatGPT(self._request_manager)
|
|
2572
2521
|
self.io = IO(self._request_manager)
|
|
2522
|
+
self.general = General(self._request_manager)
|
|
2573
2523
|
self.poses = Poses(self._request_manager)
|
|
2574
2524
|
self.recovery = Recovery(self._request_manager)
|
|
2575
2525
|
self.ros = ROS(self._request_manager)
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots/auto_generated/models.py
RENAMED
|
@@ -224,81 +224,6 @@ 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
|
-
|
|
302
227
|
class BrakesStateEnum(Enum):
|
|
303
228
|
Engaged = "engaged"
|
|
304
229
|
"""Robot Brakes are engaged, robot is not able to move"""
|
|
@@ -1372,66 +1297,6 @@ def parse_joint_rotations(data: object) -> JointRotations:
|
|
|
1372
1297
|
def serialize_joint_rotations(data: JointRotations) -> object:
|
|
1373
1298
|
return [serialize_f_64(data[0]),serialize_f_64(data[1]),serialize_f_64(data[2]),serialize_f_64(data[3]),serialize_f_64(data[4]),serialize_f_64(data[5]),]
|
|
1374
1299
|
|
|
1375
|
-
@dataclass
|
|
1376
|
-
class JointStateDisturbance:
|
|
1377
|
-
"""Disturbance of a joint"""
|
|
1378
|
-
disturbance: Union[float, None] = None
|
|
1379
|
-
amperageDisturbance: Union[float, None] = None
|
|
1380
|
-
windupDisturbance: Union[float, None] = None
|
|
1381
|
-
|
|
1382
|
-
def validate_disturbance(self, value: float) -> Tuple[bool, str]:
|
|
1383
|
-
if value is None:
|
|
1384
|
-
return [True, ""]
|
|
1385
|
-
|
|
1386
|
-
if not isinstance(value, float):
|
|
1387
|
-
return [False, "disturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
|
|
1388
|
-
|
|
1389
|
-
return [True, ""]
|
|
1390
|
-
|
|
1391
|
-
def validate_amperageDisturbance(self, value: float) -> Tuple[bool, str]:
|
|
1392
|
-
if value is None:
|
|
1393
|
-
return [True, ""]
|
|
1394
|
-
|
|
1395
|
-
if not isinstance(value, float):
|
|
1396
|
-
return [False, "amperageDisturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
|
|
1397
|
-
|
|
1398
|
-
return [True, ""]
|
|
1399
|
-
|
|
1400
|
-
def validate_windupDisturbance(self, value: float) -> Tuple[bool, str]:
|
|
1401
|
-
if value is None:
|
|
1402
|
-
return [True, ""]
|
|
1403
|
-
|
|
1404
|
-
if not isinstance(value, float):
|
|
1405
|
-
return [False, "windupDisturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
|
|
1406
|
-
|
|
1407
|
-
return [True, ""]
|
|
1408
|
-
|
|
1409
|
-
def __post_init__(self):
|
|
1410
|
-
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
1411
|
-
is_valid, error_str = self.validate_disturbance(self.disturbance)
|
|
1412
|
-
if not is_valid:
|
|
1413
|
-
raise TypeError(error_str)
|
|
1414
|
-
is_valid, error_str = self.validate_amperageDisturbance(self.amperageDisturbance)
|
|
1415
|
-
if not is_valid:
|
|
1416
|
-
raise TypeError(error_str)
|
|
1417
|
-
is_valid, error_str = self.validate_windupDisturbance(self.windupDisturbance)
|
|
1418
|
-
if not is_valid:
|
|
1419
|
-
raise TypeError(error_str)
|
|
1420
|
-
|
|
1421
|
-
def parse_joint_state_disturbance(data: object):
|
|
1422
|
-
return JointStateDisturbance(
|
|
1423
|
-
disturbance=parse_f_64(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
|
|
1424
|
-
amperageDisturbance=parse_f_64(data["amperageDisturbance"]) if "amperageDisturbance" in data and data.get("amperageDisturbance") is not None else None,
|
|
1425
|
-
windupDisturbance=parse_f_64(data["windupDisturbance"]) if "windupDisturbance" in data and data.get("windupDisturbance") is not None else None,
|
|
1426
|
-
)
|
|
1427
|
-
|
|
1428
|
-
def serialize_joint_state_disturbance(data: JointStateDisturbance) -> object:
|
|
1429
|
-
return {
|
|
1430
|
-
"disturbance": None if data.disturbance is None else serialize_f_64(data.disturbance),
|
|
1431
|
-
"amperageDisturbance": None if data.amperageDisturbance is None else serialize_f_64(data.amperageDisturbance),
|
|
1432
|
-
"windupDisturbance": None if data.windupDisturbance is None else serialize_f_64(data.windupDisturbance),
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
1300
|
class LinearGripDirectionEnum(Enum):
|
|
1436
1301
|
Inward = "inward"
|
|
1437
1302
|
"""Move gripper inward to grip. Measure grip position based on interior of gripper fingers and exterior of object"""
|
|
@@ -2076,6 +1941,70 @@ def serialize_quaternion(data: Quaternion) -> object:
|
|
|
2076
1941
|
"w": None if data.w is None else serialize_f_64(data.w),
|
|
2077
1942
|
}
|
|
2078
1943
|
|
|
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
|
+
|
|
2079
2008
|
class RecoveryTypeEnum(Enum):
|
|
2080
2009
|
Recoverable = "Recoverable"
|
|
2081
2010
|
"""Enum Recoverable = `Recoverable`"""
|
|
@@ -2106,28 +2035,6 @@ def parse_robot_control_mode_enum(data: object) -> RobotControlModeEnum:
|
|
|
2106
2035
|
def serialize_robot_control_mode_enum(data: Union[RobotControlModeEnum, str]) -> object:
|
|
2107
2036
|
return RobotControlModeEnum(data).value
|
|
2108
2037
|
|
|
2109
|
-
class RobotStatusEnum(Enum):
|
|
2110
|
-
Idle = "Idle"
|
|
2111
|
-
"""Enum Idle = `Idle`"""
|
|
2112
|
-
RunningAdHocCommand = "RunningAdHocCommand"
|
|
2113
|
-
"""Enum RunningAdHocCommand = `RunningAdHocCommand`"""
|
|
2114
|
-
RoutineRunning = "RoutineRunning"
|
|
2115
|
-
"""Enum RoutineRunning = `RoutineRunning`"""
|
|
2116
|
-
Antigravity = "Antigravity"
|
|
2117
|
-
"""Enum Antigravity = `Antigravity`"""
|
|
2118
|
-
AntigravitySlow = "AntigravitySlow"
|
|
2119
|
-
"""Enum AntigravitySlow = `AntigravitySlow`"""
|
|
2120
|
-
Failure = "Failure"
|
|
2121
|
-
"""Enum Failure = `Failure`"""
|
|
2122
|
-
Recovering = "Recovering"
|
|
2123
|
-
"""Enum Recovering = `Recovering`"""
|
|
2124
|
-
|
|
2125
|
-
def parse_robot_status_enum(data: object) -> RobotStatusEnum:
|
|
2126
|
-
return RobotStatusEnum(data)
|
|
2127
|
-
|
|
2128
|
-
def serialize_robot_status_enum(data: Union[RobotStatusEnum, str]) -> object:
|
|
2129
|
-
return RobotStatusEnum(data).value
|
|
2130
|
-
|
|
2131
2038
|
class ROSControlStateEnum(Enum):
|
|
2132
2039
|
Enabled = "enabled"
|
|
2133
2040
|
"""ROS control is enabled."""
|
|
@@ -2715,7 +2622,7 @@ def serialize_camera_intrinsics_response(data: CameraIntrinsicsResponse) -> obje
|
|
|
2715
2622
|
|
|
2716
2623
|
@dataclass
|
|
2717
2624
|
class CameraFrameRequest:
|
|
2718
|
-
"""Request for a single camera frame.
|
|
2625
|
+
"""Request for a single camera frame."""
|
|
2719
2626
|
camera_settings: Union[CameraSettings, None] = None
|
|
2720
2627
|
|
|
2721
2628
|
def validate_camera_settings(self, value: CameraSettings) -> Tuple[bool, str]:
|
|
@@ -3019,6 +2926,81 @@ def serialize_tooltip_position_response(data: TooltipPositionResponse) -> object
|
|
|
3019
2926
|
"pose": None if data.pose is None else serialize_cartesian_pose(data.pose),
|
|
3020
2927
|
}
|
|
3021
2928
|
|
|
2929
|
+
@dataclass
|
|
2930
|
+
class JointState:
|
|
2931
|
+
"""State of a joint"""
|
|
2932
|
+
braked: Union[bool, None] = None
|
|
2933
|
+
connectionStatus: Union[ConnectionStatus, None] = None
|
|
2934
|
+
inCollision: Union[bool, None] = None
|
|
2935
|
+
disturbance: Union[float, None] = None
|
|
2936
|
+
|
|
2937
|
+
def validate_braked(self, value: bool) -> Tuple[bool, str]:
|
|
2938
|
+
if value is None:
|
|
2939
|
+
return [True, ""]
|
|
2940
|
+
|
|
2941
|
+
if not isinstance(value, bool):
|
|
2942
|
+
return [False, "braked must be of type bool for JointState, got " + type(value).__name__]
|
|
2943
|
+
|
|
2944
|
+
return [True, ""]
|
|
2945
|
+
|
|
2946
|
+
def validate_connectionStatus(self, value: ConnectionStatus) -> Tuple[bool, str]:
|
|
2947
|
+
if value is None:
|
|
2948
|
+
return [True, ""]
|
|
2949
|
+
|
|
2950
|
+
if not ((isinstance(value, str) and ConnectionStatus in ['connected', 'disconnected', 'ready']) or isinstance(value, ConnectionStatus)):
|
|
2951
|
+
return [False, "connectionStatus must be of type ConnectionStatus for JointState, got " + type(value).__name__]
|
|
2952
|
+
|
|
2953
|
+
return [True, ""]
|
|
2954
|
+
|
|
2955
|
+
def validate_inCollision(self, value: bool) -> Tuple[bool, str]:
|
|
2956
|
+
if value is None:
|
|
2957
|
+
return [True, ""]
|
|
2958
|
+
|
|
2959
|
+
if not isinstance(value, bool):
|
|
2960
|
+
return [False, "inCollision must be of type bool for JointState, got " + type(value).__name__]
|
|
2961
|
+
|
|
2962
|
+
return [True, ""]
|
|
2963
|
+
|
|
2964
|
+
def validate_disturbance(self, value: float) -> Tuple[bool, str]:
|
|
2965
|
+
if value is None:
|
|
2966
|
+
return [True, ""]
|
|
2967
|
+
|
|
2968
|
+
if not isinstance(value, float):
|
|
2969
|
+
return [False, "disturbance must be of type float for JointState, got " + type(value).__name__]
|
|
2970
|
+
|
|
2971
|
+
return [True, ""]
|
|
2972
|
+
|
|
2973
|
+
def __post_init__(self):
|
|
2974
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2975
|
+
is_valid, error_str = self.validate_braked(self.braked)
|
|
2976
|
+
if not is_valid:
|
|
2977
|
+
raise TypeError(error_str)
|
|
2978
|
+
is_valid, error_str = self.validate_connectionStatus(self.connectionStatus)
|
|
2979
|
+
if not is_valid:
|
|
2980
|
+
raise TypeError(error_str)
|
|
2981
|
+
is_valid, error_str = self.validate_inCollision(self.inCollision)
|
|
2982
|
+
if not is_valid:
|
|
2983
|
+
raise TypeError(error_str)
|
|
2984
|
+
is_valid, error_str = self.validate_disturbance(self.disturbance)
|
|
2985
|
+
if not is_valid:
|
|
2986
|
+
raise TypeError(error_str)
|
|
2987
|
+
|
|
2988
|
+
def parse_joint_state(data: object):
|
|
2989
|
+
return JointState(
|
|
2990
|
+
braked=parse_bool(data["braked"]) if "braked" in data and data.get("braked") is not None else None,
|
|
2991
|
+
connectionStatus=parse_connection_status(data["connectionStatus"]) if "connectionStatus" in data and data.get("connectionStatus") is not None else None,
|
|
2992
|
+
inCollision=parse_bool(data["inCollision"]) if "inCollision" in data and data.get("inCollision") is not None else None,
|
|
2993
|
+
disturbance=parse_f_64(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
|
|
2994
|
+
)
|
|
2995
|
+
|
|
2996
|
+
def serialize_joint_state(data: JointState) -> object:
|
|
2997
|
+
return {
|
|
2998
|
+
"braked": None if data.braked is None else serialize_bool(data.braked),
|
|
2999
|
+
"connectionStatus": None if data.connectionStatus is None else serialize_connection_status(data.connectionStatus),
|
|
3000
|
+
"inCollision": None if data.inCollision is None else serialize_bool(data.inCollision),
|
|
3001
|
+
"disturbance": None if data.disturbance is None else serialize_f_64(data.disturbance),
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3022
3004
|
EnvironmentVariablesList = List[EnvironmentVariable]
|
|
3023
3005
|
|
|
3024
3006
|
def parse_environment_variables_list(data: object) -> EnvironmentVariablesList:
|
|
@@ -3330,81 +3312,6 @@ def serialize_arm_joint_rotations(data: ArmJointRotations) -> object:
|
|
|
3330
3312
|
"joints": serialize_joint_rotations(data.joints),
|
|
3331
3313
|
}
|
|
3332
3314
|
|
|
3333
|
-
@dataclass
|
|
3334
|
-
class JointState:
|
|
3335
|
-
"""State of a joint"""
|
|
3336
|
-
braked: Union[bool, None] = None
|
|
3337
|
-
connectionStatus: Union[ConnectionStatus, None] = None
|
|
3338
|
-
inCollision: Union[bool, None] = None
|
|
3339
|
-
disturbance: Union[JointStateDisturbance, None] = None
|
|
3340
|
-
|
|
3341
|
-
def validate_braked(self, value: bool) -> Tuple[bool, str]:
|
|
3342
|
-
if value is None:
|
|
3343
|
-
return [True, ""]
|
|
3344
|
-
|
|
3345
|
-
if not isinstance(value, bool):
|
|
3346
|
-
return [False, "braked must be of type bool for JointState, got " + type(value).__name__]
|
|
3347
|
-
|
|
3348
|
-
return [True, ""]
|
|
3349
|
-
|
|
3350
|
-
def validate_connectionStatus(self, value: ConnectionStatus) -> Tuple[bool, str]:
|
|
3351
|
-
if value is None:
|
|
3352
|
-
return [True, ""]
|
|
3353
|
-
|
|
3354
|
-
if not ((isinstance(value, str) and ConnectionStatus in ['connected', 'disconnected', 'ready']) or isinstance(value, ConnectionStatus)):
|
|
3355
|
-
return [False, "connectionStatus must be of type ConnectionStatus for JointState, got " + type(value).__name__]
|
|
3356
|
-
|
|
3357
|
-
return [True, ""]
|
|
3358
|
-
|
|
3359
|
-
def validate_inCollision(self, value: bool) -> Tuple[bool, str]:
|
|
3360
|
-
if value is None:
|
|
3361
|
-
return [True, ""]
|
|
3362
|
-
|
|
3363
|
-
if not isinstance(value, bool):
|
|
3364
|
-
return [False, "inCollision must be of type bool for JointState, got " + type(value).__name__]
|
|
3365
|
-
|
|
3366
|
-
return [True, ""]
|
|
3367
|
-
|
|
3368
|
-
def validate_disturbance(self, value: JointStateDisturbance) -> Tuple[bool, str]:
|
|
3369
|
-
if value is None:
|
|
3370
|
-
return [True, ""]
|
|
3371
|
-
|
|
3372
|
-
if not isinstance(value, JointStateDisturbance):
|
|
3373
|
-
return [False, "disturbance must be of type JointStateDisturbance for JointState, got " + type(value).__name__]
|
|
3374
|
-
|
|
3375
|
-
return [True, ""]
|
|
3376
|
-
|
|
3377
|
-
def __post_init__(self):
|
|
3378
|
-
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
3379
|
-
is_valid, error_str = self.validate_braked(self.braked)
|
|
3380
|
-
if not is_valid:
|
|
3381
|
-
raise TypeError(error_str)
|
|
3382
|
-
is_valid, error_str = self.validate_connectionStatus(self.connectionStatus)
|
|
3383
|
-
if not is_valid:
|
|
3384
|
-
raise TypeError(error_str)
|
|
3385
|
-
is_valid, error_str = self.validate_inCollision(self.inCollision)
|
|
3386
|
-
if not is_valid:
|
|
3387
|
-
raise TypeError(error_str)
|
|
3388
|
-
is_valid, error_str = self.validate_disturbance(self.disturbance)
|
|
3389
|
-
if not is_valid:
|
|
3390
|
-
raise TypeError(error_str)
|
|
3391
|
-
|
|
3392
|
-
def parse_joint_state(data: object):
|
|
3393
|
-
return JointState(
|
|
3394
|
-
braked=parse_bool(data["braked"]) if "braked" in data and data.get("braked") is not None else None,
|
|
3395
|
-
connectionStatus=parse_connection_status(data["connectionStatus"]) if "connectionStatus" in data and data.get("connectionStatus") is not None else None,
|
|
3396
|
-
inCollision=parse_bool(data["inCollision"]) if "inCollision" in data and data.get("inCollision") is not None else None,
|
|
3397
|
-
disturbance=parse_joint_state_disturbance(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
|
|
3398
|
-
)
|
|
3399
|
-
|
|
3400
|
-
def serialize_joint_state(data: JointState) -> object:
|
|
3401
|
-
return {
|
|
3402
|
-
"braked": None if data.braked is None else serialize_bool(data.braked),
|
|
3403
|
-
"connectionStatus": None if data.connectionStatus is None else serialize_connection_status(data.connectionStatus),
|
|
3404
|
-
"inCollision": None if data.inCollision is None else serialize_bool(data.inCollision),
|
|
3405
|
-
"disturbance": None if data.disturbance is None else serialize_joint_state_disturbance(data.disturbance),
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
3315
|
@dataclass
|
|
3409
3316
|
class LinearUnit:
|
|
3410
3317
|
"""Reusable Abstraction for linear units (eg distance, position, offset)
|
|
@@ -3646,7 +3553,7 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
3646
3553
|
max_width_outer: Union[float, None] = None
|
|
3647
3554
|
force: Union[float, None] = None
|
|
3648
3555
|
max_force: Union[float, None] = None
|
|
3649
|
-
finger_mounting_position: Union[
|
|
3556
|
+
finger_mounting_position: Union[float, None] = None
|
|
3650
3557
|
finger_offset: Union[float, None] = None
|
|
3651
3558
|
finger_angle: Union[float, None] = None
|
|
3652
3559
|
finger_length: Union[float, None] = None
|
|
@@ -3762,12 +3669,12 @@ class OnRobot2FG14GripperConfiguration:
|
|
|
3762
3669
|
|
|
3763
3670
|
return [True, ""]
|
|
3764
3671
|
|
|
3765
|
-
def validate_finger_mounting_position(self, value:
|
|
3672
|
+
def validate_finger_mounting_position(self, value: float) -> Tuple[bool, str]:
|
|
3766
3673
|
if value is None:
|
|
3767
3674
|
return [True, ""]
|
|
3768
3675
|
|
|
3769
|
-
if not isinstance(value,
|
|
3770
|
-
return [False, "finger_mounting_position must be of type
|
|
3676
|
+
if not isinstance(value, float):
|
|
3677
|
+
return [False, "finger_mounting_position must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
|
|
3771
3678
|
|
|
3772
3679
|
return [True, ""]
|
|
3773
3680
|
|
|
@@ -3899,7 +3806,7 @@ def parse_on_robot_2_fg_14_gripper_configuration(data: object):
|
|
|
3899
3806
|
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,
|
|
3900
3807
|
force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
|
|
3901
3808
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
|
|
3902
|
-
finger_mounting_position=
|
|
3809
|
+
finger_mounting_position=parse_f_64(data["finger_mounting_position"]) if "finger_mounting_position" in data and data.get("finger_mounting_position") is not None else None,
|
|
3903
3810
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
|
|
3904
3811
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
|
|
3905
3812
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
|
|
@@ -3922,7 +3829,7 @@ def serialize_on_robot_2_fg_14_gripper_configuration(data: OnRobot2FG14GripperCo
|
|
|
3922
3829
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
3923
3830
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
3924
3831
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
3925
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
3832
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_f_64(data.finger_mounting_position),
|
|
3926
3833
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
3927
3834
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
3928
3835
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -3946,7 +3853,7 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
3946
3853
|
max_width_outer: Union[float, None] = None
|
|
3947
3854
|
force: Union[float, None] = None
|
|
3948
3855
|
max_force: Union[float, None] = None
|
|
3949
|
-
finger_mounting_position: Union[
|
|
3856
|
+
finger_mounting_position: Union[float, None] = None
|
|
3950
3857
|
finger_offset: Union[float, None] = None
|
|
3951
3858
|
finger_angle: Union[float, None] = None
|
|
3952
3859
|
finger_length: Union[float, None] = None
|
|
@@ -4062,12 +3969,12 @@ class OnRobot2FG7GripperConfiguration:
|
|
|
4062
3969
|
|
|
4063
3970
|
return [True, ""]
|
|
4064
3971
|
|
|
4065
|
-
def validate_finger_mounting_position(self, value:
|
|
3972
|
+
def validate_finger_mounting_position(self, value: float) -> Tuple[bool, str]:
|
|
4066
3973
|
if value is None:
|
|
4067
3974
|
return [True, ""]
|
|
4068
3975
|
|
|
4069
|
-
if not isinstance(value,
|
|
4070
|
-
return [False, "finger_mounting_position must be of type
|
|
3976
|
+
if not isinstance(value, float):
|
|
3977
|
+
return [False, "finger_mounting_position must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
|
|
4071
3978
|
|
|
4072
3979
|
return [True, ""]
|
|
4073
3980
|
|
|
@@ -4199,7 +4106,7 @@ def parse_on_robot_2_fg_7_gripper_configuration(data: object):
|
|
|
4199
4106
|
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,
|
|
4200
4107
|
force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
|
|
4201
4108
|
max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
|
|
4202
|
-
finger_mounting_position=
|
|
4109
|
+
finger_mounting_position=parse_f_64(data["finger_mounting_position"]) if "finger_mounting_position" in data and data.get("finger_mounting_position") is not None else None,
|
|
4203
4110
|
finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
|
|
4204
4111
|
finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
|
|
4205
4112
|
finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
|
|
@@ -4222,7 +4129,7 @@ def serialize_on_robot_2_fg_7_gripper_configuration(data: OnRobot2FG7GripperConf
|
|
|
4222
4129
|
"max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
|
|
4223
4130
|
"force": None if data.force is None else serialize_f_64(data.force),
|
|
4224
4131
|
"max_force": None if data.max_force is None else serialize_f_64(data.max_force),
|
|
4225
|
-
"finger_mounting_position": None if data.finger_mounting_position is None else
|
|
4132
|
+
"finger_mounting_position": None if data.finger_mounting_position is None else serialize_f_64(data.finger_mounting_position),
|
|
4226
4133
|
"finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
|
|
4227
4134
|
"finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
|
|
4228
4135
|
"finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
|
|
@@ -4524,6 +4431,36 @@ def serialize_orientation(data: Orientation) -> object:
|
|
|
4524
4431
|
"quaternion": None if data.quaternion is None else serialize_quaternion(data.quaternion),
|
|
4525
4432
|
}
|
|
4526
4433
|
|
|
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
|
+
|
|
4527
4464
|
@dataclass
|
|
4528
4465
|
class FailureStateDetails:
|
|
4529
4466
|
"""Failure state details."""
|
|
@@ -4923,74 +4860,6 @@ def serialize_arm_position_update_request_response_event_stream_details(data: Ar
|
|
|
4923
4860
|
"subscriptions": serialize_arm_position_update_request_response_event_stream_subscriptions_list(data.subscriptions),
|
|
4924
4861
|
}
|
|
4925
4862
|
|
|
4926
|
-
@dataclass
|
|
4927
|
-
class Routine:
|
|
4928
|
-
"""Robot Routine containing steps to automate robot movement and operations"""
|
|
4929
|
-
id: Union[str, None] = None
|
|
4930
|
-
name: Union[str, None] = None
|
|
4931
|
-
environment_variables: Union[EnvironmentVariablesList, None] = None
|
|
4932
|
-
|
|
4933
|
-
def validate_id(self, value: str) -> Tuple[bool, str]:
|
|
4934
|
-
if value is None:
|
|
4935
|
-
return [True, ""]
|
|
4936
|
-
|
|
4937
|
-
if not isinstance(value, str):
|
|
4938
|
-
return [False, "id must be of type str for Routine, got " + type(value).__name__]
|
|
4939
|
-
|
|
4940
|
-
return [True, ""]
|
|
4941
|
-
|
|
4942
|
-
def validate_name(self, value: str) -> Tuple[bool, str]:
|
|
4943
|
-
if value is None:
|
|
4944
|
-
return [True, ""]
|
|
4945
|
-
|
|
4946
|
-
if not isinstance(value, str):
|
|
4947
|
-
return [False, "name must be of type str for Routine, got " + type(value).__name__]
|
|
4948
|
-
|
|
4949
|
-
return [True, ""]
|
|
4950
|
-
|
|
4951
|
-
def validate_environment_variables(self, value: EnvironmentVariablesList) -> Tuple[bool, str]:
|
|
4952
|
-
if value is None:
|
|
4953
|
-
return [True, ""]
|
|
4954
|
-
|
|
4955
|
-
if not (isinstance(value, list) and all(isinstance(x, EnvironmentVariable) for x in value)):
|
|
4956
|
-
return [False, "environment_variables must be of type EnvironmentVariablesList for Routine, got " + type(value).__name__]
|
|
4957
|
-
|
|
4958
|
-
return [True, ""]
|
|
4959
|
-
|
|
4960
|
-
def __post_init__(self):
|
|
4961
|
-
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
4962
|
-
is_valid, error_str = self.validate_id(self.id)
|
|
4963
|
-
if not is_valid:
|
|
4964
|
-
raise TypeError(error_str)
|
|
4965
|
-
is_valid, error_str = self.validate_name(self.name)
|
|
4966
|
-
if not is_valid:
|
|
4967
|
-
raise TypeError(error_str)
|
|
4968
|
-
is_valid, error_str = self.validate_environment_variables(self.environment_variables)
|
|
4969
|
-
if not is_valid:
|
|
4970
|
-
raise TypeError(error_str)
|
|
4971
|
-
|
|
4972
|
-
def parse_routine(data: object):
|
|
4973
|
-
return Routine(
|
|
4974
|
-
id=parse_str(data["id"]) if "id" in data and data.get("id") is not None else None,
|
|
4975
|
-
name=parse_str(data["name"]) if "name" in data and data.get("name") is not None else None,
|
|
4976
|
-
environment_variables=parse_environment_variables_list(data["environment_variables"]) if "environment_variables" in data and data.get("environment_variables") is not None else None,
|
|
4977
|
-
)
|
|
4978
|
-
|
|
4979
|
-
def serialize_routine(data: Routine) -> object:
|
|
4980
|
-
return {
|
|
4981
|
-
"id": None if data.id is None else serialize_str(data.id),
|
|
4982
|
-
"name": None if data.name is None else serialize_str(data.name),
|
|
4983
|
-
"environment_variables": None if data.environment_variables is None else serialize_environment_variables_list(data.environment_variables),
|
|
4984
|
-
}
|
|
4985
|
-
|
|
4986
|
-
ArmJointRotationsList = List[ArmJointRotations]
|
|
4987
|
-
|
|
4988
|
-
def parse_arm_joint_rotations_list(data: object) -> ArmJointRotationsList:
|
|
4989
|
-
return [parse_arm_joint_rotations(item) for item in data]
|
|
4990
|
-
|
|
4991
|
-
def serialize_arm_joint_rotations_list(data: ArmJointRotationsList) -> List[object]:
|
|
4992
|
-
return [serialize_arm_joint_rotations(item) for item in data]
|
|
4993
|
-
|
|
4994
4863
|
@dataclass
|
|
4995
4864
|
class JointsStateResponse:
|
|
4996
4865
|
"""Response to a query for the current state of the joints"""
|
|
@@ -5096,6 +4965,74 @@ def serialize_joints_state_response(data: JointsStateResponse) -> object:
|
|
|
5096
4965
|
"J5": None if data.J5 is None else serialize_joint_state(data.J5),
|
|
5097
4966
|
}
|
|
5098
4967
|
|
|
4968
|
+
@dataclass
|
|
4969
|
+
class Routine:
|
|
4970
|
+
"""Robot Routine containing steps to automate robot movement and operations"""
|
|
4971
|
+
id: Union[str, None] = None
|
|
4972
|
+
name: Union[str, None] = None
|
|
4973
|
+
environment_variables: Union[EnvironmentVariablesList, None] = None
|
|
4974
|
+
|
|
4975
|
+
def validate_id(self, value: str) -> Tuple[bool, str]:
|
|
4976
|
+
if value is None:
|
|
4977
|
+
return [True, ""]
|
|
4978
|
+
|
|
4979
|
+
if not isinstance(value, str):
|
|
4980
|
+
return [False, "id must be of type str for Routine, got " + type(value).__name__]
|
|
4981
|
+
|
|
4982
|
+
return [True, ""]
|
|
4983
|
+
|
|
4984
|
+
def validate_name(self, value: str) -> Tuple[bool, str]:
|
|
4985
|
+
if value is None:
|
|
4986
|
+
return [True, ""]
|
|
4987
|
+
|
|
4988
|
+
if not isinstance(value, str):
|
|
4989
|
+
return [False, "name must be of type str for Routine, got " + type(value).__name__]
|
|
4990
|
+
|
|
4991
|
+
return [True, ""]
|
|
4992
|
+
|
|
4993
|
+
def validate_environment_variables(self, value: EnvironmentVariablesList) -> Tuple[bool, str]:
|
|
4994
|
+
if value is None:
|
|
4995
|
+
return [True, ""]
|
|
4996
|
+
|
|
4997
|
+
if not (isinstance(value, list) and all(isinstance(x, EnvironmentVariable) for x in value)):
|
|
4998
|
+
return [False, "environment_variables must be of type EnvironmentVariablesList for Routine, got " + type(value).__name__]
|
|
4999
|
+
|
|
5000
|
+
return [True, ""]
|
|
5001
|
+
|
|
5002
|
+
def __post_init__(self):
|
|
5003
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5004
|
+
is_valid, error_str = self.validate_id(self.id)
|
|
5005
|
+
if not is_valid:
|
|
5006
|
+
raise TypeError(error_str)
|
|
5007
|
+
is_valid, error_str = self.validate_name(self.name)
|
|
5008
|
+
if not is_valid:
|
|
5009
|
+
raise TypeError(error_str)
|
|
5010
|
+
is_valid, error_str = self.validate_environment_variables(self.environment_variables)
|
|
5011
|
+
if not is_valid:
|
|
5012
|
+
raise TypeError(error_str)
|
|
5013
|
+
|
|
5014
|
+
def parse_routine(data: object):
|
|
5015
|
+
return Routine(
|
|
5016
|
+
id=parse_str(data["id"]) if "id" in data and data.get("id") is not None else None,
|
|
5017
|
+
name=parse_str(data["name"]) if "name" in data and data.get("name") is not None else None,
|
|
5018
|
+
environment_variables=parse_environment_variables_list(data["environment_variables"]) if "environment_variables" in data and data.get("environment_variables") is not None else None,
|
|
5019
|
+
)
|
|
5020
|
+
|
|
5021
|
+
def serialize_routine(data: Routine) -> object:
|
|
5022
|
+
return {
|
|
5023
|
+
"id": None if data.id is None else serialize_str(data.id),
|
|
5024
|
+
"name": None if data.name is None else serialize_str(data.name),
|
|
5025
|
+
"environment_variables": None if data.environment_variables is None else serialize_environment_variables_list(data.environment_variables),
|
|
5026
|
+
}
|
|
5027
|
+
|
|
5028
|
+
ArmJointRotationsList = List[ArmJointRotations]
|
|
5029
|
+
|
|
5030
|
+
def parse_arm_joint_rotations_list(data: object) -> ArmJointRotationsList:
|
|
5031
|
+
return [parse_arm_joint_rotations(item) for item in data]
|
|
5032
|
+
|
|
5033
|
+
def serialize_arm_joint_rotations_list(data: ArmJointRotationsList) -> List[object]:
|
|
5034
|
+
return [serialize_arm_joint_rotations(item) for item in data]
|
|
5035
|
+
|
|
5099
5036
|
@dataclass
|
|
5100
5037
|
class OnRobot2FG14GripperCommandRequest:
|
|
5101
5038
|
"""Control the OnRobot 2FG14 gripper (end effector) of the robot
|
|
@@ -5651,19 +5588,9 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
|
|
|
5651
5588
|
@dataclass
|
|
5652
5589
|
class FailureStateResponse:
|
|
5653
5590
|
"""Failure state response informs user of how and whether the robot may be recovered."""
|
|
5654
|
-
status: Union[RobotStatusEnum, None] = None
|
|
5655
5591
|
failed: Union[bool, None] = None
|
|
5656
5592
|
failure: Union[FailureStateDetails, None] = None
|
|
5657
5593
|
|
|
5658
|
-
def validate_status(self, value: RobotStatusEnum) -> Tuple[bool, str]:
|
|
5659
|
-
if value is None:
|
|
5660
|
-
return [True, ""]
|
|
5661
|
-
|
|
5662
|
-
if not ((isinstance(value, str) and RobotStatusEnum in ['Idle', 'RunningAdHocCommand', 'RoutineRunning', 'Antigravity', 'AntigravitySlow', 'Failure', 'Recovering']) or isinstance(value, RobotStatusEnum)):
|
|
5663
|
-
return [False, "status must be of type RobotStatusEnum for FailureStateResponse, got " + type(value).__name__]
|
|
5664
|
-
|
|
5665
|
-
return [True, ""]
|
|
5666
|
-
|
|
5667
5594
|
def validate_failed(self, value: bool) -> Tuple[bool, str]:
|
|
5668
5595
|
if value is None:
|
|
5669
5596
|
return [True, ""]
|
|
@@ -5684,9 +5611,6 @@ class FailureStateResponse:
|
|
|
5684
5611
|
|
|
5685
5612
|
def __post_init__(self):
|
|
5686
5613
|
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5687
|
-
is_valid, error_str = self.validate_status(self.status)
|
|
5688
|
-
if not is_valid:
|
|
5689
|
-
raise TypeError(error_str)
|
|
5690
5614
|
is_valid, error_str = self.validate_failed(self.failed)
|
|
5691
5615
|
if not is_valid:
|
|
5692
5616
|
raise TypeError(error_str)
|
|
@@ -5696,14 +5620,12 @@ class FailureStateResponse:
|
|
|
5696
5620
|
|
|
5697
5621
|
def parse_failure_state_response(data: object):
|
|
5698
5622
|
return FailureStateResponse(
|
|
5699
|
-
status=parse_robot_status_enum(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
5700
5623
|
failed=parse_bool(data["failed"]) if "failed" in data and data.get("failed") is not None else None,
|
|
5701
5624
|
failure=parse_failure_state_details(data["failure"]) if "failure" in data and data.get("failure") is not None else None,
|
|
5702
5625
|
)
|
|
5703
5626
|
|
|
5704
5627
|
def serialize_failure_state_response(data: FailureStateResponse) -> object:
|
|
5705
5628
|
return {
|
|
5706
|
-
"status": None if data.status is None else serialize_robot_status_enum(data.status),
|
|
5707
5629
|
"failed": None if data.failed is None else serialize_bool(data.failed),
|
|
5708
5630
|
"failure": None if data.failure is None else serialize_failure_state_details(data.failure),
|
|
5709
5631
|
}
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: standardbots
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2024924.1
|
|
4
4
|
Summary: Standard Bots RO1 Robotics API
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Standard Bots Support
|
|
@@ -10,13 +10,6 @@ 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
|
|
20
13
|
|
|
21
14
|
Standard Bots RO1 Robotics API. # noqa: E501
|
|
22
15
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/requires.txt
RENAMED
|
File without changes
|
{standardbots-2.0.0.dev1736549072 → standardbots-2.2024924.1}/standardbots.egg-info/top_level.txt
RENAMED
|
File without changes
|