standardbots 2.20241120.1__py3-none-any.whl → 2.20250128.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of standardbots might be problematic. Click here for more details.

@@ -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"""
@@ -1012,6 +1087,8 @@ class ErrorEnum(Enum):
1012
1087
  """Requested resource not found"""
1013
1088
  InvalidSpaceSpecified = "invalid_space_specified"
1014
1089
  """Space specified was invalid or not found"""
1090
+ InvalidParameters = "invalid_parameters"
1091
+ """Parameters are invalid"""
1015
1092
 
1016
1093
  def parse_error_enum(data: object) -> ErrorEnum:
1017
1094
  return ErrorEnum(data)
@@ -1125,6 +1202,14 @@ def serialize_euler_pose(data: EulerPose) -> object:
1125
1202
  "rz": None if data.rz is None else serialize_f_64(data.rz),
1126
1203
  }
1127
1204
 
1205
+ FloatList = List[float]
1206
+
1207
+ def parse_float_list(data: object) -> FloatList:
1208
+ return [parse_f_64(item) for item in data]
1209
+
1210
+ def serialize_float_list(data: FloatList) -> List[object]:
1211
+ return [serialize_f_64(item) for item in data]
1212
+
1128
1213
  class ForceUnitKind(Enum):
1129
1214
  Newtons = "newtons"
1130
1215
  """Enum Newtons = `newtons`"""
@@ -1144,6 +1229,8 @@ class GripperKindEnum(Enum):
1144
1229
  """An OnRobot 2FG14 Gripper is connected"""
1145
1230
  Onrobot3Fg15 = "onrobot_3fg15"
1146
1231
  """An OnRobot 3FG15 Gripper is connected"""
1232
+ OnrobotScrewdriver = "onrobot_screwdriver"
1233
+ """An OnRobot Screwdriver is connected"""
1147
1234
  DhAg = "dh_ag"
1148
1235
  """A DH AG Gripper is connected"""
1149
1236
  DhPgc = "dh_pgc"
@@ -1295,6 +1382,66 @@ def parse_joint_rotations(data: object) -> JointRotations:
1295
1382
  def serialize_joint_rotations(data: JointRotations) -> object:
1296
1383
  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]),]
1297
1384
 
1385
+ @dataclass
1386
+ class JointStateDisturbance:
1387
+ """Disturbance of a joint"""
1388
+ disturbance: Union[float, None] = None
1389
+ amperageDisturbance: Union[float, None] = None
1390
+ windupDisturbance: Union[float, None] = None
1391
+
1392
+ def validate_disturbance(self, value: float) -> Tuple[bool, str]:
1393
+ if value is None:
1394
+ return [True, ""]
1395
+
1396
+ if not isinstance(value, float):
1397
+ return [False, "disturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
1398
+
1399
+ return [True, ""]
1400
+
1401
+ def validate_amperageDisturbance(self, value: float) -> Tuple[bool, str]:
1402
+ if value is None:
1403
+ return [True, ""]
1404
+
1405
+ if not isinstance(value, float):
1406
+ return [False, "amperageDisturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
1407
+
1408
+ return [True, ""]
1409
+
1410
+ def validate_windupDisturbance(self, value: float) -> Tuple[bool, str]:
1411
+ if value is None:
1412
+ return [True, ""]
1413
+
1414
+ if not isinstance(value, float):
1415
+ return [False, "windupDisturbance must be of type float for JointStateDisturbance, got " + type(value).__name__]
1416
+
1417
+ return [True, ""]
1418
+
1419
+ def __post_init__(self):
1420
+ # Type check incoming model - raise error if invalid (required or wrong type)
1421
+ is_valid, error_str = self.validate_disturbance(self.disturbance)
1422
+ if not is_valid:
1423
+ raise TypeError(error_str)
1424
+ is_valid, error_str = self.validate_amperageDisturbance(self.amperageDisturbance)
1425
+ if not is_valid:
1426
+ raise TypeError(error_str)
1427
+ is_valid, error_str = self.validate_windupDisturbance(self.windupDisturbance)
1428
+ if not is_valid:
1429
+ raise TypeError(error_str)
1430
+
1431
+ def parse_joint_state_disturbance(data: object):
1432
+ return JointStateDisturbance(
1433
+ disturbance=parse_f_64(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
1434
+ amperageDisturbance=parse_f_64(data["amperageDisturbance"]) if "amperageDisturbance" in data and data.get("amperageDisturbance") is not None else None,
1435
+ windupDisturbance=parse_f_64(data["windupDisturbance"]) if "windupDisturbance" in data and data.get("windupDisturbance") is not None else None,
1436
+ )
1437
+
1438
+ def serialize_joint_state_disturbance(data: JointStateDisturbance) -> object:
1439
+ return {
1440
+ "disturbance": None if data.disturbance is None else serialize_f_64(data.disturbance),
1441
+ "amperageDisturbance": None if data.amperageDisturbance is None else serialize_f_64(data.amperageDisturbance),
1442
+ "windupDisturbance": None if data.windupDisturbance is None else serialize_f_64(data.windupDisturbance),
1443
+ }
1444
+
1298
1445
  class LinearGripDirectionEnum(Enum):
1299
1446
  Inward = "inward"
1300
1447
  """Move gripper inward to grip. Measure grip position based on interior of gripper fingers and exterior of object"""
@@ -1391,6 +1538,213 @@ def parse_on_robot_3_fg_15_control_kind_enum(data: object) -> OnRobot3FG15Contro
1391
1538
  def serialize_on_robot_3_fg_15_control_kind_enum(data: Union[OnRobot3FG15ControlKindEnum, str]) -> object:
1392
1539
  return OnRobot3FG15ControlKindEnum(data).value
1393
1540
 
1541
+ class OnRobotGripKindEnum(Enum):
1542
+ Inward = "inward"
1543
+ """Enum Inward = `inward`"""
1544
+ Outward = "outward"
1545
+ """Enum Outward = `outward`"""
1546
+
1547
+ def parse_on_robot_grip_kind_enum(data: object) -> OnRobotGripKindEnum:
1548
+ return OnRobotGripKindEnum(data)
1549
+
1550
+ def serialize_on_robot_grip_kind_enum(data: Union[OnRobotGripKindEnum, str]) -> object:
1551
+ return OnRobotGripKindEnum(data).value
1552
+
1553
+ @dataclass
1554
+ class OnRobotScrewdriverConfiguration:
1555
+ """Configuration for OnRobot Screwdriver"""
1556
+ status: Union[int, None] = None
1557
+ error: Union[str, None] = None
1558
+ busy: Union[bool, None] = None
1559
+ additional_results: Union[int, None] = None
1560
+ current_torque: Union[float, None] = None
1561
+ shank_position: Union[float, None] = None
1562
+ torque_angle_gradient: Union[float, None] = None
1563
+ achieved_torque: Union[float, None] = None
1564
+ target_force: Union[float, None] = None
1565
+ target_torque: Union[float, None] = None
1566
+ quick_changer_version: Union[int, None] = None
1567
+ uncalibrated_error: Union[bool, None] = None
1568
+
1569
+ def validate_status(self, value: int) -> Tuple[bool, str]:
1570
+ if value is None:
1571
+ return [True, ""]
1572
+
1573
+ if not isinstance(value, int):
1574
+ return [False, "status must be of type int for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1575
+
1576
+ return [True, ""]
1577
+
1578
+ def validate_error(self, value: str) -> Tuple[bool, str]:
1579
+ if value is None:
1580
+ return [True, ""]
1581
+
1582
+ if not isinstance(value, str):
1583
+ return [False, "error must be of type str for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1584
+
1585
+ return [True, ""]
1586
+
1587
+ def validate_busy(self, value: bool) -> Tuple[bool, str]:
1588
+ if value is None:
1589
+ return [True, ""]
1590
+
1591
+ if not isinstance(value, bool):
1592
+ return [False, "busy must be of type bool for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1593
+
1594
+ return [True, ""]
1595
+
1596
+ def validate_additional_results(self, value: int) -> Tuple[bool, str]:
1597
+ if value is None:
1598
+ return [True, ""]
1599
+
1600
+ if not isinstance(value, int):
1601
+ return [False, "additional_results must be of type int for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1602
+
1603
+ return [True, ""]
1604
+
1605
+ def validate_current_torque(self, value: float) -> Tuple[bool, str]:
1606
+ if value is None:
1607
+ return [True, ""]
1608
+
1609
+ if not isinstance(value, float):
1610
+ return [False, "current_torque must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1611
+
1612
+ return [True, ""]
1613
+
1614
+ def validate_shank_position(self, value: float) -> Tuple[bool, str]:
1615
+ if value is None:
1616
+ return [True, ""]
1617
+
1618
+ if not isinstance(value, float):
1619
+ return [False, "shank_position must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1620
+
1621
+ return [True, ""]
1622
+
1623
+ def validate_torque_angle_gradient(self, value: float) -> Tuple[bool, str]:
1624
+ if value is None:
1625
+ return [True, ""]
1626
+
1627
+ if not isinstance(value, float):
1628
+ return [False, "torque_angle_gradient must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1629
+
1630
+ return [True, ""]
1631
+
1632
+ def validate_achieved_torque(self, value: float) -> Tuple[bool, str]:
1633
+ if value is None:
1634
+ return [True, ""]
1635
+
1636
+ if not isinstance(value, float):
1637
+ return [False, "achieved_torque must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1638
+
1639
+ return [True, ""]
1640
+
1641
+ def validate_target_force(self, value: float) -> Tuple[bool, str]:
1642
+ if value is None:
1643
+ return [True, ""]
1644
+
1645
+ if not isinstance(value, float):
1646
+ return [False, "target_force must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1647
+
1648
+ return [True, ""]
1649
+
1650
+ def validate_target_torque(self, value: float) -> Tuple[bool, str]:
1651
+ if value is None:
1652
+ return [True, ""]
1653
+
1654
+ if not isinstance(value, float):
1655
+ return [False, "target_torque must be of type float for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1656
+
1657
+ return [True, ""]
1658
+
1659
+ def validate_quick_changer_version(self, value: int) -> Tuple[bool, str]:
1660
+ if value is None:
1661
+ return [True, ""]
1662
+
1663
+ if not isinstance(value, int):
1664
+ return [False, "quick_changer_version must be of type int for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1665
+
1666
+ return [True, ""]
1667
+
1668
+ def validate_uncalibrated_error(self, value: bool) -> Tuple[bool, str]:
1669
+ if value is None:
1670
+ return [True, ""]
1671
+
1672
+ if not isinstance(value, bool):
1673
+ return [False, "uncalibrated_error must be of type bool for OnRobotScrewdriverConfiguration, got " + type(value).__name__]
1674
+
1675
+ return [True, ""]
1676
+
1677
+ def __post_init__(self):
1678
+ # Type check incoming model - raise error if invalid (required or wrong type)
1679
+ is_valid, error_str = self.validate_status(self.status)
1680
+ if not is_valid:
1681
+ raise TypeError(error_str)
1682
+ is_valid, error_str = self.validate_error(self.error)
1683
+ if not is_valid:
1684
+ raise TypeError(error_str)
1685
+ is_valid, error_str = self.validate_busy(self.busy)
1686
+ if not is_valid:
1687
+ raise TypeError(error_str)
1688
+ is_valid, error_str = self.validate_additional_results(self.additional_results)
1689
+ if not is_valid:
1690
+ raise TypeError(error_str)
1691
+ is_valid, error_str = self.validate_current_torque(self.current_torque)
1692
+ if not is_valid:
1693
+ raise TypeError(error_str)
1694
+ is_valid, error_str = self.validate_shank_position(self.shank_position)
1695
+ if not is_valid:
1696
+ raise TypeError(error_str)
1697
+ is_valid, error_str = self.validate_torque_angle_gradient(self.torque_angle_gradient)
1698
+ if not is_valid:
1699
+ raise TypeError(error_str)
1700
+ is_valid, error_str = self.validate_achieved_torque(self.achieved_torque)
1701
+ if not is_valid:
1702
+ raise TypeError(error_str)
1703
+ is_valid, error_str = self.validate_target_force(self.target_force)
1704
+ if not is_valid:
1705
+ raise TypeError(error_str)
1706
+ is_valid, error_str = self.validate_target_torque(self.target_torque)
1707
+ if not is_valid:
1708
+ raise TypeError(error_str)
1709
+ is_valid, error_str = self.validate_quick_changer_version(self.quick_changer_version)
1710
+ if not is_valid:
1711
+ raise TypeError(error_str)
1712
+ is_valid, error_str = self.validate_uncalibrated_error(self.uncalibrated_error)
1713
+ if not is_valid:
1714
+ raise TypeError(error_str)
1715
+
1716
+ def parse_on_robot_screwdriver_configuration(data: object):
1717
+ return OnRobotScrewdriverConfiguration(
1718
+ status=parse_i_32(data["status"]) if "status" in data and data.get("status") is not None else None,
1719
+ error=parse_str(data["error"]) if "error" in data and data.get("error") is not None else None,
1720
+ busy=parse_bool(data["busy"]) if "busy" in data and data.get("busy") is not None else None,
1721
+ additional_results=parse_i_32(data["additional_results"]) if "additional_results" in data and data.get("additional_results") is not None else None,
1722
+ current_torque=parse_f_64(data["current_torque"]) if "current_torque" in data and data.get("current_torque") is not None else None,
1723
+ shank_position=parse_f_64(data["shank_position"]) if "shank_position" in data and data.get("shank_position") is not None else None,
1724
+ torque_angle_gradient=parse_f_64(data["torque_angle_gradient"]) if "torque_angle_gradient" in data and data.get("torque_angle_gradient") is not None else None,
1725
+ achieved_torque=parse_f_64(data["achieved_torque"]) if "achieved_torque" in data and data.get("achieved_torque") is not None else None,
1726
+ target_force=parse_f_64(data["target_force"]) if "target_force" in data and data.get("target_force") is not None else None,
1727
+ target_torque=parse_f_64(data["target_torque"]) if "target_torque" in data and data.get("target_torque") is not None else None,
1728
+ quick_changer_version=parse_i_32(data["quick_changer_version"]) if "quick_changer_version" in data and data.get("quick_changer_version") is not None else None,
1729
+ uncalibrated_error=parse_bool(data["uncalibrated_error"]) if "uncalibrated_error" in data and data.get("uncalibrated_error") is not None else None,
1730
+ )
1731
+
1732
+ def serialize_on_robot_screwdriver_configuration(data: OnRobotScrewdriverConfiguration) -> object:
1733
+ return {
1734
+ "status": None if data.status is None else serialize_i_32(data.status),
1735
+ "error": None if data.error is None else serialize_str(data.error),
1736
+ "busy": None if data.busy is None else serialize_bool(data.busy),
1737
+ "additional_results": None if data.additional_results is None else serialize_i_32(data.additional_results),
1738
+ "current_torque": None if data.current_torque is None else serialize_f_64(data.current_torque),
1739
+ "shank_position": None if data.shank_position is None else serialize_f_64(data.shank_position),
1740
+ "torque_angle_gradient": None if data.torque_angle_gradient is None else serialize_f_64(data.torque_angle_gradient),
1741
+ "achieved_torque": None if data.achieved_torque is None else serialize_f_64(data.achieved_torque),
1742
+ "target_force": None if data.target_force is None else serialize_f_64(data.target_force),
1743
+ "target_torque": None if data.target_torque is None else serialize_f_64(data.target_torque),
1744
+ "quick_changer_version": None if data.quick_changer_version is None else serialize_i_32(data.quick_changer_version),
1745
+ "uncalibrated_error": None if data.uncalibrated_error is None else serialize_bool(data.uncalibrated_error),
1746
+ }
1747
+
1394
1748
  class OrientationKindEnum(Enum):
1395
1749
  Quaternion = "quaternion"
1396
1750
  """Enum Quaternion = `quaternion`"""
@@ -1732,70 +2086,6 @@ def serialize_quaternion(data: Quaternion) -> object:
1732
2086
  "w": None if data.w is None else serialize_f_64(data.w),
1733
2087
  }
1734
2088
 
1735
- class RecoveryStateEnum(Enum):
1736
- Success = "Success"
1737
- """Enum Success = `Success`"""
1738
- Interrupted = "Interrupted"
1739
- """Enum Interrupted = `Interrupted`"""
1740
- NonIdle = "NonIdle"
1741
- """Enum NonIdle = `NonIdle`"""
1742
- Braked = "Braked"
1743
- """Enum Braked = `Braked`"""
1744
- PlanningFailure = "PlanningFailure"
1745
- """Enum PlanningFailure = `PlanningFailure`"""
1746
- ExecutionFailure = "ExecutionFailure"
1747
- """Enum ExecutionFailure = `ExecutionFailure`"""
1748
- ControlSystemFailure = "ControlSystemFailure"
1749
- """Enum ControlSystemFailure = `ControlSystemFailure`"""
1750
- EStopTriggered = "EStopTriggered"
1751
- """Enum EStopTriggered = `EStopTriggered`"""
1752
- GripperFailure = "GripperFailure"
1753
- """Enum GripperFailure = `GripperFailure`"""
1754
- OutOfJointLimitsFailure = "OutOfJointLimitsFailure"
1755
- """Enum OutOfJointLimitsFailure = `OutOfJointLimitsFailure`"""
1756
- CollisionFailure = "CollisionFailure"
1757
- """Enum CollisionFailure = `CollisionFailure`"""
1758
- TorqueCollisionFailure = "TorqueCollisionFailure"
1759
- """Enum TorqueCollisionFailure = `TorqueCollisionFailure`"""
1760
- InBoxingPositionFailure = "InBoxingPositionFailure"
1761
- """Enum InBoxingPositionFailure = `InBoxingPositionFailure`"""
1762
- PowerBoardCheckFailure = "PowerBoardCheckFailure"
1763
- """Enum PowerBoardCheckFailure = `PowerBoardCheckFailure`"""
1764
- MotionPlannerFailure = "MotionPlannerFailure"
1765
- """Enum MotionPlannerFailure = `MotionPlannerFailure`"""
1766
- MotionPlannerFailureStartPositionCollision = "MotionPlannerFailureStartPositionCollision"
1767
- """Enum MotionPlannerFailureStartPositionCollision = `MotionPlannerFailureStartPositionCollision`"""
1768
- IOFailure = "IOFailure"
1769
- """Enum IOFailure = `IOFailure`"""
1770
- InvalidRoutineLoadedFailure = "InvalidRoutineLoadedFailure"
1771
- """Enum InvalidRoutineLoadedFailure = `InvalidRoutineLoadedFailure`"""
1772
- InferenceFailure = "InferenceFailure"
1773
- """Enum InferenceFailure = `InferenceFailure`"""
1774
- CameraFailure = "CameraFailure"
1775
- """Enum CameraFailure = `CameraFailure`"""
1776
- HaasFailure = "HaasFailure"
1777
- """Enum HaasFailure = `HaasFailure`"""
1778
- BotmanHeartbeatLost = "BotmanHeartbeatLost"
1779
- """Enum BotmanHeartbeatLost = `BotmanHeartbeatLost`"""
1780
- InternalFailure = "InternalFailure"
1781
- """Enum InternalFailure = `InternalFailure`"""
1782
- TorqueLimitExceeded = "TorqueLimitExceeded"
1783
- """Enum TorqueLimitExceeded = `TorqueLimitExceeded`"""
1784
- StepPlayFailure = "StepPlayFailure"
1785
- """Enum StepPlayFailure = `StepPlayFailure`"""
1786
- UnbrakeFailure = "UnbrakeFailure"
1787
- """Enum UnbrakeFailure = `UnbrakeFailure`"""
1788
- WeldFailure = "WeldFailure"
1789
- """Enum WeldFailure = `WeldFailure`"""
1790
- TriggerFaultFailure = "TriggerFaultFailure"
1791
- """Enum TriggerFaultFailure = `TriggerFaultFailure`"""
1792
-
1793
- def parse_recovery_state_enum(data: object) -> RecoveryStateEnum:
1794
- return RecoveryStateEnum(data)
1795
-
1796
- def serialize_recovery_state_enum(data: Union[RecoveryStateEnum, str]) -> object:
1797
- return RecoveryStateEnum(data).value
1798
-
1799
2089
  class RecoveryTypeEnum(Enum):
1800
2090
  Recoverable = "Recoverable"
1801
2091
  """Enum Recoverable = `Recoverable`"""
@@ -1826,6 +2116,28 @@ def parse_robot_control_mode_enum(data: object) -> RobotControlModeEnum:
1826
2116
  def serialize_robot_control_mode_enum(data: Union[RobotControlModeEnum, str]) -> object:
1827
2117
  return RobotControlModeEnum(data).value
1828
2118
 
2119
+ class RobotStatusEnum(Enum):
2120
+ Idle = "Idle"
2121
+ """Enum Idle = `Idle`"""
2122
+ RunningAdHocCommand = "RunningAdHocCommand"
2123
+ """Enum RunningAdHocCommand = `RunningAdHocCommand`"""
2124
+ RoutineRunning = "RoutineRunning"
2125
+ """Enum RoutineRunning = `RoutineRunning`"""
2126
+ Antigravity = "Antigravity"
2127
+ """Enum Antigravity = `Antigravity`"""
2128
+ AntigravitySlow = "AntigravitySlow"
2129
+ """Enum AntigravitySlow = `AntigravitySlow`"""
2130
+ Failure = "Failure"
2131
+ """Enum Failure = `Failure`"""
2132
+ Recovering = "Recovering"
2133
+ """Enum Recovering = `Recovering`"""
2134
+
2135
+ def parse_robot_status_enum(data: object) -> RobotStatusEnum:
2136
+ return RobotStatusEnum(data)
2137
+
2138
+ def serialize_robot_status_enum(data: Union[RobotStatusEnum, str]) -> object:
2139
+ return RobotStatusEnum(data).value
2140
+
1829
2141
  class ROSControlStateEnum(Enum):
1830
2142
  Enabled = "enabled"
1831
2143
  """ROS control is enabled."""
@@ -2413,7 +2725,7 @@ def serialize_camera_intrinsics_response(data: CameraIntrinsicsResponse) -> obje
2413
2725
 
2414
2726
  @dataclass
2415
2727
  class CameraFrameRequest:
2416
- """Request for a single camera frame."""
2728
+ """Request for a single camera frame. In JPEG format."""
2417
2729
  camera_settings: Union[CameraSettings, None] = None
2418
2730
 
2419
2731
  def validate_camera_settings(self, value: CameraSettings) -> Tuple[bool, str]:
@@ -2717,105 +3029,30 @@ def serialize_tooltip_position_response(data: TooltipPositionResponse) -> object
2717
3029
  "pose": None if data.pose is None else serialize_cartesian_pose(data.pose),
2718
3030
  }
2719
3031
 
2720
- @dataclass
2721
- class JointState:
2722
- """State of a joint"""
2723
- braked: Union[bool, None] = None
2724
- connectionStatus: Union[ConnectionStatus, None] = None
2725
- inCollision: Union[bool, None] = None
2726
- disturbance: Union[float, None] = None
3032
+ EnvironmentVariablesList = List[EnvironmentVariable]
2727
3033
 
2728
- def validate_braked(self, value: bool) -> Tuple[bool, str]:
2729
- if value is None:
2730
- return [True, ""]
3034
+ def parse_environment_variables_list(data: object) -> EnvironmentVariablesList:
3035
+ return [parse_environment_variable(item) for item in data]
2731
3036
 
2732
- if not isinstance(value, bool):
2733
- return [False, "braked must be of type bool for JointState, got " + type(value).__name__]
3037
+ def serialize_environment_variables_list(data: EnvironmentVariablesList) -> List[object]:
3038
+ return [serialize_environment_variable(item) for item in data]
2734
3039
 
2735
- return [True, ""]
3040
+ @dataclass
3041
+ class ErrorResponse:
3042
+ """Error Response"""
3043
+ error: Union[ErrorEnum, None] = None
3044
+ message: Union[str, None] = None
2736
3045
 
2737
- def validate_connectionStatus(self, value: ConnectionStatus) -> Tuple[bool, str]:
3046
+ def validate_error(self, value: ErrorEnum) -> Tuple[bool, str]:
2738
3047
  if value is None:
2739
- return [True, ""]
3048
+ return [False, "error is required for ErrorResponse"]
2740
3049
 
2741
- if not ((isinstance(value, str) and ConnectionStatus in ['connected', 'disconnected', 'ready']) or isinstance(value, ConnectionStatus)):
2742
- return [False, "connectionStatus must be of type ConnectionStatus for JointState, got " + type(value).__name__]
3050
+ if not ((isinstance(value, str) and ErrorEnum in ['authorization_required', 'routine_must_be_running', 'api_control_required', 'robot_brakes_disengage_failed', 'robot_brakes_engage_failed', 'request_failed_validation', 'robot_not_idle', 'brakes_must_be_engaged', 'brakes_must_be_disengaged', 'equipment_no_matching', 'service_initializing', 'camera_disconnected', 'settings_validation_error', 'settings_timeout', 'internal_server_error', 'recovery_error', 'not_found', 'invalid_space_specified', 'invalid_parameters']) or isinstance(value, ErrorEnum)):
3051
+ return [False, "error must be of type ErrorEnum for ErrorResponse, got " + type(value).__name__]
2743
3052
 
2744
3053
  return [True, ""]
2745
3054
 
2746
- def validate_inCollision(self, value: bool) -> Tuple[bool, str]:
2747
- if value is None:
2748
- return [True, ""]
2749
-
2750
- if not isinstance(value, bool):
2751
- return [False, "inCollision must be of type bool for JointState, got " + type(value).__name__]
2752
-
2753
- return [True, ""]
2754
-
2755
- def validate_disturbance(self, value: float) -> Tuple[bool, str]:
2756
- if value is None:
2757
- return [True, ""]
2758
-
2759
- if not isinstance(value, float):
2760
- return [False, "disturbance must be of type float for JointState, got " + type(value).__name__]
2761
-
2762
- return [True, ""]
2763
-
2764
- def __post_init__(self):
2765
- # Type check incoming model - raise error if invalid (required or wrong type)
2766
- is_valid, error_str = self.validate_braked(self.braked)
2767
- if not is_valid:
2768
- raise TypeError(error_str)
2769
- is_valid, error_str = self.validate_connectionStatus(self.connectionStatus)
2770
- if not is_valid:
2771
- raise TypeError(error_str)
2772
- is_valid, error_str = self.validate_inCollision(self.inCollision)
2773
- if not is_valid:
2774
- raise TypeError(error_str)
2775
- is_valid, error_str = self.validate_disturbance(self.disturbance)
2776
- if not is_valid:
2777
- raise TypeError(error_str)
2778
-
2779
- def parse_joint_state(data: object):
2780
- return JointState(
2781
- braked=parse_bool(data["braked"]) if "braked" in data and data.get("braked") is not None else None,
2782
- connectionStatus=parse_connection_status(data["connectionStatus"]) if "connectionStatus" in data and data.get("connectionStatus") is not None else None,
2783
- inCollision=parse_bool(data["inCollision"]) if "inCollision" in data and data.get("inCollision") is not None else None,
2784
- disturbance=parse_f_64(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
2785
- )
2786
-
2787
- def serialize_joint_state(data: JointState) -> object:
2788
- return {
2789
- "braked": None if data.braked is None else serialize_bool(data.braked),
2790
- "connectionStatus": None if data.connectionStatus is None else serialize_connection_status(data.connectionStatus),
2791
- "inCollision": None if data.inCollision is None else serialize_bool(data.inCollision),
2792
- "disturbance": None if data.disturbance is None else serialize_f_64(data.disturbance),
2793
- }
2794
-
2795
- EnvironmentVariablesList = List[EnvironmentVariable]
2796
-
2797
- def parse_environment_variables_list(data: object) -> EnvironmentVariablesList:
2798
- return [parse_environment_variable(item) for item in data]
2799
-
2800
- def serialize_environment_variables_list(data: EnvironmentVariablesList) -> List[object]:
2801
- return [serialize_environment_variable(item) for item in data]
2802
-
2803
- @dataclass
2804
- class ErrorResponse:
2805
- """Error Response"""
2806
- error: Union[ErrorEnum, None] = None
2807
- message: Union[str, None] = None
2808
-
2809
- def validate_error(self, value: ErrorEnum) -> Tuple[bool, str]:
2810
- if value is None:
2811
- return [False, "error is required for ErrorResponse"]
2812
-
2813
- if not ((isinstance(value, str) and ErrorEnum in ['authorization_required', 'routine_must_be_running', 'api_control_required', 'robot_brakes_disengage_failed', 'robot_brakes_engage_failed', 'request_failed_validation', 'robot_not_idle', 'brakes_must_be_engaged', 'brakes_must_be_disengaged', 'equipment_no_matching', 'service_initializing', 'camera_disconnected', 'settings_validation_error', 'settings_timeout', 'internal_server_error', 'recovery_error', 'not_found', 'invalid_space_specified']) or isinstance(value, ErrorEnum)):
2814
- return [False, "error must be of type ErrorEnum for ErrorResponse, got " + type(value).__name__]
2815
-
2816
- return [True, ""]
2817
-
2818
- def validate_message(self, value: str) -> Tuple[bool, str]:
3055
+ def validate_message(self, value: str) -> Tuple[bool, str]:
2819
3056
  if value is None:
2820
3057
  return [False, "message is required for ErrorResponse"]
2821
3058
 
@@ -2907,124 +3144,244 @@ def serialize_cartesian_pose_request(data: CartesianPoseRequest) -> object:
2907
3144
  }
2908
3145
 
2909
3146
  @dataclass
2910
- class ForceUnit:
2911
- """Reusable Abstraction for force units (eg force, torque)
2912
- """
2913
- unit_kind: Union[ForceUnitKind, None] = None
2914
- value: Union[float, None] = None
3147
+ class URDFParameters:
3148
+ """The URDF parameters for the robot"""
3149
+ joint0_xyz: Union[FloatList, None] = None
3150
+ joint0_rpy: Union[FloatList, None] = None
3151
+ joint1_xyz: Union[FloatList, None] = None
3152
+ joint1_rpy: Union[FloatList, None] = None
3153
+ joint2_xyz: Union[FloatList, None] = None
3154
+ joint2_rpy: Union[FloatList, None] = None
3155
+ joint3_xyz: Union[FloatList, None] = None
3156
+ joint3_rpy: Union[FloatList, None] = None
3157
+ joint4_xyz: Union[FloatList, None] = None
3158
+ joint4_rpy: Union[FloatList, None] = None
3159
+ joint5_xyz: Union[FloatList, None] = None
3160
+ joint5_rpy: Union[FloatList, None] = None
3161
+
3162
+ def validate_joint0_xyz(self, value: FloatList) -> Tuple[bool, str]:
3163
+ if value is None:
3164
+ return [False, "joint0_xyz is required for URDFParameters"]
2915
3165
 
2916
- def validate_unit_kind(self, value: ForceUnitKind) -> Tuple[bool, str]:
3166
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3167
+ return [False, "joint0_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
3168
+
3169
+ return [True, ""]
3170
+
3171
+ def validate_joint0_rpy(self, value: FloatList) -> Tuple[bool, str]:
2917
3172
  if value is None:
2918
- return [False, "unit_kind is required for ForceUnit"]
3173
+ return [False, "joint0_rpy is required for URDFParameters"]
2919
3174
 
2920
- if not ((isinstance(value, str) and ForceUnitKind in ['newtons', 'pounds']) or isinstance(value, ForceUnitKind)):
2921
- return [False, "unit_kind must be of type ForceUnitKind for ForceUnit, got " + type(value).__name__]
3175
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3176
+ return [False, "joint0_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
2922
3177
 
2923
3178
  return [True, ""]
2924
3179
 
2925
- def validate_value(self, value: float) -> Tuple[bool, str]:
3180
+ def validate_joint1_xyz(self, value: FloatList) -> Tuple[bool, str]:
2926
3181
  if value is None:
2927
- return [True, ""]
3182
+ return [False, "joint1_xyz is required for URDFParameters"]
2928
3183
 
2929
- if not isinstance(value, float):
2930
- return [False, "value must be of type float for ForceUnit, got " + type(value).__name__]
3184
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3185
+ return [False, "joint1_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
2931
3186
 
2932
3187
  return [True, ""]
2933
3188
 
2934
- def __post_init__(self):
2935
- # Type check incoming model - raise error if invalid (required or wrong type)
2936
- is_valid, error_str = self.validate_unit_kind(self.unit_kind)
2937
- if not is_valid:
2938
- raise TypeError(error_str)
2939
- is_valid, error_str = self.validate_value(self.value)
2940
- if not is_valid:
2941
- raise TypeError(error_str)
3189
+ def validate_joint1_rpy(self, value: FloatList) -> Tuple[bool, str]:
3190
+ if value is None:
3191
+ return [False, "joint1_rpy is required for URDFParameters"]
2942
3192
 
2943
- def parse_force_unit(data: object):
2944
- return ForceUnit(
2945
- unit_kind=parse_force_unit_kind(data["unit_kind"]) if "unit_kind" in data and data.get("unit_kind") is not None else None,
2946
- value=parse_f_64(data["value"]) if "value" in data and data.get("value") is not None else None,
2947
- )
3193
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3194
+ return [False, "joint1_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
2948
3195
 
2949
- def serialize_force_unit(data: ForceUnit) -> object:
2950
- return {
2951
- "unit_kind": serialize_force_unit_kind(data.unit_kind),
2952
- "value": None if data.value is None else serialize_f_64(data.value),
2953
- }
3196
+ return [True, ""]
2954
3197
 
2955
- @dataclass
2956
- class GripperConfiguration:
2957
- """Configuration of gripper, also known as End Effector"""
2958
- kind: Union[GripperKindEnum, None] = None
2959
- dh_ag: Union[DHAGGripperConfiguration, None] = None
2960
- dh_pgc: Union[DHPGCGripperConfiguration, None] = None
2961
- dh_cgi: Union[DHCGIGripperConfiguration, None] = None
3198
+ def validate_joint2_xyz(self, value: FloatList) -> Tuple[bool, str]:
3199
+ if value is None:
3200
+ return [False, "joint2_xyz is required for URDFParameters"]
2962
3201
 
2963
- def validate_kind(self, value: GripperKindEnum) -> Tuple[bool, str]:
3202
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3203
+ return [False, "joint2_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
3204
+
3205
+ return [True, ""]
3206
+
3207
+ def validate_joint2_rpy(self, value: FloatList) -> Tuple[bool, str]:
2964
3208
  if value is None:
2965
- return [False, "kind is required for GripperConfiguration"]
3209
+ return [False, "joint2_rpy is required for URDFParameters"]
2966
3210
 
2967
- if not ((isinstance(value, str) and GripperKindEnum in ['onrobot_2fg7', 'onrobot_2fg14', 'onrobot_3fg15', 'dh_ag', 'dh_pgc', 'dh_cgi', 'schunk_egx', 'none_connected']) or isinstance(value, GripperKindEnum)):
2968
- return [False, "kind must be of type GripperKindEnum for GripperConfiguration, got " + type(value).__name__]
3211
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3212
+ return [False, "joint2_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
2969
3213
 
2970
3214
  return [True, ""]
2971
3215
 
2972
- def validate_dh_ag(self, value: DHAGGripperConfiguration) -> Tuple[bool, str]:
3216
+ def validate_joint3_xyz(self, value: FloatList) -> Tuple[bool, str]:
2973
3217
  if value is None:
2974
- return [True, ""]
3218
+ return [False, "joint3_xyz is required for URDFParameters"]
2975
3219
 
2976
- if not isinstance(value, DHAGGripperConfiguration):
2977
- return [False, "dh_ag must be of type DHAGGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
3220
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3221
+ return [False, "joint3_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
2978
3222
 
2979
3223
  return [True, ""]
2980
3224
 
2981
- def validate_dh_pgc(self, value: DHPGCGripperConfiguration) -> Tuple[bool, str]:
3225
+ def validate_joint3_rpy(self, value: FloatList) -> Tuple[bool, str]:
2982
3226
  if value is None:
2983
- return [True, ""]
3227
+ return [False, "joint3_rpy is required for URDFParameters"]
2984
3228
 
2985
- if not isinstance(value, DHPGCGripperConfiguration):
2986
- return [False, "dh_pgc must be of type DHPGCGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
3229
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3230
+ return [False, "joint3_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
2987
3231
 
2988
3232
  return [True, ""]
2989
3233
 
2990
- def validate_dh_cgi(self, value: DHCGIGripperConfiguration) -> Tuple[bool, str]:
3234
+ def validate_joint4_xyz(self, value: FloatList) -> Tuple[bool, str]:
2991
3235
  if value is None:
2992
- return [True, ""]
3236
+ return [False, "joint4_xyz is required for URDFParameters"]
2993
3237
 
2994
- if not isinstance(value, DHCGIGripperConfiguration):
2995
- return [False, "dh_cgi must be of type DHCGIGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
3238
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3239
+ return [False, "joint4_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
3240
+
3241
+ return [True, ""]
3242
+
3243
+ def validate_joint4_rpy(self, value: FloatList) -> Tuple[bool, str]:
3244
+ if value is None:
3245
+ return [False, "joint4_rpy is required for URDFParameters"]
3246
+
3247
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3248
+ return [False, "joint4_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
3249
+
3250
+ return [True, ""]
3251
+
3252
+ def validate_joint5_xyz(self, value: FloatList) -> Tuple[bool, str]:
3253
+ if value is None:
3254
+ return [False, "joint5_xyz is required for URDFParameters"]
3255
+
3256
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3257
+ return [False, "joint5_xyz must be of type FloatList for URDFParameters, got " + type(value).__name__]
3258
+
3259
+ return [True, ""]
3260
+
3261
+ def validate_joint5_rpy(self, value: FloatList) -> Tuple[bool, str]:
3262
+ if value is None:
3263
+ return [False, "joint5_rpy is required for URDFParameters"]
3264
+
3265
+ if not (isinstance(value, list) and all(isinstance(x, float) for x in value)):
3266
+ return [False, "joint5_rpy must be of type FloatList for URDFParameters, got " + type(value).__name__]
2996
3267
 
2997
3268
  return [True, ""]
2998
3269
 
2999
3270
  def __post_init__(self):
3000
3271
  # Type check incoming model - raise error if invalid (required or wrong type)
3001
- is_valid, error_str = self.validate_kind(self.kind)
3272
+ is_valid, error_str = self.validate_joint0_xyz(self.joint0_xyz)
3002
3273
  if not is_valid:
3003
3274
  raise TypeError(error_str)
3004
- is_valid, error_str = self.validate_dh_ag(self.dh_ag)
3275
+ is_valid, error_str = self.validate_joint0_rpy(self.joint0_rpy)
3005
3276
  if not is_valid:
3006
3277
  raise TypeError(error_str)
3007
- is_valid, error_str = self.validate_dh_pgc(self.dh_pgc)
3278
+ is_valid, error_str = self.validate_joint1_xyz(self.joint1_xyz)
3008
3279
  if not is_valid:
3009
3280
  raise TypeError(error_str)
3010
- is_valid, error_str = self.validate_dh_cgi(self.dh_cgi)
3281
+ is_valid, error_str = self.validate_joint1_rpy(self.joint1_rpy)
3282
+ if not is_valid:
3283
+ raise TypeError(error_str)
3284
+ is_valid, error_str = self.validate_joint2_xyz(self.joint2_xyz)
3285
+ if not is_valid:
3286
+ raise TypeError(error_str)
3287
+ is_valid, error_str = self.validate_joint2_rpy(self.joint2_rpy)
3288
+ if not is_valid:
3289
+ raise TypeError(error_str)
3290
+ is_valid, error_str = self.validate_joint3_xyz(self.joint3_xyz)
3291
+ if not is_valid:
3292
+ raise TypeError(error_str)
3293
+ is_valid, error_str = self.validate_joint3_rpy(self.joint3_rpy)
3294
+ if not is_valid:
3295
+ raise TypeError(error_str)
3296
+ is_valid, error_str = self.validate_joint4_xyz(self.joint4_xyz)
3297
+ if not is_valid:
3298
+ raise TypeError(error_str)
3299
+ is_valid, error_str = self.validate_joint4_rpy(self.joint4_rpy)
3300
+ if not is_valid:
3301
+ raise TypeError(error_str)
3302
+ is_valid, error_str = self.validate_joint5_xyz(self.joint5_xyz)
3303
+ if not is_valid:
3304
+ raise TypeError(error_str)
3305
+ is_valid, error_str = self.validate_joint5_rpy(self.joint5_rpy)
3011
3306
  if not is_valid:
3012
3307
  raise TypeError(error_str)
3013
3308
 
3014
- def parse_gripper_configuration(data: object):
3015
- return GripperConfiguration(
3016
- kind=parse_gripper_kind_enum(data["kind"]) if "kind" in data and data.get("kind") is not None else None,
3017
- dh_ag=parse_dhag_gripper_configuration(data["dh_ag"]) if "dh_ag" in data and data.get("dh_ag") is not None else None,
3018
- dh_pgc=parse_dhpgc_gripper_configuration(data["dh_pgc"]) if "dh_pgc" in data and data.get("dh_pgc") is not None else None,
3019
- dh_cgi=parse_dhcgi_gripper_configuration(data["dh_cgi"]) if "dh_cgi" in data and data.get("dh_cgi") is not None else None,
3309
+ def parse_urdf_parameters(data: object):
3310
+ return URDFParameters(
3311
+ joint0_xyz=parse_float_list(data["joint0_xyz"]) if "joint0_xyz" in data and data.get("joint0_xyz") is not None else None,
3312
+ joint0_rpy=parse_float_list(data["joint0_rpy"]) if "joint0_rpy" in data and data.get("joint0_rpy") is not None else None,
3313
+ joint1_xyz=parse_float_list(data["joint1_xyz"]) if "joint1_xyz" in data and data.get("joint1_xyz") is not None else None,
3314
+ joint1_rpy=parse_float_list(data["joint1_rpy"]) if "joint1_rpy" in data and data.get("joint1_rpy") is not None else None,
3315
+ joint2_xyz=parse_float_list(data["joint2_xyz"]) if "joint2_xyz" in data and data.get("joint2_xyz") is not None else None,
3316
+ joint2_rpy=parse_float_list(data["joint2_rpy"]) if "joint2_rpy" in data and data.get("joint2_rpy") is not None else None,
3317
+ joint3_xyz=parse_float_list(data["joint3_xyz"]) if "joint3_xyz" in data and data.get("joint3_xyz") is not None else None,
3318
+ joint3_rpy=parse_float_list(data["joint3_rpy"]) if "joint3_rpy" in data and data.get("joint3_rpy") is not None else None,
3319
+ joint4_xyz=parse_float_list(data["joint4_xyz"]) if "joint4_xyz" in data and data.get("joint4_xyz") is not None else None,
3320
+ joint4_rpy=parse_float_list(data["joint4_rpy"]) if "joint4_rpy" in data and data.get("joint4_rpy") is not None else None,
3321
+ joint5_xyz=parse_float_list(data["joint5_xyz"]) if "joint5_xyz" in data and data.get("joint5_xyz") is not None else None,
3322
+ joint5_rpy=parse_float_list(data["joint5_rpy"]) if "joint5_rpy" in data and data.get("joint5_rpy") is not None else None,
3020
3323
  )
3021
3324
 
3022
- def serialize_gripper_configuration(data: GripperConfiguration) -> object:
3325
+ def serialize_urdf_parameters(data: URDFParameters) -> object:
3023
3326
  return {
3024
- "kind": serialize_gripper_kind_enum(data.kind),
3025
- "dh_ag": None if data.dh_ag is None else serialize_dhag_gripper_configuration(data.dh_ag),
3026
- "dh_pgc": None if data.dh_pgc is None else serialize_dhpgc_gripper_configuration(data.dh_pgc),
3027
- "dh_cgi": None if data.dh_cgi is None else serialize_dhcgi_gripper_configuration(data.dh_cgi),
3327
+ "joint0_xyz": serialize_float_list(data.joint0_xyz),
3328
+ "joint0_rpy": serialize_float_list(data.joint0_rpy),
3329
+ "joint1_xyz": serialize_float_list(data.joint1_xyz),
3330
+ "joint1_rpy": serialize_float_list(data.joint1_rpy),
3331
+ "joint2_xyz": serialize_float_list(data.joint2_xyz),
3332
+ "joint2_rpy": serialize_float_list(data.joint2_rpy),
3333
+ "joint3_xyz": serialize_float_list(data.joint3_xyz),
3334
+ "joint3_rpy": serialize_float_list(data.joint3_rpy),
3335
+ "joint4_xyz": serialize_float_list(data.joint4_xyz),
3336
+ "joint4_rpy": serialize_float_list(data.joint4_rpy),
3337
+ "joint5_xyz": serialize_float_list(data.joint5_xyz),
3338
+ "joint5_rpy": serialize_float_list(data.joint5_rpy),
3339
+ }
3340
+
3341
+ @dataclass
3342
+ class ForceUnit:
3343
+ """Reusable Abstraction for force units (eg force, torque)
3344
+ """
3345
+ unit_kind: Union[ForceUnitKind, None] = None
3346
+ value: Union[float, None] = None
3347
+
3348
+ def validate_unit_kind(self, value: ForceUnitKind) -> Tuple[bool, str]:
3349
+ if value is None:
3350
+ return [False, "unit_kind is required for ForceUnit"]
3351
+
3352
+ if not ((isinstance(value, str) and ForceUnitKind in ['newtons', 'pounds']) or isinstance(value, ForceUnitKind)):
3353
+ return [False, "unit_kind must be of type ForceUnitKind for ForceUnit, got " + type(value).__name__]
3354
+
3355
+ return [True, ""]
3356
+
3357
+ def validate_value(self, value: float) -> Tuple[bool, str]:
3358
+ if value is None:
3359
+ return [True, ""]
3360
+
3361
+ if not isinstance(value, float):
3362
+ return [False, "value must be of type float for ForceUnit, got " + type(value).__name__]
3363
+
3364
+ return [True, ""]
3365
+
3366
+ def __post_init__(self):
3367
+ # Type check incoming model - raise error if invalid (required or wrong type)
3368
+ is_valid, error_str = self.validate_unit_kind(self.unit_kind)
3369
+ if not is_valid:
3370
+ raise TypeError(error_str)
3371
+ is_valid, error_str = self.validate_value(self.value)
3372
+ if not is_valid:
3373
+ raise TypeError(error_str)
3374
+
3375
+ def parse_force_unit(data: object):
3376
+ return ForceUnit(
3377
+ unit_kind=parse_force_unit_kind(data["unit_kind"]) if "unit_kind" in data and data.get("unit_kind") is not None else None,
3378
+ value=parse_f_64(data["value"]) if "value" in data and data.get("value") is not None else None,
3379
+ )
3380
+
3381
+ def serialize_force_unit(data: ForceUnit) -> object:
3382
+ return {
3383
+ "unit_kind": serialize_force_unit_kind(data.unit_kind),
3384
+ "value": None if data.value is None else serialize_f_64(data.value),
3028
3385
  }
3029
3386
 
3030
3387
  @dataclass
@@ -3179,22 +3536,97 @@ def serialize_arm_joint_rotations(data: ArmJointRotations) -> object:
3179
3536
  }
3180
3537
 
3181
3538
  @dataclass
3182
- class LinearUnit:
3183
- """Reusable Abstraction for linear units (eg distance, position, offset)
3184
- """
3185
- unit_kind: Union[LinearUnitKind, None] = None
3186
- value: Union[float, None] = None
3539
+ class JointState:
3540
+ """State of a joint"""
3541
+ braked: Union[bool, None] = None
3542
+ connectionStatus: Union[ConnectionStatus, None] = None
3543
+ inCollision: Union[bool, None] = None
3544
+ disturbance: Union[JointStateDisturbance, None] = None
3187
3545
 
3188
- def validate_unit_kind(self, value: LinearUnitKind) -> Tuple[bool, str]:
3546
+ def validate_braked(self, value: bool) -> Tuple[bool, str]:
3189
3547
  if value is None:
3190
- return [False, "unit_kind is required for LinearUnit"]
3548
+ return [True, ""]
3191
3549
 
3192
- if not ((isinstance(value, str) and LinearUnitKind in ['millimeters', 'centimeters', 'meters', 'inches', 'feet']) or isinstance(value, LinearUnitKind)):
3193
- return [False, "unit_kind must be of type LinearUnitKind for LinearUnit, got " + type(value).__name__]
3550
+ if not isinstance(value, bool):
3551
+ return [False, "braked must be of type bool for JointState, got " + type(value).__name__]
3194
3552
 
3195
3553
  return [True, ""]
3196
3554
 
3197
- def validate_value(self, value: float) -> Tuple[bool, str]:
3555
+ def validate_connectionStatus(self, value: ConnectionStatus) -> Tuple[bool, str]:
3556
+ if value is None:
3557
+ return [True, ""]
3558
+
3559
+ if not ((isinstance(value, str) and ConnectionStatus in ['connected', 'disconnected', 'ready']) or isinstance(value, ConnectionStatus)):
3560
+ return [False, "connectionStatus must be of type ConnectionStatus for JointState, got " + type(value).__name__]
3561
+
3562
+ return [True, ""]
3563
+
3564
+ def validate_inCollision(self, value: bool) -> Tuple[bool, str]:
3565
+ if value is None:
3566
+ return [True, ""]
3567
+
3568
+ if not isinstance(value, bool):
3569
+ return [False, "inCollision must be of type bool for JointState, got " + type(value).__name__]
3570
+
3571
+ return [True, ""]
3572
+
3573
+ def validate_disturbance(self, value: JointStateDisturbance) -> Tuple[bool, str]:
3574
+ if value is None:
3575
+ return [True, ""]
3576
+
3577
+ if not isinstance(value, JointStateDisturbance):
3578
+ return [False, "disturbance must be of type JointStateDisturbance for JointState, got " + type(value).__name__]
3579
+
3580
+ return [True, ""]
3581
+
3582
+ def __post_init__(self):
3583
+ # Type check incoming model - raise error if invalid (required or wrong type)
3584
+ is_valid, error_str = self.validate_braked(self.braked)
3585
+ if not is_valid:
3586
+ raise TypeError(error_str)
3587
+ is_valid, error_str = self.validate_connectionStatus(self.connectionStatus)
3588
+ if not is_valid:
3589
+ raise TypeError(error_str)
3590
+ is_valid, error_str = self.validate_inCollision(self.inCollision)
3591
+ if not is_valid:
3592
+ raise TypeError(error_str)
3593
+ is_valid, error_str = self.validate_disturbance(self.disturbance)
3594
+ if not is_valid:
3595
+ raise TypeError(error_str)
3596
+
3597
+ def parse_joint_state(data: object):
3598
+ return JointState(
3599
+ braked=parse_bool(data["braked"]) if "braked" in data and data.get("braked") is not None else None,
3600
+ connectionStatus=parse_connection_status(data["connectionStatus"]) if "connectionStatus" in data and data.get("connectionStatus") is not None else None,
3601
+ inCollision=parse_bool(data["inCollision"]) if "inCollision" in data and data.get("inCollision") is not None else None,
3602
+ disturbance=parse_joint_state_disturbance(data["disturbance"]) if "disturbance" in data and data.get("disturbance") is not None else None,
3603
+ )
3604
+
3605
+ def serialize_joint_state(data: JointState) -> object:
3606
+ return {
3607
+ "braked": None if data.braked is None else serialize_bool(data.braked),
3608
+ "connectionStatus": None if data.connectionStatus is None else serialize_connection_status(data.connectionStatus),
3609
+ "inCollision": None if data.inCollision is None else serialize_bool(data.inCollision),
3610
+ "disturbance": None if data.disturbance is None else serialize_joint_state_disturbance(data.disturbance),
3611
+ }
3612
+
3613
+ @dataclass
3614
+ class LinearUnit:
3615
+ """Reusable Abstraction for linear units (eg distance, position, offset)
3616
+ """
3617
+ unit_kind: Union[LinearUnitKind, None] = None
3618
+ value: Union[float, None] = None
3619
+
3620
+ def validate_unit_kind(self, value: LinearUnitKind) -> Tuple[bool, str]:
3621
+ if value is None:
3622
+ return [False, "unit_kind is required for LinearUnit"]
3623
+
3624
+ if not ((isinstance(value, str) and LinearUnitKind in ['millimeters', 'centimeters', 'meters', 'inches', 'feet']) or isinstance(value, LinearUnitKind)):
3625
+ return [False, "unit_kind must be of type LinearUnitKind for LinearUnit, got " + type(value).__name__]
3626
+
3627
+ return [True, ""]
3628
+
3629
+ def validate_value(self, value: float) -> Tuple[bool, str]:
3198
3630
  if value is None:
3199
3631
  return [True, ""]
3200
3632
 
@@ -3246,162 +3678,957 @@ class Position:
3246
3678
  return [True, ""]
3247
3679
 
3248
3680
  if not isinstance(value, float):
3249
- return [False, "x must be of type float for Position, got " + type(value).__name__]
3681
+ return [False, "x must be of type float for Position, got " + type(value).__name__]
3682
+
3683
+ return [True, ""]
3684
+
3685
+ def validate_y(self, value: float) -> Tuple[bool, str]:
3686
+ if value is None:
3687
+ return [True, ""]
3688
+
3689
+ if not isinstance(value, float):
3690
+ return [False, "y must be of type float for Position, got " + type(value).__name__]
3691
+
3692
+ return [True, ""]
3693
+
3694
+ def validate_z(self, value: float) -> Tuple[bool, str]:
3695
+ if value is None:
3696
+ return [True, ""]
3697
+
3698
+ if not isinstance(value, float):
3699
+ return [False, "z must be of type float for Position, got " + type(value).__name__]
3700
+
3701
+ return [True, ""]
3702
+
3703
+ def __post_init__(self):
3704
+ # Type check incoming model - raise error if invalid (required or wrong type)
3705
+ is_valid, error_str = self.validate_unit_kind(self.unit_kind)
3706
+ if not is_valid:
3707
+ raise TypeError(error_str)
3708
+ is_valid, error_str = self.validate_x(self.x)
3709
+ if not is_valid:
3710
+ raise TypeError(error_str)
3711
+ is_valid, error_str = self.validate_y(self.y)
3712
+ if not is_valid:
3713
+ raise TypeError(error_str)
3714
+ is_valid, error_str = self.validate_z(self.z)
3715
+ if not is_valid:
3716
+ raise TypeError(error_str)
3717
+
3718
+ def parse_position(data: object):
3719
+ return Position(
3720
+ unit_kind=parse_linear_unit_kind(data["unit_kind"]) if "unit_kind" in data and data.get("unit_kind") is not None else None,
3721
+ x=parse_f_64(data["x"]) if "x" in data and data.get("x") is not None else None,
3722
+ y=parse_f_64(data["y"]) if "y" in data and data.get("y") is not None else None,
3723
+ z=parse_f_64(data["z"]) if "z" in data and data.get("z") is not None else None,
3724
+ )
3725
+
3726
+ def serialize_position(data: Position) -> object:
3727
+ return {
3728
+ "unit_kind": None if data.unit_kind is None else serialize_linear_unit_kind(data.unit_kind),
3729
+ "x": None if data.x is None else serialize_f_64(data.x),
3730
+ "y": None if data.y is None else serialize_f_64(data.y),
3731
+ "z": None if data.z is None else serialize_f_64(data.z),
3732
+ }
3733
+
3734
+ @dataclass
3735
+ class SpeedProfile:
3736
+ """Speed profile/limits for arm movements"""
3737
+ max_joint_speeds: Union[MaxJointSpeeds, None] = None
3738
+ max_joint_accelerations: Union[MaxJointAcclerations, None] = None
3739
+ max_tooltip_speed: Union[float, None] = None
3740
+ base_acceleration_scaling: Union[float, None] = None
3741
+ base_velocity_scaling: Union[float, None] = None
3742
+ scaling_factor: Union[float, None] = None
3743
+
3744
+ def validate_max_joint_speeds(self, value: MaxJointSpeeds) -> Tuple[bool, str]:
3745
+ if value is None:
3746
+ return [True, ""]
3747
+
3748
+ if not (isinstance(value, tuple) and len(value) == 6):
3749
+ return [False, "max_joint_speeds must be of type MaxJointSpeeds for SpeedProfile, got " + type(value).__name__]
3750
+
3751
+ return [True, ""]
3752
+
3753
+ def validate_max_joint_accelerations(self, value: MaxJointAcclerations) -> Tuple[bool, str]:
3754
+ if value is None:
3755
+ return [True, ""]
3756
+
3757
+ if not (isinstance(value, tuple) and len(value) == 6):
3758
+ return [False, "max_joint_accelerations must be of type MaxJointAcclerations for SpeedProfile, got " + type(value).__name__]
3759
+
3760
+ return [True, ""]
3761
+
3762
+ def validate_max_tooltip_speed(self, value: float) -> Tuple[bool, str]:
3763
+ if value is None:
3764
+ return [True, ""]
3765
+
3766
+ if not isinstance(value, float):
3767
+ return [False, "max_tooltip_speed must be of type float for SpeedProfile, got " + type(value).__name__]
3768
+
3769
+ return [True, ""]
3770
+
3771
+ def validate_base_acceleration_scaling(self, value: float) -> Tuple[bool, str]:
3772
+ if value is None:
3773
+ return [True, ""]
3774
+
3775
+ if not isinstance(value, float):
3776
+ return [False, "base_acceleration_scaling must be of type float for SpeedProfile, got " + type(value).__name__]
3777
+
3778
+ return [True, ""]
3779
+
3780
+ def validate_base_velocity_scaling(self, value: float) -> Tuple[bool, str]:
3781
+ if value is None:
3782
+ return [True, ""]
3783
+
3784
+ if not isinstance(value, float):
3785
+ return [False, "base_velocity_scaling must be of type float for SpeedProfile, got " + type(value).__name__]
3786
+
3787
+ return [True, ""]
3788
+
3789
+ def validate_scaling_factor(self, value: float) -> Tuple[bool, str]:
3790
+ if value is None:
3791
+ return [True, ""]
3792
+
3793
+ if not isinstance(value, float):
3794
+ return [False, "scaling_factor must be of type float for SpeedProfile, got " + type(value).__name__]
3795
+
3796
+ return [True, ""]
3797
+
3798
+ def __post_init__(self):
3799
+ # Type check incoming model - raise error if invalid (required or wrong type)
3800
+ is_valid, error_str = self.validate_max_joint_speeds(self.max_joint_speeds)
3801
+ if not is_valid:
3802
+ raise TypeError(error_str)
3803
+ is_valid, error_str = self.validate_max_joint_accelerations(self.max_joint_accelerations)
3804
+ if not is_valid:
3805
+ raise TypeError(error_str)
3806
+ is_valid, error_str = self.validate_max_tooltip_speed(self.max_tooltip_speed)
3807
+ if not is_valid:
3808
+ raise TypeError(error_str)
3809
+ is_valid, error_str = self.validate_base_acceleration_scaling(self.base_acceleration_scaling)
3810
+ if not is_valid:
3811
+ raise TypeError(error_str)
3812
+ is_valid, error_str = self.validate_base_velocity_scaling(self.base_velocity_scaling)
3813
+ if not is_valid:
3814
+ raise TypeError(error_str)
3815
+ is_valid, error_str = self.validate_scaling_factor(self.scaling_factor)
3816
+ if not is_valid:
3817
+ raise TypeError(error_str)
3818
+
3819
+ def parse_speed_profile(data: object):
3820
+ return SpeedProfile(
3821
+ max_joint_speeds=parse_max_joint_speeds(data["max_joint_speeds"]) if "max_joint_speeds" in data and data.get("max_joint_speeds") is not None else None,
3822
+ max_joint_accelerations=parse_max_joint_acclerations(data["max_joint_accelerations"]) if "max_joint_accelerations" in data and data.get("max_joint_accelerations") is not None else None,
3823
+ max_tooltip_speed=parse_f_64(data["max_tooltip_speed"]) if "max_tooltip_speed" in data and data.get("max_tooltip_speed") is not None else None,
3824
+ base_acceleration_scaling=parse_f_64(data["base_acceleration_scaling"]) if "base_acceleration_scaling" in data and data.get("base_acceleration_scaling") is not None else None,
3825
+ base_velocity_scaling=parse_f_64(data["base_velocity_scaling"]) if "base_velocity_scaling" in data and data.get("base_velocity_scaling") is not None else None,
3826
+ scaling_factor=parse_f_64(data["scaling_factor"]) if "scaling_factor" in data and data.get("scaling_factor") is not None else None,
3827
+ )
3828
+
3829
+ def serialize_speed_profile(data: SpeedProfile) -> object:
3830
+ return {
3831
+ "max_joint_speeds": None if data.max_joint_speeds is None else serialize_max_joint_speeds(data.max_joint_speeds),
3832
+ "max_joint_accelerations": None if data.max_joint_accelerations is None else serialize_max_joint_acclerations(data.max_joint_accelerations),
3833
+ "max_tooltip_speed": None if data.max_tooltip_speed is None else serialize_f_64(data.max_tooltip_speed),
3834
+ "base_acceleration_scaling": None if data.base_acceleration_scaling is None else serialize_f_64(data.base_acceleration_scaling),
3835
+ "base_velocity_scaling": None if data.base_velocity_scaling is None else serialize_f_64(data.base_velocity_scaling),
3836
+ "scaling_factor": None if data.scaling_factor is None else serialize_f_64(data.scaling_factor),
3837
+ }
3838
+
3839
+ @dataclass
3840
+ class OnRobot2FG14GripperConfiguration:
3841
+ """Configuration for OnRobot 2FG14 Gripper"""
3842
+ grip_kind: Union[OnRobotGripKindEnum, None] = None
3843
+ grip_detected: Union[bool, None] = None
3844
+ normalized_width_inner: Union[float, None] = None
3845
+ normalized_width_outer: Union[float, None] = None
3846
+ width_inner: Union[float, None] = None
3847
+ min_width_inner: Union[float, None] = None
3848
+ max_width_inner: Union[float, None] = None
3849
+ width_outer: Union[float, None] = None
3850
+ min_width_outer: Union[float, None] = None
3851
+ max_width_outer: Union[float, None] = None
3852
+ force: Union[float, None] = None
3853
+ max_force: Union[float, None] = None
3854
+ finger_mounting_position: Union[str, None] = None
3855
+ finger_offset: Union[float, None] = None
3856
+ finger_angle: Union[float, None] = None
3857
+ finger_length: Union[float, None] = None
3858
+ finger_height: Union[float, None] = None
3859
+ linear_sensor_error: Union[bool, None] = None
3860
+ uncalibrated_error: Union[bool, None] = None
3861
+
3862
+ def validate_grip_kind(self, value: OnRobotGripKindEnum) -> Tuple[bool, str]:
3863
+ if value is None:
3864
+ return [True, ""]
3865
+
3866
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
3867
+ return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3868
+
3869
+ return [True, ""]
3870
+
3871
+ def validate_grip_detected(self, value: bool) -> Tuple[bool, str]:
3872
+ if value is None:
3873
+ return [True, ""]
3874
+
3875
+ if not isinstance(value, bool):
3876
+ return [False, "grip_detected must be of type bool for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3877
+
3878
+ return [True, ""]
3879
+
3880
+ def validate_normalized_width_inner(self, value: float) -> Tuple[bool, str]:
3881
+ if value is None:
3882
+ return [True, ""]
3883
+
3884
+ if not isinstance(value, float):
3885
+ return [False, "normalized_width_inner must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3886
+
3887
+ return [True, ""]
3888
+
3889
+ def validate_normalized_width_outer(self, value: float) -> Tuple[bool, str]:
3890
+ if value is None:
3891
+ return [True, ""]
3892
+
3893
+ if not isinstance(value, float):
3894
+ return [False, "normalized_width_outer must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3895
+
3896
+ return [True, ""]
3897
+
3898
+ def validate_width_inner(self, value: float) -> Tuple[bool, str]:
3899
+ if value is None:
3900
+ return [True, ""]
3901
+
3902
+ if not isinstance(value, float):
3903
+ return [False, "width_inner must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3904
+
3905
+ return [True, ""]
3906
+
3907
+ def validate_min_width_inner(self, value: float) -> Tuple[bool, str]:
3908
+ if value is None:
3909
+ return [True, ""]
3910
+
3911
+ if not isinstance(value, float):
3912
+ return [False, "min_width_inner must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3913
+
3914
+ return [True, ""]
3915
+
3916
+ def validate_max_width_inner(self, value: float) -> Tuple[bool, str]:
3917
+ if value is None:
3918
+ return [True, ""]
3919
+
3920
+ if not isinstance(value, float):
3921
+ return [False, "max_width_inner must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3922
+
3923
+ return [True, ""]
3924
+
3925
+ def validate_width_outer(self, value: float) -> Tuple[bool, str]:
3926
+ if value is None:
3927
+ return [True, ""]
3928
+
3929
+ if not isinstance(value, float):
3930
+ return [False, "width_outer must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3931
+
3932
+ return [True, ""]
3933
+
3934
+ def validate_min_width_outer(self, value: float) -> Tuple[bool, str]:
3935
+ if value is None:
3936
+ return [True, ""]
3937
+
3938
+ if not isinstance(value, float):
3939
+ return [False, "min_width_outer must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3940
+
3941
+ return [True, ""]
3942
+
3943
+ def validate_max_width_outer(self, value: float) -> Tuple[bool, str]:
3944
+ if value is None:
3945
+ return [True, ""]
3946
+
3947
+ if not isinstance(value, float):
3948
+ return [False, "max_width_outer must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3949
+
3950
+ return [True, ""]
3951
+
3952
+ def validate_force(self, value: float) -> Tuple[bool, str]:
3953
+ if value is None:
3954
+ return [True, ""]
3955
+
3956
+ if not isinstance(value, float):
3957
+ return [False, "force must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3958
+
3959
+ return [True, ""]
3960
+
3961
+ def validate_max_force(self, value: float) -> Tuple[bool, str]:
3962
+ if value is None:
3963
+ return [True, ""]
3964
+
3965
+ if not isinstance(value, float):
3966
+ return [False, "max_force must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3967
+
3968
+ return [True, ""]
3969
+
3970
+ def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
3971
+ if value is None:
3972
+ return [True, ""]
3973
+
3974
+ if not isinstance(value, str):
3975
+ return [False, "finger_mounting_position must be of type str for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3976
+
3977
+ return [True, ""]
3978
+
3979
+ def validate_finger_offset(self, value: float) -> Tuple[bool, str]:
3980
+ if value is None:
3981
+ return [True, ""]
3982
+
3983
+ if not isinstance(value, float):
3984
+ return [False, "finger_offset must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3985
+
3986
+ return [True, ""]
3987
+
3988
+ def validate_finger_angle(self, value: float) -> Tuple[bool, str]:
3989
+ if value is None:
3990
+ return [True, ""]
3991
+
3992
+ if not isinstance(value, float):
3993
+ return [False, "finger_angle must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3994
+
3995
+ return [True, ""]
3996
+
3997
+ def validate_finger_length(self, value: float) -> Tuple[bool, str]:
3998
+ if value is None:
3999
+ return [True, ""]
4000
+
4001
+ if not isinstance(value, float):
4002
+ return [False, "finger_length must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
4003
+
4004
+ return [True, ""]
4005
+
4006
+ def validate_finger_height(self, value: float) -> Tuple[bool, str]:
4007
+ if value is None:
4008
+ return [True, ""]
4009
+
4010
+ if not isinstance(value, float):
4011
+ return [False, "finger_height must be of type float for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
4012
+
4013
+ return [True, ""]
4014
+
4015
+ def validate_linear_sensor_error(self, value: bool) -> Tuple[bool, str]:
4016
+ if value is None:
4017
+ return [True, ""]
4018
+
4019
+ if not isinstance(value, bool):
4020
+ return [False, "linear_sensor_error must be of type bool for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
4021
+
4022
+ return [True, ""]
4023
+
4024
+ def validate_uncalibrated_error(self, value: bool) -> Tuple[bool, str]:
4025
+ if value is None:
4026
+ return [True, ""]
4027
+
4028
+ if not isinstance(value, bool):
4029
+ return [False, "uncalibrated_error must be of type bool for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
4030
+
4031
+ return [True, ""]
4032
+
4033
+ def __post_init__(self):
4034
+ # Type check incoming model - raise error if invalid (required or wrong type)
4035
+ is_valid, error_str = self.validate_grip_kind(self.grip_kind)
4036
+ if not is_valid:
4037
+ raise TypeError(error_str)
4038
+ is_valid, error_str = self.validate_grip_detected(self.grip_detected)
4039
+ if not is_valid:
4040
+ raise TypeError(error_str)
4041
+ is_valid, error_str = self.validate_normalized_width_inner(self.normalized_width_inner)
4042
+ if not is_valid:
4043
+ raise TypeError(error_str)
4044
+ is_valid, error_str = self.validate_normalized_width_outer(self.normalized_width_outer)
4045
+ if not is_valid:
4046
+ raise TypeError(error_str)
4047
+ is_valid, error_str = self.validate_width_inner(self.width_inner)
4048
+ if not is_valid:
4049
+ raise TypeError(error_str)
4050
+ is_valid, error_str = self.validate_min_width_inner(self.min_width_inner)
4051
+ if not is_valid:
4052
+ raise TypeError(error_str)
4053
+ is_valid, error_str = self.validate_max_width_inner(self.max_width_inner)
4054
+ if not is_valid:
4055
+ raise TypeError(error_str)
4056
+ is_valid, error_str = self.validate_width_outer(self.width_outer)
4057
+ if not is_valid:
4058
+ raise TypeError(error_str)
4059
+ is_valid, error_str = self.validate_min_width_outer(self.min_width_outer)
4060
+ if not is_valid:
4061
+ raise TypeError(error_str)
4062
+ is_valid, error_str = self.validate_max_width_outer(self.max_width_outer)
4063
+ if not is_valid:
4064
+ raise TypeError(error_str)
4065
+ is_valid, error_str = self.validate_force(self.force)
4066
+ if not is_valid:
4067
+ raise TypeError(error_str)
4068
+ is_valid, error_str = self.validate_max_force(self.max_force)
4069
+ if not is_valid:
4070
+ raise TypeError(error_str)
4071
+ is_valid, error_str = self.validate_finger_mounting_position(self.finger_mounting_position)
4072
+ if not is_valid:
4073
+ raise TypeError(error_str)
4074
+ is_valid, error_str = self.validate_finger_offset(self.finger_offset)
4075
+ if not is_valid:
4076
+ raise TypeError(error_str)
4077
+ is_valid, error_str = self.validate_finger_angle(self.finger_angle)
4078
+ if not is_valid:
4079
+ raise TypeError(error_str)
4080
+ is_valid, error_str = self.validate_finger_length(self.finger_length)
4081
+ if not is_valid:
4082
+ raise TypeError(error_str)
4083
+ is_valid, error_str = self.validate_finger_height(self.finger_height)
4084
+ if not is_valid:
4085
+ raise TypeError(error_str)
4086
+ is_valid, error_str = self.validate_linear_sensor_error(self.linear_sensor_error)
4087
+ if not is_valid:
4088
+ raise TypeError(error_str)
4089
+ is_valid, error_str = self.validate_uncalibrated_error(self.uncalibrated_error)
4090
+ if not is_valid:
4091
+ raise TypeError(error_str)
4092
+
4093
+ def parse_on_robot_2_fg_14_gripper_configuration(data: object):
4094
+ return OnRobot2FG14GripperConfiguration(
4095
+ grip_kind=parse_on_robot_grip_kind_enum(data["grip_kind"]) if "grip_kind" in data and data.get("grip_kind") is not None else None,
4096
+ grip_detected=parse_bool(data["grip_detected"]) if "grip_detected" in data and data.get("grip_detected") is not None else None,
4097
+ normalized_width_inner=parse_f_64(data["normalized_width_inner"]) if "normalized_width_inner" in data and data.get("normalized_width_inner") is not None else None,
4098
+ normalized_width_outer=parse_f_64(data["normalized_width_outer"]) if "normalized_width_outer" in data and data.get("normalized_width_outer") is not None else None,
4099
+ width_inner=parse_f_64(data["width_inner"]) if "width_inner" in data and data.get("width_inner") is not None else None,
4100
+ min_width_inner=parse_f_64(data["min_width_inner"]) if "min_width_inner" in data and data.get("min_width_inner") is not None else None,
4101
+ max_width_inner=parse_f_64(data["max_width_inner"]) if "max_width_inner" in data and data.get("max_width_inner") is not None else None,
4102
+ width_outer=parse_f_64(data["width_outer"]) if "width_outer" in data and data.get("width_outer") is not None else None,
4103
+ min_width_outer=parse_f_64(data["min_width_outer"]) if "min_width_outer" in data and data.get("min_width_outer") is not None else None,
4104
+ 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,
4105
+ force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
4106
+ max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
4107
+ 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,
4108
+ finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
4109
+ finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
4110
+ finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
4111
+ finger_height=parse_f_64(data["finger_height"]) if "finger_height" in data and data.get("finger_height") is not None else None,
4112
+ linear_sensor_error=parse_bool(data["linear_sensor_error"]) if "linear_sensor_error" in data and data.get("linear_sensor_error") is not None else None,
4113
+ uncalibrated_error=parse_bool(data["uncalibrated_error"]) if "uncalibrated_error" in data and data.get("uncalibrated_error") is not None else None,
4114
+ )
4115
+
4116
+ def serialize_on_robot_2_fg_14_gripper_configuration(data: OnRobot2FG14GripperConfiguration) -> object:
4117
+ return {
4118
+ "grip_kind": None if data.grip_kind is None else serialize_on_robot_grip_kind_enum(data.grip_kind),
4119
+ "grip_detected": None if data.grip_detected is None else serialize_bool(data.grip_detected),
4120
+ "normalized_width_inner": None if data.normalized_width_inner is None else serialize_f_64(data.normalized_width_inner),
4121
+ "normalized_width_outer": None if data.normalized_width_outer is None else serialize_f_64(data.normalized_width_outer),
4122
+ "width_inner": None if data.width_inner is None else serialize_f_64(data.width_inner),
4123
+ "min_width_inner": None if data.min_width_inner is None else serialize_f_64(data.min_width_inner),
4124
+ "max_width_inner": None if data.max_width_inner is None else serialize_f_64(data.max_width_inner),
4125
+ "width_outer": None if data.width_outer is None else serialize_f_64(data.width_outer),
4126
+ "min_width_outer": None if data.min_width_outer is None else serialize_f_64(data.min_width_outer),
4127
+ "max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
4128
+ "force": None if data.force is None else serialize_f_64(data.force),
4129
+ "max_force": None if data.max_force is None else serialize_f_64(data.max_force),
4130
+ "finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
4131
+ "finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
4132
+ "finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
4133
+ "finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
4134
+ "finger_height": None if data.finger_height is None else serialize_f_64(data.finger_height),
4135
+ "linear_sensor_error": None if data.linear_sensor_error is None else serialize_bool(data.linear_sensor_error),
4136
+ "uncalibrated_error": None if data.uncalibrated_error is None else serialize_bool(data.uncalibrated_error),
4137
+ }
4138
+
4139
+ @dataclass
4140
+ class OnRobot2FG7GripperConfiguration:
4141
+ """Configuration for OnRobot 2FG7 Gripper"""
4142
+ grip_kind: Union[OnRobotGripKindEnum, None] = None
4143
+ grip_detected: Union[bool, None] = None
4144
+ normalized_width_inner: Union[float, None] = None
4145
+ normalized_width_outer: Union[float, None] = None
4146
+ width_inner: Union[float, None] = None
4147
+ min_width_inner: Union[float, None] = None
4148
+ max_width_inner: Union[float, None] = None
4149
+ width_outer: Union[float, None] = None
4150
+ min_width_outer: Union[float, None] = None
4151
+ max_width_outer: Union[float, None] = None
4152
+ force: Union[float, None] = None
4153
+ max_force: Union[float, None] = None
4154
+ finger_mounting_position: Union[str, None] = None
4155
+ finger_offset: Union[float, None] = None
4156
+ finger_angle: Union[float, None] = None
4157
+ finger_length: Union[float, None] = None
4158
+ finger_height: Union[float, None] = None
4159
+ linear_sensor_error: Union[bool, None] = None
4160
+ uncalibrated_error: Union[bool, None] = None
4161
+
4162
+ def validate_grip_kind(self, value: OnRobotGripKindEnum) -> Tuple[bool, str]:
4163
+ if value is None:
4164
+ return [True, ""]
4165
+
4166
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
4167
+ return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4168
+
4169
+ return [True, ""]
4170
+
4171
+ def validate_grip_detected(self, value: bool) -> Tuple[bool, str]:
4172
+ if value is None:
4173
+ return [True, ""]
4174
+
4175
+ if not isinstance(value, bool):
4176
+ return [False, "grip_detected must be of type bool for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4177
+
4178
+ return [True, ""]
4179
+
4180
+ def validate_normalized_width_inner(self, value: float) -> Tuple[bool, str]:
4181
+ if value is None:
4182
+ return [True, ""]
4183
+
4184
+ if not isinstance(value, float):
4185
+ return [False, "normalized_width_inner must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4186
+
4187
+ return [True, ""]
4188
+
4189
+ def validate_normalized_width_outer(self, value: float) -> Tuple[bool, str]:
4190
+ if value is None:
4191
+ return [True, ""]
4192
+
4193
+ if not isinstance(value, float):
4194
+ return [False, "normalized_width_outer must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4195
+
4196
+ return [True, ""]
4197
+
4198
+ def validate_width_inner(self, value: float) -> Tuple[bool, str]:
4199
+ if value is None:
4200
+ return [True, ""]
4201
+
4202
+ if not isinstance(value, float):
4203
+ return [False, "width_inner must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4204
+
4205
+ return [True, ""]
4206
+
4207
+ def validate_min_width_inner(self, value: float) -> Tuple[bool, str]:
4208
+ if value is None:
4209
+ return [True, ""]
4210
+
4211
+ if not isinstance(value, float):
4212
+ return [False, "min_width_inner must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4213
+
4214
+ return [True, ""]
4215
+
4216
+ def validate_max_width_inner(self, value: float) -> Tuple[bool, str]:
4217
+ if value is None:
4218
+ return [True, ""]
4219
+
4220
+ if not isinstance(value, float):
4221
+ return [False, "max_width_inner must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4222
+
4223
+ return [True, ""]
4224
+
4225
+ def validate_width_outer(self, value: float) -> Tuple[bool, str]:
4226
+ if value is None:
4227
+ return [True, ""]
4228
+
4229
+ if not isinstance(value, float):
4230
+ return [False, "width_outer must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4231
+
4232
+ return [True, ""]
4233
+
4234
+ def validate_min_width_outer(self, value: float) -> Tuple[bool, str]:
4235
+ if value is None:
4236
+ return [True, ""]
4237
+
4238
+ if not isinstance(value, float):
4239
+ return [False, "min_width_outer must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4240
+
4241
+ return [True, ""]
4242
+
4243
+ def validate_max_width_outer(self, value: float) -> Tuple[bool, str]:
4244
+ if value is None:
4245
+ return [True, ""]
4246
+
4247
+ if not isinstance(value, float):
4248
+ return [False, "max_width_outer must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4249
+
4250
+ return [True, ""]
4251
+
4252
+ def validate_force(self, value: float) -> Tuple[bool, str]:
4253
+ if value is None:
4254
+ return [True, ""]
4255
+
4256
+ if not isinstance(value, float):
4257
+ return [False, "force must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4258
+
4259
+ return [True, ""]
4260
+
4261
+ def validate_max_force(self, value: float) -> Tuple[bool, str]:
4262
+ if value is None:
4263
+ return [True, ""]
4264
+
4265
+ if not isinstance(value, float):
4266
+ return [False, "max_force must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4267
+
4268
+ return [True, ""]
4269
+
4270
+ def validate_finger_mounting_position(self, value: str) -> Tuple[bool, str]:
4271
+ if value is None:
4272
+ return [True, ""]
4273
+
4274
+ if not isinstance(value, str):
4275
+ return [False, "finger_mounting_position must be of type str for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4276
+
4277
+ return [True, ""]
4278
+
4279
+ def validate_finger_offset(self, value: float) -> Tuple[bool, str]:
4280
+ if value is None:
4281
+ return [True, ""]
4282
+
4283
+ if not isinstance(value, float):
4284
+ return [False, "finger_offset must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4285
+
4286
+ return [True, ""]
4287
+
4288
+ def validate_finger_angle(self, value: float) -> Tuple[bool, str]:
4289
+ if value is None:
4290
+ return [True, ""]
4291
+
4292
+ if not isinstance(value, float):
4293
+ return [False, "finger_angle must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4294
+
4295
+ return [True, ""]
4296
+
4297
+ def validate_finger_length(self, value: float) -> Tuple[bool, str]:
4298
+ if value is None:
4299
+ return [True, ""]
4300
+
4301
+ if not isinstance(value, float):
4302
+ return [False, "finger_length must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4303
+
4304
+ return [True, ""]
4305
+
4306
+ def validate_finger_height(self, value: float) -> Tuple[bool, str]:
4307
+ if value is None:
4308
+ return [True, ""]
4309
+
4310
+ if not isinstance(value, float):
4311
+ return [False, "finger_height must be of type float for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4312
+
4313
+ return [True, ""]
4314
+
4315
+ def validate_linear_sensor_error(self, value: bool) -> Tuple[bool, str]:
4316
+ if value is None:
4317
+ return [True, ""]
4318
+
4319
+ if not isinstance(value, bool):
4320
+ return [False, "linear_sensor_error must be of type bool for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4321
+
4322
+ return [True, ""]
4323
+
4324
+ def validate_uncalibrated_error(self, value: bool) -> Tuple[bool, str]:
4325
+ if value is None:
4326
+ return [True, ""]
4327
+
4328
+ if not isinstance(value, bool):
4329
+ return [False, "uncalibrated_error must be of type bool for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4330
+
4331
+ return [True, ""]
4332
+
4333
+ def __post_init__(self):
4334
+ # Type check incoming model - raise error if invalid (required or wrong type)
4335
+ is_valid, error_str = self.validate_grip_kind(self.grip_kind)
4336
+ if not is_valid:
4337
+ raise TypeError(error_str)
4338
+ is_valid, error_str = self.validate_grip_detected(self.grip_detected)
4339
+ if not is_valid:
4340
+ raise TypeError(error_str)
4341
+ is_valid, error_str = self.validate_normalized_width_inner(self.normalized_width_inner)
4342
+ if not is_valid:
4343
+ raise TypeError(error_str)
4344
+ is_valid, error_str = self.validate_normalized_width_outer(self.normalized_width_outer)
4345
+ if not is_valid:
4346
+ raise TypeError(error_str)
4347
+ is_valid, error_str = self.validate_width_inner(self.width_inner)
4348
+ if not is_valid:
4349
+ raise TypeError(error_str)
4350
+ is_valid, error_str = self.validate_min_width_inner(self.min_width_inner)
4351
+ if not is_valid:
4352
+ raise TypeError(error_str)
4353
+ is_valid, error_str = self.validate_max_width_inner(self.max_width_inner)
4354
+ if not is_valid:
4355
+ raise TypeError(error_str)
4356
+ is_valid, error_str = self.validate_width_outer(self.width_outer)
4357
+ if not is_valid:
4358
+ raise TypeError(error_str)
4359
+ is_valid, error_str = self.validate_min_width_outer(self.min_width_outer)
4360
+ if not is_valid:
4361
+ raise TypeError(error_str)
4362
+ is_valid, error_str = self.validate_max_width_outer(self.max_width_outer)
4363
+ if not is_valid:
4364
+ raise TypeError(error_str)
4365
+ is_valid, error_str = self.validate_force(self.force)
4366
+ if not is_valid:
4367
+ raise TypeError(error_str)
4368
+ is_valid, error_str = self.validate_max_force(self.max_force)
4369
+ if not is_valid:
4370
+ raise TypeError(error_str)
4371
+ is_valid, error_str = self.validate_finger_mounting_position(self.finger_mounting_position)
4372
+ if not is_valid:
4373
+ raise TypeError(error_str)
4374
+ is_valid, error_str = self.validate_finger_offset(self.finger_offset)
4375
+ if not is_valid:
4376
+ raise TypeError(error_str)
4377
+ is_valid, error_str = self.validate_finger_angle(self.finger_angle)
4378
+ if not is_valid:
4379
+ raise TypeError(error_str)
4380
+ is_valid, error_str = self.validate_finger_length(self.finger_length)
4381
+ if not is_valid:
4382
+ raise TypeError(error_str)
4383
+ is_valid, error_str = self.validate_finger_height(self.finger_height)
4384
+ if not is_valid:
4385
+ raise TypeError(error_str)
4386
+ is_valid, error_str = self.validate_linear_sensor_error(self.linear_sensor_error)
4387
+ if not is_valid:
4388
+ raise TypeError(error_str)
4389
+ is_valid, error_str = self.validate_uncalibrated_error(self.uncalibrated_error)
4390
+ if not is_valid:
4391
+ raise TypeError(error_str)
4392
+
4393
+ def parse_on_robot_2_fg_7_gripper_configuration(data: object):
4394
+ return OnRobot2FG7GripperConfiguration(
4395
+ grip_kind=parse_on_robot_grip_kind_enum(data["grip_kind"]) if "grip_kind" in data and data.get("grip_kind") is not None else None,
4396
+ grip_detected=parse_bool(data["grip_detected"]) if "grip_detected" in data and data.get("grip_detected") is not None else None,
4397
+ normalized_width_inner=parse_f_64(data["normalized_width_inner"]) if "normalized_width_inner" in data and data.get("normalized_width_inner") is not None else None,
4398
+ normalized_width_outer=parse_f_64(data["normalized_width_outer"]) if "normalized_width_outer" in data and data.get("normalized_width_outer") is not None else None,
4399
+ width_inner=parse_f_64(data["width_inner"]) if "width_inner" in data and data.get("width_inner") is not None else None,
4400
+ min_width_inner=parse_f_64(data["min_width_inner"]) if "min_width_inner" in data and data.get("min_width_inner") is not None else None,
4401
+ max_width_inner=parse_f_64(data["max_width_inner"]) if "max_width_inner" in data and data.get("max_width_inner") is not None else None,
4402
+ width_outer=parse_f_64(data["width_outer"]) if "width_outer" in data and data.get("width_outer") is not None else None,
4403
+ min_width_outer=parse_f_64(data["min_width_outer"]) if "min_width_outer" in data and data.get("min_width_outer") is not None else None,
4404
+ 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,
4405
+ force=parse_f_64(data["force"]) if "force" in data and data.get("force") is not None else None,
4406
+ max_force=parse_f_64(data["max_force"]) if "max_force" in data and data.get("max_force") is not None else None,
4407
+ 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,
4408
+ finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
4409
+ finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
4410
+ finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
4411
+ finger_height=parse_f_64(data["finger_height"]) if "finger_height" in data and data.get("finger_height") is not None else None,
4412
+ linear_sensor_error=parse_bool(data["linear_sensor_error"]) if "linear_sensor_error" in data and data.get("linear_sensor_error") is not None else None,
4413
+ uncalibrated_error=parse_bool(data["uncalibrated_error"]) if "uncalibrated_error" in data and data.get("uncalibrated_error") is not None else None,
4414
+ )
4415
+
4416
+ def serialize_on_robot_2_fg_7_gripper_configuration(data: OnRobot2FG7GripperConfiguration) -> object:
4417
+ return {
4418
+ "grip_kind": None if data.grip_kind is None else serialize_on_robot_grip_kind_enum(data.grip_kind),
4419
+ "grip_detected": None if data.grip_detected is None else serialize_bool(data.grip_detected),
4420
+ "normalized_width_inner": None if data.normalized_width_inner is None else serialize_f_64(data.normalized_width_inner),
4421
+ "normalized_width_outer": None if data.normalized_width_outer is None else serialize_f_64(data.normalized_width_outer),
4422
+ "width_inner": None if data.width_inner is None else serialize_f_64(data.width_inner),
4423
+ "min_width_inner": None if data.min_width_inner is None else serialize_f_64(data.min_width_inner),
4424
+ "max_width_inner": None if data.max_width_inner is None else serialize_f_64(data.max_width_inner),
4425
+ "width_outer": None if data.width_outer is None else serialize_f_64(data.width_outer),
4426
+ "min_width_outer": None if data.min_width_outer is None else serialize_f_64(data.min_width_outer),
4427
+ "max_width_outer": None if data.max_width_outer is None else serialize_f_64(data.max_width_outer),
4428
+ "force": None if data.force is None else serialize_f_64(data.force),
4429
+ "max_force": None if data.max_force is None else serialize_f_64(data.max_force),
4430
+ "finger_mounting_position": None if data.finger_mounting_position is None else serialize_str(data.finger_mounting_position),
4431
+ "finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
4432
+ "finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
4433
+ "finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
4434
+ "finger_height": None if data.finger_height is None else serialize_f_64(data.finger_height),
4435
+ "linear_sensor_error": None if data.linear_sensor_error is None else serialize_bool(data.linear_sensor_error),
4436
+ "uncalibrated_error": None if data.uncalibrated_error is None else serialize_bool(data.uncalibrated_error),
4437
+ }
4438
+
4439
+ @dataclass
4440
+ class OnRobot3FG15GripperConfiguration:
4441
+ """Configuration for OnRobot 3FG15 Gripper"""
4442
+ grip_detected: Union[bool, None] = None
4443
+ force_grip_detected: Union[bool, None] = None
4444
+ calibration_ok: Union[bool, None] = None
4445
+ diameter: Union[float, None] = None
4446
+ grip_kind: Union[OnRobotGripKindEnum, None] = None
4447
+ finger_angle: Union[float, None] = None
4448
+ force_applied_fraction: Union[float, None] = None
4449
+ force_applied_newtons: Union[float, None] = None
4450
+ target_force_newtons: Union[float, None] = None
4451
+ finger_length: Union[float, None] = None
4452
+ finger_mounting_position: Union[float, None] = None
4453
+ finger_offset: Union[float, None] = None
4454
+
4455
+ def validate_grip_detected(self, value: bool) -> Tuple[bool, str]:
4456
+ if value is None:
4457
+ return [True, ""]
4458
+
4459
+ if not isinstance(value, bool):
4460
+ return [False, "grip_detected must be of type bool for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
4461
+
4462
+ return [True, ""]
4463
+
4464
+ def validate_force_grip_detected(self, value: bool) -> Tuple[bool, str]:
4465
+ if value is None:
4466
+ return [True, ""]
4467
+
4468
+ if not isinstance(value, bool):
4469
+ return [False, "force_grip_detected must be of type bool for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
4470
+
4471
+ return [True, ""]
4472
+
4473
+ def validate_calibration_ok(self, value: bool) -> Tuple[bool, str]:
4474
+ if value is None:
4475
+ return [True, ""]
4476
+
4477
+ if not isinstance(value, bool):
4478
+ return [False, "calibration_ok must be of type bool for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
4479
+
4480
+ return [True, ""]
4481
+
4482
+ def validate_diameter(self, value: float) -> Tuple[bool, str]:
4483
+ if value is None:
4484
+ return [True, ""]
4485
+
4486
+ if not isinstance(value, float):
4487
+ return [False, "diameter must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3250
4488
 
3251
4489
  return [True, ""]
3252
4490
 
3253
- def validate_y(self, value: float) -> Tuple[bool, str]:
4491
+ def validate_grip_kind(self, value: OnRobotGripKindEnum) -> Tuple[bool, str]:
3254
4492
  if value is None:
3255
4493
  return [True, ""]
3256
4494
 
3257
- if not isinstance(value, float):
3258
- return [False, "y must be of type float for Position, got " + type(value).__name__]
4495
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
4496
+ return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3259
4497
 
3260
4498
  return [True, ""]
3261
4499
 
3262
- def validate_z(self, value: float) -> Tuple[bool, str]:
4500
+ def validate_finger_angle(self, value: float) -> Tuple[bool, str]:
3263
4501
  if value is None:
3264
4502
  return [True, ""]
3265
4503
 
3266
4504
  if not isinstance(value, float):
3267
- return [False, "z must be of type float for Position, got " + type(value).__name__]
4505
+ return [False, "finger_angle must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3268
4506
 
3269
4507
  return [True, ""]
3270
4508
 
3271
- def __post_init__(self):
3272
- # Type check incoming model - raise error if invalid (required or wrong type)
3273
- is_valid, error_str = self.validate_unit_kind(self.unit_kind)
3274
- if not is_valid:
3275
- raise TypeError(error_str)
3276
- is_valid, error_str = self.validate_x(self.x)
3277
- if not is_valid:
3278
- raise TypeError(error_str)
3279
- is_valid, error_str = self.validate_y(self.y)
3280
- if not is_valid:
3281
- raise TypeError(error_str)
3282
- is_valid, error_str = self.validate_z(self.z)
3283
- if not is_valid:
3284
- raise TypeError(error_str)
3285
-
3286
- def parse_position(data: object):
3287
- return Position(
3288
- unit_kind=parse_linear_unit_kind(data["unit_kind"]) if "unit_kind" in data and data.get("unit_kind") is not None else None,
3289
- x=parse_f_64(data["x"]) if "x" in data and data.get("x") is not None else None,
3290
- y=parse_f_64(data["y"]) if "y" in data and data.get("y") is not None else None,
3291
- z=parse_f_64(data["z"]) if "z" in data and data.get("z") is not None else None,
3292
- )
3293
-
3294
- def serialize_position(data: Position) -> object:
3295
- return {
3296
- "unit_kind": None if data.unit_kind is None else serialize_linear_unit_kind(data.unit_kind),
3297
- "x": None if data.x is None else serialize_f_64(data.x),
3298
- "y": None if data.y is None else serialize_f_64(data.y),
3299
- "z": None if data.z is None else serialize_f_64(data.z),
3300
- }
3301
-
3302
- @dataclass
3303
- class SpeedProfile:
3304
- """Speed profile/limits for arm movements"""
3305
- max_joint_speeds: Union[MaxJointSpeeds, None] = None
3306
- max_joint_accelerations: Union[MaxJointAcclerations, None] = None
3307
- max_tooltip_speed: Union[float, None] = None
3308
- base_acceleration_scaling: Union[float, None] = None
3309
- base_velocity_scaling: Union[float, None] = None
3310
- scaling_factor: Union[float, None] = None
3311
-
3312
- def validate_max_joint_speeds(self, value: MaxJointSpeeds) -> Tuple[bool, str]:
4509
+ def validate_force_applied_fraction(self, value: float) -> Tuple[bool, str]:
3313
4510
  if value is None:
3314
4511
  return [True, ""]
3315
4512
 
3316
- if not (isinstance(value, tuple) and len(value) == 6):
3317
- return [False, "max_joint_speeds must be of type MaxJointSpeeds for SpeedProfile, got " + type(value).__name__]
4513
+ if not isinstance(value, float):
4514
+ return [False, "force_applied_fraction must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3318
4515
 
3319
4516
  return [True, ""]
3320
4517
 
3321
- def validate_max_joint_accelerations(self, value: MaxJointAcclerations) -> Tuple[bool, str]:
4518
+ def validate_force_applied_newtons(self, value: float) -> Tuple[bool, str]:
3322
4519
  if value is None:
3323
4520
  return [True, ""]
3324
4521
 
3325
- if not (isinstance(value, tuple) and len(value) == 6):
3326
- return [False, "max_joint_accelerations must be of type MaxJointAcclerations for SpeedProfile, got " + type(value).__name__]
4522
+ if not isinstance(value, float):
4523
+ return [False, "force_applied_newtons must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3327
4524
 
3328
4525
  return [True, ""]
3329
4526
 
3330
- def validate_max_tooltip_speed(self, value: float) -> Tuple[bool, str]:
4527
+ def validate_target_force_newtons(self, value: float) -> Tuple[bool, str]:
3331
4528
  if value is None:
3332
4529
  return [True, ""]
3333
4530
 
3334
4531
  if not isinstance(value, float):
3335
- return [False, "max_tooltip_speed must be of type float for SpeedProfile, got " + type(value).__name__]
4532
+ return [False, "target_force_newtons must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3336
4533
 
3337
4534
  return [True, ""]
3338
4535
 
3339
- def validate_base_acceleration_scaling(self, value: float) -> Tuple[bool, str]:
4536
+ def validate_finger_length(self, value: float) -> Tuple[bool, str]:
3340
4537
  if value is None:
3341
4538
  return [True, ""]
3342
4539
 
3343
4540
  if not isinstance(value, float):
3344
- return [False, "base_acceleration_scaling must be of type float for SpeedProfile, got " + type(value).__name__]
4541
+ return [False, "finger_length must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3345
4542
 
3346
4543
  return [True, ""]
3347
4544
 
3348
- def validate_base_velocity_scaling(self, value: float) -> Tuple[bool, str]:
4545
+ def validate_finger_mounting_position(self, value: float) -> Tuple[bool, str]:
3349
4546
  if value is None:
3350
4547
  return [True, ""]
3351
4548
 
3352
4549
  if not isinstance(value, float):
3353
- return [False, "base_velocity_scaling must be of type float for SpeedProfile, got " + type(value).__name__]
4550
+ return [False, "finger_mounting_position must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3354
4551
 
3355
4552
  return [True, ""]
3356
4553
 
3357
- def validate_scaling_factor(self, value: float) -> Tuple[bool, str]:
4554
+ def validate_finger_offset(self, value: float) -> Tuple[bool, str]:
3358
4555
  if value is None:
3359
4556
  return [True, ""]
3360
4557
 
3361
4558
  if not isinstance(value, float):
3362
- return [False, "scaling_factor must be of type float for SpeedProfile, got " + type(value).__name__]
4559
+ return [False, "finger_offset must be of type float for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
3363
4560
 
3364
4561
  return [True, ""]
3365
4562
 
3366
4563
  def __post_init__(self):
3367
4564
  # Type check incoming model - raise error if invalid (required or wrong type)
3368
- is_valid, error_str = self.validate_max_joint_speeds(self.max_joint_speeds)
4565
+ is_valid, error_str = self.validate_grip_detected(self.grip_detected)
3369
4566
  if not is_valid:
3370
4567
  raise TypeError(error_str)
3371
- is_valid, error_str = self.validate_max_joint_accelerations(self.max_joint_accelerations)
4568
+ is_valid, error_str = self.validate_force_grip_detected(self.force_grip_detected)
3372
4569
  if not is_valid:
3373
4570
  raise TypeError(error_str)
3374
- is_valid, error_str = self.validate_max_tooltip_speed(self.max_tooltip_speed)
4571
+ is_valid, error_str = self.validate_calibration_ok(self.calibration_ok)
3375
4572
  if not is_valid:
3376
4573
  raise TypeError(error_str)
3377
- is_valid, error_str = self.validate_base_acceleration_scaling(self.base_acceleration_scaling)
4574
+ is_valid, error_str = self.validate_diameter(self.diameter)
3378
4575
  if not is_valid:
3379
4576
  raise TypeError(error_str)
3380
- is_valid, error_str = self.validate_base_velocity_scaling(self.base_velocity_scaling)
4577
+ is_valid, error_str = self.validate_grip_kind(self.grip_kind)
3381
4578
  if not is_valid:
3382
4579
  raise TypeError(error_str)
3383
- is_valid, error_str = self.validate_scaling_factor(self.scaling_factor)
4580
+ is_valid, error_str = self.validate_finger_angle(self.finger_angle)
4581
+ if not is_valid:
4582
+ raise TypeError(error_str)
4583
+ is_valid, error_str = self.validate_force_applied_fraction(self.force_applied_fraction)
4584
+ if not is_valid:
4585
+ raise TypeError(error_str)
4586
+ is_valid, error_str = self.validate_force_applied_newtons(self.force_applied_newtons)
4587
+ if not is_valid:
4588
+ raise TypeError(error_str)
4589
+ is_valid, error_str = self.validate_target_force_newtons(self.target_force_newtons)
4590
+ if not is_valid:
4591
+ raise TypeError(error_str)
4592
+ is_valid, error_str = self.validate_finger_length(self.finger_length)
4593
+ if not is_valid:
4594
+ raise TypeError(error_str)
4595
+ is_valid, error_str = self.validate_finger_mounting_position(self.finger_mounting_position)
4596
+ if not is_valid:
4597
+ raise TypeError(error_str)
4598
+ is_valid, error_str = self.validate_finger_offset(self.finger_offset)
3384
4599
  if not is_valid:
3385
4600
  raise TypeError(error_str)
3386
4601
 
3387
- def parse_speed_profile(data: object):
3388
- return SpeedProfile(
3389
- max_joint_speeds=parse_max_joint_speeds(data["max_joint_speeds"]) if "max_joint_speeds" in data and data.get("max_joint_speeds") is not None else None,
3390
- max_joint_accelerations=parse_max_joint_acclerations(data["max_joint_accelerations"]) if "max_joint_accelerations" in data and data.get("max_joint_accelerations") is not None else None,
3391
- max_tooltip_speed=parse_f_64(data["max_tooltip_speed"]) if "max_tooltip_speed" in data and data.get("max_tooltip_speed") is not None else None,
3392
- base_acceleration_scaling=parse_f_64(data["base_acceleration_scaling"]) if "base_acceleration_scaling" in data and data.get("base_acceleration_scaling") is not None else None,
3393
- base_velocity_scaling=parse_f_64(data["base_velocity_scaling"]) if "base_velocity_scaling" in data and data.get("base_velocity_scaling") is not None else None,
3394
- scaling_factor=parse_f_64(data["scaling_factor"]) if "scaling_factor" in data and data.get("scaling_factor") is not None else None,
4602
+ def parse_on_robot_3_fg_15_gripper_configuration(data: object):
4603
+ return OnRobot3FG15GripperConfiguration(
4604
+ grip_detected=parse_bool(data["grip_detected"]) if "grip_detected" in data and data.get("grip_detected") is not None else None,
4605
+ force_grip_detected=parse_bool(data["force_grip_detected"]) if "force_grip_detected" in data and data.get("force_grip_detected") is not None else None,
4606
+ calibration_ok=parse_bool(data["calibration_ok"]) if "calibration_ok" in data and data.get("calibration_ok") is not None else None,
4607
+ diameter=parse_f_64(data["diameter"]) if "diameter" in data and data.get("diameter") is not None else None,
4608
+ grip_kind=parse_on_robot_grip_kind_enum(data["grip_kind"]) if "grip_kind" in data and data.get("grip_kind") is not None else None,
4609
+ finger_angle=parse_f_64(data["finger_angle"]) if "finger_angle" in data and data.get("finger_angle") is not None else None,
4610
+ force_applied_fraction=parse_f_64(data["force_applied_fraction"]) if "force_applied_fraction" in data and data.get("force_applied_fraction") is not None else None,
4611
+ force_applied_newtons=parse_f_64(data["force_applied_newtons"]) if "force_applied_newtons" in data and data.get("force_applied_newtons") is not None else None,
4612
+ target_force_newtons=parse_f_64(data["target_force_newtons"]) if "target_force_newtons" in data and data.get("target_force_newtons") is not None else None,
4613
+ finger_length=parse_f_64(data["finger_length"]) if "finger_length" in data and data.get("finger_length") is not None else None,
4614
+ 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,
4615
+ finger_offset=parse_f_64(data["finger_offset"]) if "finger_offset" in data and data.get("finger_offset") is not None else None,
3395
4616
  )
3396
4617
 
3397
- def serialize_speed_profile(data: SpeedProfile) -> object:
4618
+ def serialize_on_robot_3_fg_15_gripper_configuration(data: OnRobot3FG15GripperConfiguration) -> object:
3398
4619
  return {
3399
- "max_joint_speeds": None if data.max_joint_speeds is None else serialize_max_joint_speeds(data.max_joint_speeds),
3400
- "max_joint_accelerations": None if data.max_joint_accelerations is None else serialize_max_joint_acclerations(data.max_joint_accelerations),
3401
- "max_tooltip_speed": None if data.max_tooltip_speed is None else serialize_f_64(data.max_tooltip_speed),
3402
- "base_acceleration_scaling": None if data.base_acceleration_scaling is None else serialize_f_64(data.base_acceleration_scaling),
3403
- "base_velocity_scaling": None if data.base_velocity_scaling is None else serialize_f_64(data.base_velocity_scaling),
3404
- "scaling_factor": None if data.scaling_factor is None else serialize_f_64(data.scaling_factor),
4620
+ "grip_detected": None if data.grip_detected is None else serialize_bool(data.grip_detected),
4621
+ "force_grip_detected": None if data.force_grip_detected is None else serialize_bool(data.force_grip_detected),
4622
+ "calibration_ok": None if data.calibration_ok is None else serialize_bool(data.calibration_ok),
4623
+ "diameter": None if data.diameter is None else serialize_f_64(data.diameter),
4624
+ "grip_kind": None if data.grip_kind is None else serialize_on_robot_grip_kind_enum(data.grip_kind),
4625
+ "finger_angle": None if data.finger_angle is None else serialize_f_64(data.finger_angle),
4626
+ "force_applied_fraction": None if data.force_applied_fraction is None else serialize_f_64(data.force_applied_fraction),
4627
+ "force_applied_newtons": None if data.force_applied_newtons is None else serialize_f_64(data.force_applied_newtons),
4628
+ "target_force_newtons": None if data.target_force_newtons is None else serialize_f_64(data.target_force_newtons),
4629
+ "finger_length": None if data.finger_length is None else serialize_f_64(data.finger_length),
4630
+ "finger_mounting_position": None if data.finger_mounting_position is None else serialize_f_64(data.finger_mounting_position),
4631
+ "finger_offset": None if data.finger_offset is None else serialize_f_64(data.finger_offset),
3405
4632
  }
3406
4633
 
3407
4634
  PlanesList = List[Plane]
@@ -3502,36 +4729,6 @@ def serialize_orientation(data: Orientation) -> object:
3502
4729
  "quaternion": None if data.quaternion is None else serialize_quaternion(data.quaternion),
3503
4730
  }
3504
4731
 
3505
- @dataclass
3506
- class RecoveryStatusResponse:
3507
- """Recovery status response"""
3508
- state: Union[RecoveryStateEnum, None] = None
3509
-
3510
- def validate_state(self, value: RecoveryStateEnum) -> Tuple[bool, str]:
3511
- if value is None:
3512
- return [True, ""]
3513
-
3514
- 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)):
3515
- return [False, "state must be of type RecoveryStateEnum for RecoveryStatusResponse, got " + type(value).__name__]
3516
-
3517
- return [True, ""]
3518
-
3519
- def __post_init__(self):
3520
- # Type check incoming model - raise error if invalid (required or wrong type)
3521
- is_valid, error_str = self.validate_state(self.state)
3522
- if not is_valid:
3523
- raise TypeError(error_str)
3524
-
3525
- def parse_recovery_status_response(data: object):
3526
- return RecoveryStatusResponse(
3527
- state=parse_recovery_state_enum(data["state"]) if "state" in data and data.get("state") is not None else None,
3528
- )
3529
-
3530
- def serialize_recovery_status_response(data: RecoveryStatusResponse) -> object:
3531
- return {
3532
- "state": None if data.state is None else serialize_recovery_state_enum(data.state),
3533
- }
3534
-
3535
4732
  @dataclass
3536
4733
  class FailureStateDetails:
3537
4734
  """Failure state details."""
@@ -3861,75 +5058,203 @@ class StatusHealthResponse:
3861
5058
  health: Union[StatusHealthEnum, None] = None
3862
5059
  build: Union[StatusVersionData, None] = None
3863
5060
 
3864
- def validate_health(self, value: StatusHealthEnum) -> Tuple[bool, str]:
5061
+ def validate_health(self, value: StatusHealthEnum) -> Tuple[bool, str]:
5062
+ if value is None:
5063
+ return [True, ""]
5064
+
5065
+ if not ((isinstance(value, str) and StatusHealthEnum in ['ok', 'warning', 'error']) or isinstance(value, StatusHealthEnum)):
5066
+ return [False, "health must be of type StatusHealthEnum for StatusHealthResponse, got " + type(value).__name__]
5067
+
5068
+ return [True, ""]
5069
+
5070
+ def validate_build(self, value: StatusVersionData) -> Tuple[bool, str]:
5071
+ if value is None:
5072
+ return [True, ""]
5073
+
5074
+ if not isinstance(value, StatusVersionData):
5075
+ return [False, "build must be of type StatusVersionData for StatusHealthResponse, got " + type(value).__name__]
5076
+
5077
+ return [True, ""]
5078
+
5079
+ def __post_init__(self):
5080
+ # Type check incoming model - raise error if invalid (required or wrong type)
5081
+ is_valid, error_str = self.validate_health(self.health)
5082
+ if not is_valid:
5083
+ raise TypeError(error_str)
5084
+ is_valid, error_str = self.validate_build(self.build)
5085
+ if not is_valid:
5086
+ raise TypeError(error_str)
5087
+
5088
+ def parse_status_health_response(data: object):
5089
+ return StatusHealthResponse(
5090
+ health=parse_status_health_enum(data["health"]) if "health" in data and data.get("health") is not None else None,
5091
+ build=parse_status_version_data(data["build"]) if "build" in data and data.get("build") is not None else None,
5092
+ )
5093
+
5094
+ def serialize_status_health_response(data: StatusHealthResponse) -> object:
5095
+ return {
5096
+ "health": None if data.health is None else serialize_status_health_enum(data.health),
5097
+ "build": None if data.build is None else serialize_status_version_data(data.build),
5098
+ }
5099
+
5100
+ @dataclass
5101
+ class ArmPositionUpdateRequestResponseEventStreamDetails:
5102
+ """Specify how the response should be sent
5103
+ """
5104
+ subscriptions: Union[ArmPositionUpdateRequestResponseEventStreamSubscriptionsList, None] = None
5105
+
5106
+ def validate_subscriptions(self, value: ArmPositionUpdateRequestResponseEventStreamSubscriptionsList) -> Tuple[bool, str]:
5107
+ if value is None:
5108
+ return [False, "subscriptions is required for ArmPositionUpdateRequestResponseEventStreamDetails"]
5109
+
5110
+ if not (isinstance(value, list) and all(((isinstance(x, str) and ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum in ['all', 'events', 'positions']) or isinstance(x, ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum)) for x in value)):
5111
+ return [False, "subscriptions must be of type ArmPositionUpdateRequestResponseEventStreamSubscriptionsList for ArmPositionUpdateRequestResponseEventStreamDetails, got " + type(value).__name__]
5112
+
5113
+ return [True, ""]
5114
+
5115
+ def __post_init__(self):
5116
+ # Type check incoming model - raise error if invalid (required or wrong type)
5117
+ is_valid, error_str = self.validate_subscriptions(self.subscriptions)
5118
+ if not is_valid:
5119
+ raise TypeError(error_str)
5120
+
5121
+ def parse_arm_position_update_request_response_event_stream_details(data: object):
5122
+ return ArmPositionUpdateRequestResponseEventStreamDetails(
5123
+ subscriptions=parse_arm_position_update_request_response_event_stream_subscriptions_list(data["subscriptions"]) if "subscriptions" in data and data.get("subscriptions") is not None else None,
5124
+ )
5125
+
5126
+ def serialize_arm_position_update_request_response_event_stream_details(data: ArmPositionUpdateRequestResponseEventStreamDetails) -> object:
5127
+ return {
5128
+ "subscriptions": serialize_arm_position_update_request_response_event_stream_subscriptions_list(data.subscriptions),
5129
+ }
5130
+
5131
+ @dataclass
5132
+ class Routine:
5133
+ """Robot Routine containing steps to automate robot movement and operations"""
5134
+ id: Union[str, None] = None
5135
+ name: Union[str, None] = None
5136
+ environment_variables: Union[EnvironmentVariablesList, None] = None
5137
+
5138
+ def validate_id(self, value: str) -> Tuple[bool, str]:
5139
+ if value is None:
5140
+ return [True, ""]
5141
+
5142
+ if not isinstance(value, str):
5143
+ return [False, "id must be of type str for Routine, got " + type(value).__name__]
5144
+
5145
+ return [True, ""]
5146
+
5147
+ def validate_name(self, value: str) -> Tuple[bool, str]:
5148
+ if value is None:
5149
+ return [True, ""]
5150
+
5151
+ if not isinstance(value, str):
5152
+ return [False, "name must be of type str for Routine, got " + type(value).__name__]
5153
+
5154
+ return [True, ""]
5155
+
5156
+ def validate_environment_variables(self, value: EnvironmentVariablesList) -> Tuple[bool, str]:
5157
+ if value is None:
5158
+ return [True, ""]
5159
+
5160
+ if not (isinstance(value, list) and all(isinstance(x, EnvironmentVariable) for x in value)):
5161
+ return [False, "environment_variables must be of type EnvironmentVariablesList for Routine, got " + type(value).__name__]
5162
+
5163
+ return [True, ""]
5164
+
5165
+ def __post_init__(self):
5166
+ # Type check incoming model - raise error if invalid (required or wrong type)
5167
+ is_valid, error_str = self.validate_id(self.id)
5168
+ if not is_valid:
5169
+ raise TypeError(error_str)
5170
+ is_valid, error_str = self.validate_name(self.name)
5171
+ if not is_valid:
5172
+ raise TypeError(error_str)
5173
+ is_valid, error_str = self.validate_environment_variables(self.environment_variables)
5174
+ if not is_valid:
5175
+ raise TypeError(error_str)
5176
+
5177
+ def parse_routine(data: object):
5178
+ return Routine(
5179
+ id=parse_str(data["id"]) if "id" in data and data.get("id") is not None else None,
5180
+ name=parse_str(data["name"]) if "name" in data and data.get("name") is not None else None,
5181
+ environment_variables=parse_environment_variables_list(data["environment_variables"]) if "environment_variables" in data and data.get("environment_variables") is not None else None,
5182
+ )
5183
+
5184
+ def serialize_routine(data: Routine) -> object:
5185
+ return {
5186
+ "id": None if data.id is None else serialize_str(data.id),
5187
+ "name": None if data.name is None else serialize_str(data.name),
5188
+ "environment_variables": None if data.environment_variables is None else serialize_environment_variables_list(data.environment_variables),
5189
+ }
5190
+
5191
+ @dataclass
5192
+ class CalibrationData:
5193
+ """The result of a calibration"""
5194
+ timestamp: Union[str, None] = None
5195
+ armSerial: Union[str, None] = None
5196
+ urdfParameters: Union[URDFParameters, None] = None
5197
+
5198
+ def validate_timestamp(self, value: str) -> Tuple[bool, str]:
5199
+ if value is None:
5200
+ return [False, "timestamp is required for CalibrationData"]
5201
+
5202
+ if not isinstance(value, str):
5203
+ return [False, "timestamp must be of type str for CalibrationData, got " + type(value).__name__]
5204
+
5205
+ return [True, ""]
5206
+
5207
+ def validate_armSerial(self, value: str) -> Tuple[bool, str]:
3865
5208
  if value is None:
3866
- return [True, ""]
5209
+ return [False, "armSerial is required for CalibrationData"]
3867
5210
 
3868
- if not ((isinstance(value, str) and StatusHealthEnum in ['ok', 'warning', 'error']) or isinstance(value, StatusHealthEnum)):
3869
- return [False, "health must be of type StatusHealthEnum for StatusHealthResponse, got " + type(value).__name__]
5211
+ if not isinstance(value, str):
5212
+ return [False, "armSerial must be of type str for CalibrationData, got " + type(value).__name__]
3870
5213
 
3871
5214
  return [True, ""]
3872
5215
 
3873
- def validate_build(self, value: StatusVersionData) -> Tuple[bool, str]:
5216
+ def validate_urdfParameters(self, value: URDFParameters) -> Tuple[bool, str]:
3874
5217
  if value is None:
3875
- return [True, ""]
5218
+ return [False, "urdfParameters is required for CalibrationData"]
3876
5219
 
3877
- if not isinstance(value, StatusVersionData):
3878
- return [False, "build must be of type StatusVersionData for StatusHealthResponse, got " + type(value).__name__]
5220
+ if not isinstance(value, URDFParameters):
5221
+ return [False, "urdfParameters must be of type URDFParameters for CalibrationData, got " + type(value).__name__]
3879
5222
 
3880
5223
  return [True, ""]
3881
5224
 
3882
5225
  def __post_init__(self):
3883
5226
  # Type check incoming model - raise error if invalid (required or wrong type)
3884
- is_valid, error_str = self.validate_health(self.health)
5227
+ is_valid, error_str = self.validate_timestamp(self.timestamp)
3885
5228
  if not is_valid:
3886
5229
  raise TypeError(error_str)
3887
- is_valid, error_str = self.validate_build(self.build)
5230
+ is_valid, error_str = self.validate_armSerial(self.armSerial)
5231
+ if not is_valid:
5232
+ raise TypeError(error_str)
5233
+ is_valid, error_str = self.validate_urdfParameters(self.urdfParameters)
3888
5234
  if not is_valid:
3889
5235
  raise TypeError(error_str)
3890
5236
 
3891
- def parse_status_health_response(data: object):
3892
- return StatusHealthResponse(
3893
- health=parse_status_health_enum(data["health"]) if "health" in data and data.get("health") is not None else None,
3894
- build=parse_status_version_data(data["build"]) if "build" in data and data.get("build") is not None else None,
5237
+ def parse_calibration_data(data: object):
5238
+ return CalibrationData(
5239
+ timestamp=parse_str(data["timestamp"]) if "timestamp" in data and data.get("timestamp") is not None else None,
5240
+ armSerial=parse_str(data["armSerial"]) if "armSerial" in data and data.get("armSerial") is not None else None,
5241
+ urdfParameters=parse_urdf_parameters(data["urdfParameters"]) if "urdfParameters" in data and data.get("urdfParameters") is not None else None,
3895
5242
  )
3896
5243
 
3897
- def serialize_status_health_response(data: StatusHealthResponse) -> object:
5244
+ def serialize_calibration_data(data: CalibrationData) -> object:
3898
5245
  return {
3899
- "health": None if data.health is None else serialize_status_health_enum(data.health),
3900
- "build": None if data.build is None else serialize_status_version_data(data.build),
5246
+ "timestamp": serialize_str(data.timestamp),
5247
+ "armSerial": serialize_str(data.armSerial),
5248
+ "urdfParameters": serialize_urdf_parameters(data.urdfParameters),
3901
5249
  }
3902
5250
 
3903
- @dataclass
3904
- class ArmPositionUpdateRequestResponseEventStreamDetails:
3905
- """Specify how the response should be sent
3906
- """
3907
- subscriptions: Union[ArmPositionUpdateRequestResponseEventStreamSubscriptionsList, None] = None
3908
-
3909
- def validate_subscriptions(self, value: ArmPositionUpdateRequestResponseEventStreamSubscriptionsList) -> Tuple[bool, str]:
3910
- if value is None:
3911
- return [False, "subscriptions is required for ArmPositionUpdateRequestResponseEventStreamDetails"]
3912
-
3913
- if not (isinstance(value, list) and all(((isinstance(x, str) and ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum in ['all', 'events', 'positions']) or isinstance(x, ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum)) for x in value)):
3914
- return [False, "subscriptions must be of type ArmPositionUpdateRequestResponseEventStreamSubscriptionsList for ArmPositionUpdateRequestResponseEventStreamDetails, got " + type(value).__name__]
3915
-
3916
- return [True, ""]
3917
-
3918
- def __post_init__(self):
3919
- # Type check incoming model - raise error if invalid (required or wrong type)
3920
- is_valid, error_str = self.validate_subscriptions(self.subscriptions)
3921
- if not is_valid:
3922
- raise TypeError(error_str)
5251
+ ArmJointRotationsList = List[ArmJointRotations]
3923
5252
 
3924
- def parse_arm_position_update_request_response_event_stream_details(data: object):
3925
- return ArmPositionUpdateRequestResponseEventStreamDetails(
3926
- subscriptions=parse_arm_position_update_request_response_event_stream_subscriptions_list(data["subscriptions"]) if "subscriptions" in data and data.get("subscriptions") is not None else None,
3927
- )
5253
+ def parse_arm_joint_rotations_list(data: object) -> ArmJointRotationsList:
5254
+ return [parse_arm_joint_rotations(item) for item in data]
3928
5255
 
3929
- def serialize_arm_position_update_request_response_event_stream_details(data: ArmPositionUpdateRequestResponseEventStreamDetails) -> object:
3930
- return {
3931
- "subscriptions": serialize_arm_position_update_request_response_event_stream_subscriptions_list(data.subscriptions),
3932
- }
5256
+ def serialize_arm_joint_rotations_list(data: ArmJointRotationsList) -> List[object]:
5257
+ return [serialize_arm_joint_rotations(item) for item in data]
3933
5258
 
3934
5259
  @dataclass
3935
5260
  class JointsStateResponse:
@@ -4036,74 +5361,6 @@ def serialize_joints_state_response(data: JointsStateResponse) -> object:
4036
5361
  "J5": None if data.J5 is None else serialize_joint_state(data.J5),
4037
5362
  }
4038
5363
 
4039
- @dataclass
4040
- class Routine:
4041
- """Robot Routine containing steps to automate robot movement and operations"""
4042
- id: Union[str, None] = None
4043
- name: Union[str, None] = None
4044
- environment_variables: Union[EnvironmentVariablesList, None] = None
4045
-
4046
- def validate_id(self, value: str) -> Tuple[bool, str]:
4047
- if value is None:
4048
- return [True, ""]
4049
-
4050
- if not isinstance(value, str):
4051
- return [False, "id must be of type str for Routine, got " + type(value).__name__]
4052
-
4053
- return [True, ""]
4054
-
4055
- def validate_name(self, value: str) -> Tuple[bool, str]:
4056
- if value is None:
4057
- return [True, ""]
4058
-
4059
- if not isinstance(value, str):
4060
- return [False, "name must be of type str for Routine, got " + type(value).__name__]
4061
-
4062
- return [True, ""]
4063
-
4064
- def validate_environment_variables(self, value: EnvironmentVariablesList) -> Tuple[bool, str]:
4065
- if value is None:
4066
- return [True, ""]
4067
-
4068
- if not (isinstance(value, list) and all(isinstance(x, EnvironmentVariable) for x in value)):
4069
- return [False, "environment_variables must be of type EnvironmentVariablesList for Routine, got " + type(value).__name__]
4070
-
4071
- return [True, ""]
4072
-
4073
- def __post_init__(self):
4074
- # Type check incoming model - raise error if invalid (required or wrong type)
4075
- is_valid, error_str = self.validate_id(self.id)
4076
- if not is_valid:
4077
- raise TypeError(error_str)
4078
- is_valid, error_str = self.validate_name(self.name)
4079
- if not is_valid:
4080
- raise TypeError(error_str)
4081
- is_valid, error_str = self.validate_environment_variables(self.environment_variables)
4082
- if not is_valid:
4083
- raise TypeError(error_str)
4084
-
4085
- def parse_routine(data: object):
4086
- return Routine(
4087
- id=parse_str(data["id"]) if "id" in data and data.get("id") is not None else None,
4088
- name=parse_str(data["name"]) if "name" in data and data.get("name") is not None else None,
4089
- environment_variables=parse_environment_variables_list(data["environment_variables"]) if "environment_variables" in data and data.get("environment_variables") is not None else None,
4090
- )
4091
-
4092
- def serialize_routine(data: Routine) -> object:
4093
- return {
4094
- "id": None if data.id is None else serialize_str(data.id),
4095
- "name": None if data.name is None else serialize_str(data.name),
4096
- "environment_variables": None if data.environment_variables is None else serialize_environment_variables_list(data.environment_variables),
4097
- }
4098
-
4099
- ArmJointRotationsList = List[ArmJointRotations]
4100
-
4101
- def parse_arm_joint_rotations_list(data: object) -> ArmJointRotationsList:
4102
- return [parse_arm_joint_rotations(item) for item in data]
4103
-
4104
- def serialize_arm_joint_rotations_list(data: ArmJointRotationsList) -> List[object]:
4105
- return [serialize_arm_joint_rotations(item) for item in data]
4106
-
4107
5364
  @dataclass
4108
5365
  class OnRobot2FG14GripperCommandRequest:
4109
5366
  """Control the OnRobot 2FG14 gripper (end effector) of the robot
@@ -4378,6 +5635,141 @@ def serialize_schunk_e_gx_gripper_command_request(data: SchunkEGxGripperCommandR
4378
5635
  "control_kind": serialize_schunk_e_gx_control_kind_enum(data.control_kind),
4379
5636
  }
4380
5637
 
5638
+ @dataclass
5639
+ class GripperConfiguration:
5640
+ """Configuration of gripper, also known as End Effector"""
5641
+ kind: Union[GripperKindEnum, None] = None
5642
+ onrobot_2fg7: Union[OnRobot2FG7GripperConfiguration, None] = None
5643
+ onrobot_2fg14: Union[OnRobot2FG14GripperConfiguration, None] = None
5644
+ onrobot_3fg15: Union[OnRobot3FG15GripperConfiguration, None] = None
5645
+ onrobot_screwdriver: Union[OnRobotScrewdriverConfiguration, None] = None
5646
+ dh_ag: Union[DHAGGripperConfiguration, None] = None
5647
+ dh_pgc: Union[DHPGCGripperConfiguration, None] = None
5648
+ dh_cgi: Union[DHCGIGripperConfiguration, None] = None
5649
+
5650
+ def validate_kind(self, value: GripperKindEnum) -> Tuple[bool, str]:
5651
+ if value is None:
5652
+ return [False, "kind is required for GripperConfiguration"]
5653
+
5654
+ if not ((isinstance(value, str) and GripperKindEnum in ['onrobot_2fg7', 'onrobot_2fg14', 'onrobot_3fg15', 'onrobot_screwdriver', 'dh_ag', 'dh_pgc', 'dh_cgi', 'schunk_egx', 'none_connected']) or isinstance(value, GripperKindEnum)):
5655
+ return [False, "kind must be of type GripperKindEnum for GripperConfiguration, got " + type(value).__name__]
5656
+
5657
+ return [True, ""]
5658
+
5659
+ def validate_onrobot_2fg7(self, value: OnRobot2FG7GripperConfiguration) -> Tuple[bool, str]:
5660
+ if value is None:
5661
+ return [True, ""]
5662
+
5663
+ if not isinstance(value, OnRobot2FG7GripperConfiguration):
5664
+ return [False, "onrobot_2fg7 must be of type OnRobot2FG7GripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5665
+
5666
+ return [True, ""]
5667
+
5668
+ def validate_onrobot_2fg14(self, value: OnRobot2FG14GripperConfiguration) -> Tuple[bool, str]:
5669
+ if value is None:
5670
+ return [True, ""]
5671
+
5672
+ if not isinstance(value, OnRobot2FG14GripperConfiguration):
5673
+ return [False, "onrobot_2fg14 must be of type OnRobot2FG14GripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5674
+
5675
+ return [True, ""]
5676
+
5677
+ def validate_onrobot_3fg15(self, value: OnRobot3FG15GripperConfiguration) -> Tuple[bool, str]:
5678
+ if value is None:
5679
+ return [True, ""]
5680
+
5681
+ if not isinstance(value, OnRobot3FG15GripperConfiguration):
5682
+ return [False, "onrobot_3fg15 must be of type OnRobot3FG15GripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5683
+
5684
+ return [True, ""]
5685
+
5686
+ def validate_onrobot_screwdriver(self, value: OnRobotScrewdriverConfiguration) -> Tuple[bool, str]:
5687
+ if value is None:
5688
+ return [True, ""]
5689
+
5690
+ if not isinstance(value, OnRobotScrewdriverConfiguration):
5691
+ return [False, "onrobot_screwdriver must be of type OnRobotScrewdriverConfiguration for GripperConfiguration, got " + type(value).__name__]
5692
+
5693
+ return [True, ""]
5694
+
5695
+ def validate_dh_ag(self, value: DHAGGripperConfiguration) -> Tuple[bool, str]:
5696
+ if value is None:
5697
+ return [True, ""]
5698
+
5699
+ if not isinstance(value, DHAGGripperConfiguration):
5700
+ return [False, "dh_ag must be of type DHAGGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5701
+
5702
+ return [True, ""]
5703
+
5704
+ def validate_dh_pgc(self, value: DHPGCGripperConfiguration) -> Tuple[bool, str]:
5705
+ if value is None:
5706
+ return [True, ""]
5707
+
5708
+ if not isinstance(value, DHPGCGripperConfiguration):
5709
+ return [False, "dh_pgc must be of type DHPGCGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5710
+
5711
+ return [True, ""]
5712
+
5713
+ def validate_dh_cgi(self, value: DHCGIGripperConfiguration) -> Tuple[bool, str]:
5714
+ if value is None:
5715
+ return [True, ""]
5716
+
5717
+ if not isinstance(value, DHCGIGripperConfiguration):
5718
+ return [False, "dh_cgi must be of type DHCGIGripperConfiguration for GripperConfiguration, got " + type(value).__name__]
5719
+
5720
+ return [True, ""]
5721
+
5722
+ def __post_init__(self):
5723
+ # Type check incoming model - raise error if invalid (required or wrong type)
5724
+ is_valid, error_str = self.validate_kind(self.kind)
5725
+ if not is_valid:
5726
+ raise TypeError(error_str)
5727
+ is_valid, error_str = self.validate_onrobot_2fg7(self.onrobot_2fg7)
5728
+ if not is_valid:
5729
+ raise TypeError(error_str)
5730
+ is_valid, error_str = self.validate_onrobot_2fg14(self.onrobot_2fg14)
5731
+ if not is_valid:
5732
+ raise TypeError(error_str)
5733
+ is_valid, error_str = self.validate_onrobot_3fg15(self.onrobot_3fg15)
5734
+ if not is_valid:
5735
+ raise TypeError(error_str)
5736
+ is_valid, error_str = self.validate_onrobot_screwdriver(self.onrobot_screwdriver)
5737
+ if not is_valid:
5738
+ raise TypeError(error_str)
5739
+ is_valid, error_str = self.validate_dh_ag(self.dh_ag)
5740
+ if not is_valid:
5741
+ raise TypeError(error_str)
5742
+ is_valid, error_str = self.validate_dh_pgc(self.dh_pgc)
5743
+ if not is_valid:
5744
+ raise TypeError(error_str)
5745
+ is_valid, error_str = self.validate_dh_cgi(self.dh_cgi)
5746
+ if not is_valid:
5747
+ raise TypeError(error_str)
5748
+
5749
+ def parse_gripper_configuration(data: object):
5750
+ return GripperConfiguration(
5751
+ kind=parse_gripper_kind_enum(data["kind"]) if "kind" in data and data.get("kind") is not None else None,
5752
+ onrobot_2fg7=parse_on_robot_2_fg_7_gripper_configuration(data["onrobot_2fg7"]) if "onrobot_2fg7" in data and data.get("onrobot_2fg7") is not None else None,
5753
+ onrobot_2fg14=parse_on_robot_2_fg_14_gripper_configuration(data["onrobot_2fg14"]) if "onrobot_2fg14" in data and data.get("onrobot_2fg14") is not None else None,
5754
+ onrobot_3fg15=parse_on_robot_3_fg_15_gripper_configuration(data["onrobot_3fg15"]) if "onrobot_3fg15" in data and data.get("onrobot_3fg15") is not None else None,
5755
+ onrobot_screwdriver=parse_on_robot_screwdriver_configuration(data["onrobot_screwdriver"]) if "onrobot_screwdriver" in data and data.get("onrobot_screwdriver") is not None else None,
5756
+ dh_ag=parse_dhag_gripper_configuration(data["dh_ag"]) if "dh_ag" in data and data.get("dh_ag") is not None else None,
5757
+ dh_pgc=parse_dhpgc_gripper_configuration(data["dh_pgc"]) if "dh_pgc" in data and data.get("dh_pgc") is not None else None,
5758
+ dh_cgi=parse_dhcgi_gripper_configuration(data["dh_cgi"]) if "dh_cgi" in data and data.get("dh_cgi") is not None else None,
5759
+ )
5760
+
5761
+ def serialize_gripper_configuration(data: GripperConfiguration) -> object:
5762
+ return {
5763
+ "kind": serialize_gripper_kind_enum(data.kind),
5764
+ "onrobot_2fg7": None if data.onrobot_2fg7 is None else serialize_on_robot_2_fg_7_gripper_configuration(data.onrobot_2fg7),
5765
+ "onrobot_2fg14": None if data.onrobot_2fg14 is None else serialize_on_robot_2_fg_14_gripper_configuration(data.onrobot_2fg14),
5766
+ "onrobot_3fg15": None if data.onrobot_3fg15 is None else serialize_on_robot_3_fg_15_gripper_configuration(data.onrobot_3fg15),
5767
+ "onrobot_screwdriver": None if data.onrobot_screwdriver is None else serialize_on_robot_screwdriver_configuration(data.onrobot_screwdriver),
5768
+ "dh_ag": None if data.dh_ag is None else serialize_dhag_gripper_configuration(data.dh_ag),
5769
+ "dh_pgc": None if data.dh_pgc is None else serialize_dhpgc_gripper_configuration(data.dh_pgc),
5770
+ "dh_cgi": None if data.dh_cgi is None else serialize_dhcgi_gripper_configuration(data.dh_cgi),
5771
+ }
5772
+
4381
5773
  @dataclass
4382
5774
  class PlanesPaginatedResponse:
4383
5775
  """Paginated response containing plane data"""
@@ -4524,9 +5916,19 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
4524
5916
  @dataclass
4525
5917
  class FailureStateResponse:
4526
5918
  """Failure state response informs user of how and whether the robot may be recovered."""
5919
+ status: Union[RobotStatusEnum, None] = None
4527
5920
  failed: Union[bool, None] = None
4528
5921
  failure: Union[FailureStateDetails, None] = None
4529
5922
 
5923
+ def validate_status(self, value: RobotStatusEnum) -> Tuple[bool, str]:
5924
+ if value is None:
5925
+ return [True, ""]
5926
+
5927
+ if not ((isinstance(value, str) and RobotStatusEnum in ['Idle', 'RunningAdHocCommand', 'RoutineRunning', 'Antigravity', 'AntigravitySlow', 'Failure', 'Recovering']) or isinstance(value, RobotStatusEnum)):
5928
+ return [False, "status must be of type RobotStatusEnum for FailureStateResponse, got " + type(value).__name__]
5929
+
5930
+ return [True, ""]
5931
+
4530
5932
  def validate_failed(self, value: bool) -> Tuple[bool, str]:
4531
5933
  if value is None:
4532
5934
  return [True, ""]
@@ -4547,6 +5949,9 @@ class FailureStateResponse:
4547
5949
 
4548
5950
  def __post_init__(self):
4549
5951
  # Type check incoming model - raise error if invalid (required or wrong type)
5952
+ is_valid, error_str = self.validate_status(self.status)
5953
+ if not is_valid:
5954
+ raise TypeError(error_str)
4550
5955
  is_valid, error_str = self.validate_failed(self.failed)
4551
5956
  if not is_valid:
4552
5957
  raise TypeError(error_str)
@@ -4556,12 +5961,14 @@ class FailureStateResponse:
4556
5961
 
4557
5962
  def parse_failure_state_response(data: object):
4558
5963
  return FailureStateResponse(
5964
+ status=parse_robot_status_enum(data["status"]) if "status" in data and data.get("status") is not None else None,
4559
5965
  failed=parse_bool(data["failed"]) if "failed" in data and data.get("failed") is not None else None,
4560
5966
  failure=parse_failure_state_details(data["failure"]) if "failure" in data and data.get("failure") is not None else None,
4561
5967
  )
4562
5968
 
4563
5969
  def serialize_failure_state_response(data: FailureStateResponse) -> object:
4564
5970
  return {
5971
+ "status": None if data.status is None else serialize_robot_status_enum(data.status),
4565
5972
  "failed": None if data.failed is None else serialize_bool(data.failed),
4566
5973
  "failure": None if data.failure is None else serialize_failure_state_details(data.failure),
4567
5974
  }
@@ -4650,6 +6057,36 @@ def parse_routines_list(data: object) -> RoutinesList:
4650
6057
  def serialize_routines_list(data: RoutinesList) -> List[object]:
4651
6058
  return [serialize_routine(item) for item in data]
4652
6059
 
6060
+ @dataclass
6061
+ class ActiveCalibrationResponse:
6062
+ """The response to an active calibration request"""
6063
+ calibrationData: Union[CalibrationData, None] = None
6064
+
6065
+ def validate_calibrationData(self, value: CalibrationData) -> Tuple[bool, str]:
6066
+ if value is None:
6067
+ return [True, ""]
6068
+
6069
+ if not isinstance(value, CalibrationData):
6070
+ return [False, "calibrationData must be of type CalibrationData for ActiveCalibrationResponse, got " + type(value).__name__]
6071
+
6072
+ return [True, ""]
6073
+
6074
+ def __post_init__(self):
6075
+ # Type check incoming model - raise error if invalid (required or wrong type)
6076
+ is_valid, error_str = self.validate_calibrationData(self.calibrationData)
6077
+ if not is_valid:
6078
+ raise TypeError(error_str)
6079
+
6080
+ def parse_active_calibration_response(data: object):
6081
+ return ActiveCalibrationResponse(
6082
+ calibrationData=parse_calibration_data(data["calibrationData"]) if "calibrationData" in data and data.get("calibrationData") is not None else None,
6083
+ )
6084
+
6085
+ def serialize_active_calibration_response(data: ActiveCalibrationResponse) -> object:
6086
+ return {
6087
+ "calibrationData": None if data.calibrationData is None else serialize_calibration_data(data.calibrationData),
6088
+ }
6089
+
4653
6090
  @dataclass
4654
6091
  class GripperCommandRequest:
4655
6092
  """Control the gripper (end effector) of the robot
@@ -4667,7 +6104,7 @@ class GripperCommandRequest:
4667
6104
  if value is None:
4668
6105
  return [False, "kind is required for GripperCommandRequest"]
4669
6106
 
4670
- if not ((isinstance(value, str) and GripperKindEnum in ['onrobot_2fg7', 'onrobot_2fg14', 'onrobot_3fg15', 'dh_ag', 'dh_pgc', 'dh_cgi', 'schunk_egx', 'none_connected']) or isinstance(value, GripperKindEnum)):
6107
+ if not ((isinstance(value, str) and GripperKindEnum in ['onrobot_2fg7', 'onrobot_2fg14', 'onrobot_3fg15', 'onrobot_screwdriver', 'dh_ag', 'dh_pgc', 'dh_cgi', 'schunk_egx', 'none_connected']) or isinstance(value, GripperKindEnum)):
4671
6108
  return [False, "kind must be of type GripperKindEnum for GripperCommandRequest, got " + type(value).__name__]
4672
6109
 
4673
6110
  return [True, ""]
@@ -4793,7 +6230,7 @@ class Space:
4793
6230
  kind: Union[str, None] = None
4794
6231
  name: Union[str, None] = None
4795
6232
  description: Union[str, None] = None
4796
- isGlobal: Union[bool, None] = None
6233
+ is_global: Union[bool, None] = None
4797
6234
  positions: Union[SpacePositionsMap, None] = None
4798
6235
 
4799
6236
  def validate_id(self, value: str) -> Tuple[bool, str]:
@@ -4832,12 +6269,12 @@ class Space:
4832
6269
 
4833
6270
  return [True, ""]
4834
6271
 
4835
- def validate_isGlobal(self, value: bool) -> Tuple[bool, str]:
6272
+ def validate_is_global(self, value: bool) -> Tuple[bool, str]:
4836
6273
  if value is None:
4837
6274
  return [True, ""]
4838
6275
 
4839
6276
  if not isinstance(value, bool):
4840
- return [False, "isGlobal must be of type bool for Space, got " + type(value).__name__]
6277
+ return [False, "is_global must be of type bool for Space, got " + type(value).__name__]
4841
6278
 
4842
6279
  return [True, ""]
4843
6280
 
@@ -4864,7 +6301,7 @@ class Space:
4864
6301
  is_valid, error_str = self.validate_description(self.description)
4865
6302
  if not is_valid:
4866
6303
  raise TypeError(error_str)
4867
- is_valid, error_str = self.validate_isGlobal(self.isGlobal)
6304
+ is_valid, error_str = self.validate_is_global(self.is_global)
4868
6305
  if not is_valid:
4869
6306
  raise TypeError(error_str)
4870
6307
  is_valid, error_str = self.validate_positions(self.positions)
@@ -4877,7 +6314,7 @@ def parse_space(data: object):
4877
6314
  kind=parse_str(data["kind"]) if "kind" in data and data.get("kind") is not None else None,
4878
6315
  name=parse_str(data["name"]) if "name" in data and data.get("name") is not None else None,
4879
6316
  description=parse_str(data["description"]) if "description" in data and data.get("description") is not None else None,
4880
- isGlobal=parse_bool(data["isGlobal"]) if "isGlobal" in data and data.get("isGlobal") is not None else None,
6317
+ is_global=parse_bool(data["is_global"]) if "is_global" in data and data.get("is_global") is not None else None,
4881
6318
  positions=parse_space_positions_map(data["positions"]) if "positions" in data and data.get("positions") is not None else None,
4882
6319
  )
4883
6320
 
@@ -4887,7 +6324,7 @@ def serialize_space(data: Space) -> object:
4887
6324
  "kind": None if data.kind is None else serialize_str(data.kind),
4888
6325
  "name": None if data.name is None else serialize_str(data.name),
4889
6326
  "description": None if data.description is None else serialize_str(data.description),
4890
- "isGlobal": None if data.isGlobal is None else serialize_bool(data.isGlobal),
6327
+ "is_global": None if data.is_global is None else serialize_bool(data.is_global),
4891
6328
  "positions": None if data.positions is None else serialize_space_positions_map(data.positions),
4892
6329
  }
4893
6330