standardbots 2.20250921.1__tar.gz → 2.20250923.2__tar.gz

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

Potentially problematic release.


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

Files changed (18) hide show
  1. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/PKG-INFO +1 -1
  2. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/setup.py +1 -1
  3. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots/auto_generated/apis.py +1 -1
  4. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots/auto_generated/models.py +82 -6
  5. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots.egg-info/PKG-INFO +1 -1
  6. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/tests/test_apis.py +12 -11
  7. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/README.md +0 -0
  8. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/setup.cfg +0 -0
  9. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots/__init__.py +0 -0
  10. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots/auto_generated/__init__.py +0 -0
  11. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots.egg-info/SOURCES.txt +0 -0
  12. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots.egg-info/dependency_links.txt +0 -0
  13. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots.egg-info/requires.txt +0 -0
  14. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/standardbots.egg-info/top_level.txt +0 -0
  15. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/tests/fixtures/__init__.py +0 -0
  16. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/tests/fixtures/client_fixt.py +0 -0
  17. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/tests/fixtures/robot_fixt.py +0 -0
  18. {standardbots-2.20250921.1 → standardbots-2.20250923.2}/tests/fixtures/routines_fixt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: standardbots
3
- Version: 2.20250921.1
3
+ Version: 2.20250923.2
4
4
  Summary: Standard Bots RO1 Robotics API
5
5
  Home-page:
6
6
  Author: Standard Bots Support
@@ -13,7 +13,7 @@
13
13
  from setuptools import setup, find_packages # noqa: H301
14
14
 
15
15
  NAME = "standardbots"
16
- VERSION = "2.20250921.1"
16
+ VERSION = "2.20250923.2"
17
17
  # To install the library, run the following
18
18
  #
19
19
  # python setup.py install
@@ -1118,7 +1118,7 @@ class Default:
1118
1118
  models.TeleopState
1119
1119
  ]:
1120
1120
  """
1121
- Set ratio control parameters
1121
+ Set ratio control parameters for movement and rotation
1122
1122
  """
1123
1123
  path = "/api/v1/teleop/set-ratio-control"
1124
1124
  try:
@@ -1736,6 +1736,14 @@ def parse_max_joint_speeds(data: object) -> MaxJointSpeeds:
1736
1736
  def serialize_max_joint_speeds(data: MaxJointSpeeds) -> object:
1737
1737
  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]),]
1738
1738
 
1739
+ MaxJointTorques = Tuple[float,float,float,float,float,float,]
1740
+
1741
+ def parse_max_joint_torques(data: object) -> MaxJointTorques:
1742
+ return (parse_f_64(data[0]),parse_f_64(data[1]),parse_f_64(data[2]),parse_f_64(data[3]),parse_f_64(data[4]),parse_f_64(data[5]),)
1743
+
1744
+ def serialize_max_joint_torques(data: MaxJointTorques) -> object:
1745
+ 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]),]
1746
+
1739
1747
  class MovementKindEnum(Enum):
1740
1748
  Joint = "joint"
1741
1749
  """Enum Joint = `joint`"""
@@ -3156,7 +3164,8 @@ def serialize_sensor_config(data: SensorConfig) -> object:
3156
3164
  class SetRatioControlRequest:
3157
3165
  """Request to set ratio control parameters"""
3158
3166
  enabled: Union[bool, None] = None
3159
- value: Union[float, None] = None
3167
+ movementValue: Union[float, None] = None
3168
+ rotationValue: Union[float, None] = None
3160
3169
 
3161
3170
  def validate_enabled(self, value: bool) -> Tuple[bool, str]:
3162
3171
  if value is None:
@@ -3167,12 +3176,21 @@ class SetRatioControlRequest:
3167
3176
 
3168
3177
  return [True, ""]
3169
3178
 
3170
- def validate_value(self, value: float) -> Tuple[bool, str]:
3179
+ def validate_movementValue(self, value: float) -> Tuple[bool, str]:
3180
+ if value is None:
3181
+ return [True, ""]
3182
+
3183
+ if not isinstance(value, float):
3184
+ return [False, "movementValue must be of type float for SetRatioControlRequest, got " + type(value).__name__]
3185
+
3186
+ return [True, ""]
3187
+
3188
+ def validate_rotationValue(self, value: float) -> Tuple[bool, str]:
3171
3189
  if value is None:
3172
3190
  return [True, ""]
3173
3191
 
3174
3192
  if not isinstance(value, float):
3175
- return [False, "value must be of type float for SetRatioControlRequest, got " + type(value).__name__]
3193
+ return [False, "rotationValue must be of type float for SetRatioControlRequest, got " + type(value).__name__]
3176
3194
 
3177
3195
  return [True, ""]
3178
3196
 
@@ -3181,20 +3199,25 @@ class SetRatioControlRequest:
3181
3199
  is_valid, error_str = self.validate_enabled(self.enabled)
3182
3200
  if not is_valid:
3183
3201
  raise TypeError(error_str)
3184
- is_valid, error_str = self.validate_value(self.value)
3202
+ is_valid, error_str = self.validate_movementValue(self.movementValue)
3203
+ if not is_valid:
3204
+ raise TypeError(error_str)
3205
+ is_valid, error_str = self.validate_rotationValue(self.rotationValue)
3185
3206
  if not is_valid:
3186
3207
  raise TypeError(error_str)
3187
3208
 
3188
3209
  def parse_set_ratio_control_request(data: object):
3189
3210
  return SetRatioControlRequest(
3190
3211
  enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
3191
- value=parse_f_64(data["value"]) if "value" in data and data.get("value") is not None else None,
3212
+ movementValue=parse_f_64(data["movementValue"]) if "movementValue" in data and data.get("movementValue") is not None else None,
3213
+ rotationValue=parse_f_64(data["rotationValue"]) if "rotationValue" in data and data.get("rotationValue") is not None else None,
3192
3214
  )
3193
3215
 
3194
3216
  def serialize_set_ratio_control_request(data: SetRatioControlRequest) -> object:
3195
3217
  return {
3196
3218
  "enabled": None if data.enabled is None else serialize_bool(data.enabled),
3197
- "value": None if data.value is None else serialize_f_64(data.value),
3219
+ "movementValue": None if data.movementValue is None else serialize_f_64(data.movementValue),
3220
+ "rotationValue": None if data.rotationValue is None else serialize_f_64(data.rotationValue),
3198
3221
  }
3199
3222
 
3200
3223
  class SignalMessageType(Enum):
@@ -3356,6 +3379,14 @@ def parse_string_array(data: object) -> StringArray:
3356
3379
  def serialize_string_array(data: StringArray) -> List[object]:
3357
3380
  return [serialize_str(item) for item in data]
3358
3381
 
3382
+ TeleopErrorArray = List[str]
3383
+
3384
+ def parse_teleop_error_array(data: object) -> TeleopErrorArray:
3385
+ return [parse_str(item) for item in data]
3386
+
3387
+ def serialize_teleop_error_array(data: TeleopErrorArray) -> List[object]:
3388
+ return [serialize_str(item) for item in data]
3389
+
3359
3390
  class TeleopStatus(Enum):
3360
3391
  WaitForTeleop = "wait_for_teleop"
3361
3392
  """Enum WaitForTeleop = `wait_for_teleop`"""
@@ -4901,6 +4932,7 @@ class SpeedProfile:
4901
4932
  max_joint_speeds: Union[MaxJointSpeeds, None] = None
4902
4933
  max_joint_accelerations: Union[MaxJointAcclerations, None] = None
4903
4934
  max_tooltip_speed: Union[float, None] = None
4935
+ max_joint_torques: Union[MaxJointTorques, None] = None
4904
4936
  base_acceleration_scaling: Union[float, None] = None
4905
4937
  base_velocity_scaling: Union[float, None] = None
4906
4938
  scaling_factor: Union[float, None] = None
@@ -4932,6 +4964,15 @@ class SpeedProfile:
4932
4964
 
4933
4965
  return [True, ""]
4934
4966
 
4967
+ def validate_max_joint_torques(self, value: MaxJointTorques) -> Tuple[bool, str]:
4968
+ if value is None:
4969
+ return [True, ""]
4970
+
4971
+ if not (isinstance(value, tuple) and len(value) == 6):
4972
+ return [False, "max_joint_torques must be of type MaxJointTorques for SpeedProfile, got " + type(value).__name__]
4973
+
4974
+ return [True, ""]
4975
+
4935
4976
  def validate_base_acceleration_scaling(self, value: float) -> Tuple[bool, str]:
4936
4977
  if value is None:
4937
4978
  return [True, ""]
@@ -4968,6 +5009,9 @@ class SpeedProfile:
4968
5009
  if not is_valid:
4969
5010
  raise TypeError(error_str)
4970
5011
  is_valid, error_str = self.validate_max_tooltip_speed(self.max_tooltip_speed)
5012
+ if not is_valid:
5013
+ raise TypeError(error_str)
5014
+ is_valid, error_str = self.validate_max_joint_torques(self.max_joint_torques)
4971
5015
  if not is_valid:
4972
5016
  raise TypeError(error_str)
4973
5017
  is_valid, error_str = self.validate_base_acceleration_scaling(self.base_acceleration_scaling)
@@ -4985,6 +5029,7 @@ def parse_speed_profile(data: object):
4985
5029
  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,
4986
5030
  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,
4987
5031
  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,
5032
+ max_joint_torques=parse_max_joint_torques(data["max_joint_torques"]) if "max_joint_torques" in data and data.get("max_joint_torques") is not None else None,
4988
5033
  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,
4989
5034
  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,
4990
5035
  scaling_factor=parse_f_64(data["scaling_factor"]) if "scaling_factor" in data and data.get("scaling_factor") is not None else None,
@@ -4995,6 +5040,7 @@ def serialize_speed_profile(data: SpeedProfile) -> object:
4995
5040
  "max_joint_speeds": None if data.max_joint_speeds is None else serialize_max_joint_speeds(data.max_joint_speeds),
4996
5041
  "max_joint_accelerations": None if data.max_joint_accelerations is None else serialize_max_joint_acclerations(data.max_joint_accelerations),
4997
5042
  "max_tooltip_speed": None if data.max_tooltip_speed is None else serialize_f_64(data.max_tooltip_speed),
5043
+ "max_joint_torques": None if data.max_joint_torques is None else serialize_max_joint_torques(data.max_joint_torques),
4998
5044
  "base_acceleration_scaling": None if data.base_acceleration_scaling is None else serialize_f_64(data.base_acceleration_scaling),
4999
5045
  "base_velocity_scaling": None if data.base_velocity_scaling is None else serialize_f_64(data.base_velocity_scaling),
5000
5046
  "scaling_factor": None if data.scaling_factor is None else serialize_f_64(data.scaling_factor),
@@ -6557,6 +6603,7 @@ class BotTeleopDetails:
6557
6603
  isSecondary: Union[bool, None] = None
6558
6604
  isEnabled: Union[bool, None] = None
6559
6605
  status: Union[TeleopStatus, None] = None
6606
+ errors: Union[TeleopErrorArray, None] = None
6560
6607
 
6561
6608
  def validate_botId(self, value: str) -> Tuple[bool, str]:
6562
6609
  if value is None:
@@ -6621,6 +6668,15 @@ class BotTeleopDetails:
6621
6668
 
6622
6669
  return [True, ""]
6623
6670
 
6671
+ def validate_errors(self, value: TeleopErrorArray) -> Tuple[bool, str]:
6672
+ if value is None:
6673
+ return [True, ""]
6674
+
6675
+ if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
6676
+ return [False, "errors must be of type TeleopErrorArray for BotTeleopDetails, got " + type(value).__name__]
6677
+
6678
+ return [True, ""]
6679
+
6624
6680
  def __post_init__(self):
6625
6681
  # Type check incoming model - raise error if invalid (required or wrong type)
6626
6682
  is_valid, error_str = self.validate_botId(self.botId)
@@ -6644,6 +6700,9 @@ class BotTeleopDetails:
6644
6700
  is_valid, error_str = self.validate_status(self.status)
6645
6701
  if not is_valid:
6646
6702
  raise TypeError(error_str)
6703
+ is_valid, error_str = self.validate_errors(self.errors)
6704
+ if not is_valid:
6705
+ raise TypeError(error_str)
6647
6706
 
6648
6707
  def parse_bot_teleop_details(data: object):
6649
6708
  return BotTeleopDetails(
@@ -6654,6 +6713,7 @@ def parse_bot_teleop_details(data: object):
6654
6713
  isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
6655
6714
  isEnabled=parse_bool(data["isEnabled"]) if "isEnabled" in data and data.get("isEnabled") is not None else None,
6656
6715
  status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
6716
+ errors=parse_teleop_error_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
6657
6717
  )
6658
6718
 
6659
6719
  def serialize_bot_teleop_details(data: BotTeleopDetails) -> object:
@@ -6665,6 +6725,7 @@ def serialize_bot_teleop_details(data: BotTeleopDetails) -> object:
6665
6725
  "isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
6666
6726
  "isEnabled": None if data.isEnabled is None else serialize_bool(data.isEnabled),
6667
6727
  "status": None if data.status is None else serialize_teleop_status(data.status),
6728
+ "errors": None if data.errors is None else serialize_teleop_error_array(data.errors),
6668
6729
  }
6669
6730
 
6670
6731
  @dataclass
@@ -8853,6 +8914,7 @@ class TeleopState:
8853
8914
  config: Union[TeleopConfig, None] = None
8854
8915
  status: Union[TeleopStatus, None] = None
8855
8916
  botsInSync: Union[bool, None] = None
8917
+ errors: Union[TeleopErrorArray, None] = None
8856
8918
 
8857
8919
  def validate_config(self, value: TeleopConfig) -> Tuple[bool, str]:
8858
8920
  if value is None:
@@ -8881,6 +8943,15 @@ class TeleopState:
8881
8943
 
8882
8944
  return [True, ""]
8883
8945
 
8946
+ def validate_errors(self, value: TeleopErrorArray) -> Tuple[bool, str]:
8947
+ if value is None:
8948
+ return [True, ""]
8949
+
8950
+ if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
8951
+ return [False, "errors must be of type TeleopErrorArray for TeleopState, got " + type(value).__name__]
8952
+
8953
+ return [True, ""]
8954
+
8884
8955
  def __post_init__(self):
8885
8956
  # Type check incoming model - raise error if invalid (required or wrong type)
8886
8957
  is_valid, error_str = self.validate_config(self.config)
@@ -8892,12 +8963,16 @@ class TeleopState:
8892
8963
  is_valid, error_str = self.validate_botsInSync(self.botsInSync)
8893
8964
  if not is_valid:
8894
8965
  raise TypeError(error_str)
8966
+ is_valid, error_str = self.validate_errors(self.errors)
8967
+ if not is_valid:
8968
+ raise TypeError(error_str)
8895
8969
 
8896
8970
  def parse_teleop_state(data: object):
8897
8971
  return TeleopState(
8898
8972
  config=parse_teleop_config(data["config"]) if "config" in data and data.get("config") is not None else None,
8899
8973
  status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
8900
8974
  botsInSync=parse_bool(data["botsInSync"]) if "botsInSync" in data and data.get("botsInSync") is not None else None,
8975
+ errors=parse_teleop_error_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
8901
8976
  )
8902
8977
 
8903
8978
  def serialize_teleop_state(data: TeleopState) -> object:
@@ -8905,6 +8980,7 @@ def serialize_teleop_state(data: TeleopState) -> object:
8905
8980
  "config": None if data.config is None else serialize_teleop_config(data.config),
8906
8981
  "status": None if data.status is None else serialize_teleop_status(data.status),
8907
8982
  "botsInSync": None if data.botsInSync is None else serialize_bool(data.botsInSync),
8983
+ "errors": None if data.errors is None else serialize_teleop_error_array(data.errors),
8908
8984
  }
8909
8985
 
8910
8986
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: standardbots
3
- Version: 2.20250921.1
3
+ Version: 2.20250923.2
4
4
  Summary: Standard Bots RO1 Robotics API
5
5
  Home-page:
6
6
  Author: Standard Bots Support
@@ -1231,7 +1231,7 @@ class TestPostMovementPositionArm:
1231
1231
 
1232
1232
  target_position_res = client.movement.position.get_arm_position()
1233
1233
  target_joint_pose_rounded = tuple(
1234
- round(val, 3) for val in target_position_res.data.joint_rotations
1234
+ round(val, 2) for val in target_position_res.data.joint_rotations
1235
1235
  )
1236
1236
 
1237
1237
  # check if robot successfully moved to target pose
@@ -1246,7 +1246,7 @@ class TestPostMovementPositionArm:
1246
1246
  initial_position_res = client.movement.position.get_arm_position()
1247
1247
 
1248
1248
  initial_joint_pose_rounded = tuple(
1249
- round(val, 3) for val in initial_position_res.data.joint_rotations
1249
+ round(val, 2) for val in initial_position_res.data.joint_rotations
1250
1250
  )
1251
1251
  # check if pose correctly moved to initial pose
1252
1252
  assert initial_joint_pose_rounded == initial_position
@@ -1266,7 +1266,7 @@ class TestPostMovementPositionArm:
1266
1266
  initial_position = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
1267
1267
  pose_res = client.movement.position.get_arm_position()
1268
1268
  initial_joint_pose_rounded = tuple(
1269
- round(val, 3) for val in pose_res.data.joint_rotations
1269
+ round(val, 2) for val in pose_res.data.joint_rotations
1270
1270
  )
1271
1271
 
1272
1272
  # if robot is not in initial position, move it to initial position
@@ -1298,7 +1298,7 @@ class TestPostMovementPositionArm:
1298
1298
 
1299
1299
  pose_res = client.movement.position.get_arm_position()
1300
1300
  joint_pose_rounded = tuple(
1301
- round(val, 3) for val in pose_res.data.joint_rotations
1301
+ round(val, 2) for val in pose_res.data.joint_rotations
1302
1302
  )
1303
1303
 
1304
1304
  # check if robot successfully moved into initial pose
@@ -1346,9 +1346,9 @@ class TestPostMovementPositionArm:
1346
1346
  pose_res = client.movement.position.get_arm_position()
1347
1347
  target_tooltip = pose_res.data.tooltip_position.position
1348
1348
 
1349
- assert approx_equal(target_tooltip.x, target_tooltip_position.x)
1350
- assert approx_equal(target_tooltip.y, target_tooltip_position.y)
1351
- assert approx_equal(target_tooltip.z, target_tooltip_position.z)
1349
+ assert approx_equal(target_tooltip.x, target_tooltip_position.x, 2)
1350
+ assert approx_equal(target_tooltip.y, target_tooltip_position.y, 2)
1351
+ assert approx_equal(target_tooltip.z, target_tooltip_position.z, 2)
1352
1352
 
1353
1353
  pose_body = models.ArmPositionUpdateRequest(
1354
1354
  kind=models.ArmPositionUpdateRequestKindEnum.TooltipPosition,
@@ -1369,9 +1369,9 @@ class TestPostMovementPositionArm:
1369
1369
  pose_res = client.movement.position.get_arm_position()
1370
1370
  tooltip_position = pose_res.data.tooltip_position.position
1371
1371
 
1372
- assert approx_equal(tooltip_position.x, initial_tooltip_position.x)
1373
- assert approx_equal(tooltip_position.y, initial_tooltip_position.y)
1374
- assert approx_equal(tooltip_position.z, initial_tooltip_position.z)
1372
+ assert approx_equal(tooltip_position.x, initial_tooltip_position.x, 2)
1373
+ assert approx_equal(tooltip_position.y, initial_tooltip_position.y, 2)
1374
+ assert approx_equal(tooltip_position.z, initial_tooltip_position.z, 2)
1375
1375
 
1376
1376
  def test_tooltip_positions_to_target_and_back(
1377
1377
  self, client_live: StandardBotsRobot
@@ -3317,12 +3317,13 @@ class TestPostMovementPositionArmControlled:
3317
3317
  assert not approx_equal(joint, target_position[i], 2), (
3318
3318
  f"Joint {i} is approximately equal to target position (should not reach goal) (actual={joint}, expected={target_position[i]})"
3319
3319
  )
3320
+ time.sleep(2)
3320
3321
 
3321
3322
  # Now retrieve the failure
3322
3323
  assert heartbeat_data.event is not None
3323
3324
  assert heartbeat_data.event.kind == models.ArmPositionUpdateKindEnum.Failure
3324
3325
  assert heartbeat_data.event.failure is not None
3325
- assert heartbeat_data.event.failure.reason == "Error while running motion"
3326
+ assert heartbeat_data.event.failure.reason == "Failed to generate a motion plan"
3326
3327
 
3327
3328
  def test_move_then_stop_heartbeat(
3328
3329
  self,