standardbots 2.0.0.dev1790701403__tar.gz → 2.0.0.dev1791499643__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.
Files changed (32) hide show
  1. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/PKG-INFO +1 -1
  2. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/setup.py +1 -1
  3. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/auto_generated/apis.py +175 -3
  4. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/auto_generated/models.py +705 -99
  5. standardbots-2.0.0.dev1791499643/standardbots/realtime/__init__.py +19 -0
  6. standardbots-2.0.0.dev1791499643/standardbots/realtime/_proto/external_control_pb2.py +81 -0
  7. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/realtime/protocol.py +94 -19
  8. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/realtime/robot_stream.py +223 -13
  9. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/realtime/types.py +15 -0
  10. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots.egg-info/PKG-INFO +1 -1
  11. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots.egg-info/SOURCES.txt +2 -0
  12. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/test_robot_stream.py +100 -11
  13. standardbots-2.0.0.dev1791499643/tests/test_robot_stream_records.py +381 -0
  14. standardbots-2.0.0.dev1791499643/tests/test_vendored_proto.py +54 -0
  15. standardbots-2.0.0.dev1790701403/standardbots/realtime/__init__.py +0 -4
  16. standardbots-2.0.0.dev1790701403/standardbots/realtime/_proto/external_control_pb2.py +0 -63
  17. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/README.md +0 -0
  18. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/setup.cfg +0 -0
  19. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/__init__.py +0 -0
  20. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/auto_generated/__init__.py +0 -0
  21. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots/realtime/_proto/__init__.py +0 -0
  22. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots.egg-info/dependency_links.txt +0 -0
  23. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots.egg-info/requires.txt +0 -0
  24. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/standardbots.egg-info/top_level.txt +0 -0
  25. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/fixtures/__init__.py +0 -0
  26. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/fixtures/client_fixt.py +0 -0
  27. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/fixtures/robot_fixt.py +0 -0
  28. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/fixtures/routines_fixt.py +0 -0
  29. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/test_apis.py +0 -0
  30. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/test_robot_stream_loopback.py +0 -0
  31. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/test_robot_stream_reseed.py +0 -0
  32. {standardbots-2.0.0.dev1790701403 → standardbots-2.0.0.dev1791499643}/tests/test_robot_stream_take_control.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: standardbots
3
- Version: 2.0.0.dev1790701403
3
+ Version: 2.0.0.dev1791499643
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.0.0-dev1790701403"
16
+ VERSION = "2.0.0-dev1791499643"
17
17
  # To install the library, run the following
18
18
  #
19
19
  # python setup.py install
@@ -717,6 +717,10 @@ anything else is rejected. Pass `equipment_id` alongside it to say whi
717
717
  equipment the tooltip belongs to — required only when more than one
718
718
  piece of equipment offers the same option.
719
719
 
720
+ The robot must not be running a routine, paused runs included. The
721
+ Active Tooltip repoints the frame a running routine's steps do their
722
+ motion math against, so it is only settable between runs.
723
+
720
724
  """
721
725
  path = "/api/v1/equipment/tooltips/active"
722
726
  try:
@@ -730,6 +734,51 @@ piece of equipment offers the same option.
730
734
  if response.status == 200:
731
735
  parsed = models.parse_active_tooltip_response(json.loads(response.data))
732
736
 
737
+ is_user_error = response.status >= 400 and response.status <= 500
738
+ is_unavailable = response.status == 503
739
+ if parsed is None and (is_user_error or is_unavailable):
740
+ parsed = models.parse_error_response(json.loads(response.data))
741
+
742
+ return Response(
743
+ parsed,
744
+ response.status,
745
+ response
746
+ )
747
+ except urllib3.exceptions.MaxRetryError:
748
+ return Response(
749
+ models.ErrorResponse(
750
+ error=models.ErrorEnum.InternalServerError,
751
+ message="Connection Refused"
752
+ ),
753
+ 503,
754
+ None
755
+ )
756
+ def tare_tactile_sensor(
757
+ self,
758
+ body: models.TactileSensorTareRequest,
759
+ ) -> Response[
760
+ None,
761
+ None
762
+ ]:
763
+ """
764
+ Zeroes the tactile sensor fingertips against their current unloaded
765
+ state, so subsequent taxel and force readings are relative to it. A taxel
766
+ at rest sits at a large offset, so readings are meaningless until a
767
+ baseline has been captured.
768
+
769
+ Succeeds while the robot is braked.
770
+
771
+ """
772
+ path = "/api/v1/equipment/tactile-sensor/tare"
773
+ try:
774
+ response = self._request_manager.request(
775
+ "POST",
776
+ path,
777
+ headers=self._request_manager.json_headers(),
778
+ body=json.dumps(models.serialize_tactile_sensor_tare_request(body)),
779
+ )
780
+ parsed = None
781
+
733
782
  is_user_error = response.status >= 400 and response.status <= 500
734
783
  is_unavailable = response.status == 503
735
784
  if parsed is None and (is_user_error or is_unavailable):
@@ -1288,6 +1337,96 @@ external-control session started through this API; a no-op otherwise.
1288
1337
  if parsed is None and (is_user_error or is_unavailable):
1289
1338
  parsed = models.parse_error_response(json.loads(response.data))
1290
1339
 
1340
+ return Response(
1341
+ parsed,
1342
+ response.status,
1343
+ response
1344
+ )
1345
+ except urllib3.exceptions.MaxRetryError:
1346
+ return Response(
1347
+ models.ErrorResponse(
1348
+ error=models.ErrorEnum.InternalServerError,
1349
+ message="Connection Refused"
1350
+ ),
1351
+ 503,
1352
+ None
1353
+ )
1354
+ def get_map_artifact_url(
1355
+ self,
1356
+ body: models.MapArtifactUrlRequest,
1357
+ ) -> Response[
1358
+ Union[
1359
+ models.MapArtifactUrlResponse,
1360
+ models.ErrorResponse,
1361
+ None
1362
+ ],
1363
+ models.MapArtifactUrlResponse
1364
+ ]:
1365
+ """
1366
+ Mint a presigned download URL for one file inside a skills artifact, via echo-bot&#x27;s configured api-srv endpoint
1367
+ """
1368
+ path = "/api/v1/recorder/map-artifact-url"
1369
+ try:
1370
+ response = self._request_manager.request(
1371
+ "POST",
1372
+ path,
1373
+ headers=self._request_manager.json_headers(),
1374
+ body=json.dumps(models.serialize_map_artifact_url_request(body)),
1375
+ )
1376
+ parsed = None
1377
+ if response.status == 200:
1378
+ parsed = models.parse_map_artifact_url_response(json.loads(response.data))
1379
+
1380
+ is_user_error = response.status >= 400 and response.status <= 500
1381
+ is_unavailable = response.status == 503
1382
+ if parsed is None and (is_user_error or is_unavailable):
1383
+ parsed = models.parse_error_response(json.loads(response.data))
1384
+
1385
+ return Response(
1386
+ parsed,
1387
+ response.status,
1388
+ response
1389
+ )
1390
+ except urllib3.exceptions.MaxRetryError:
1391
+ return Response(
1392
+ models.ErrorResponse(
1393
+ error=models.ErrorEnum.InternalServerError,
1394
+ message="Connection Refused"
1395
+ ),
1396
+ 503,
1397
+ None
1398
+ )
1399
+ def check_camera_calibration(
1400
+ self,
1401
+ body: models.CameraCalibrationCheckRequest,
1402
+ ) -> Response[
1403
+ Union[
1404
+ models.CameraCalibrationCheckResponse,
1405
+ models.ErrorResponse,
1406
+ None
1407
+ ],
1408
+ models.CameraCalibrationCheckResponse
1409
+ ]:
1410
+ """
1411
+ Report whether a handheld-camera calibration exists for a serial, via echo-bot&#x27;s configured api-srv endpoint
1412
+ """
1413
+ path = "/api/v1/recorder/camera-calibration"
1414
+ try:
1415
+ response = self._request_manager.request(
1416
+ "POST",
1417
+ path,
1418
+ headers=self._request_manager.json_headers(),
1419
+ body=json.dumps(models.serialize_camera_calibration_check_request(body)),
1420
+ )
1421
+ parsed = None
1422
+ if response.status == 200:
1423
+ parsed = models.parse_camera_calibration_check_response(json.loads(response.data))
1424
+
1425
+ is_user_error = response.status >= 400 and response.status <= 500
1426
+ is_unavailable = response.status == 503
1427
+ if parsed is None and (is_user_error or is_unavailable):
1428
+ parsed = models.parse_error_response(json.loads(response.data))
1429
+
1291
1430
  return Response(
1292
1431
  parsed,
1293
1432
  response.status,
@@ -4057,7 +4196,16 @@ class ROS:
4057
4196
  models.ROSControlStateResponse
4058
4197
  ]:
4059
4198
  """
4060
- Updates the state of ROS control based on the provided action (&#x27;enable&#x27; or &#x27;disable&#x27;).
4199
+ Deprecated. Updates the state of direct ROS control based on the provided
4200
+ action (&#x27;enable&#x27; or &#x27;disable&#x27;).
4201
+
4202
+ Superseded by the external-control API: start a streaming session with
4203
+ POST /api/v1/external-control/start (streamType &#x27;pose&#x27;, &#x27;joints&#x27; or
4204
+ &#x27;jointTrajectory&#x27;) and end it with POST /api/v1/external-control/stop.
4205
+ Every successful response carries a &#x60;deprecationWarning&#x60;. On robots where
4206
+ the deprecated ROS2 API has been turned off (Settings → External control →
4207
+ Developer API) this endpoint returns 410 &#x60;ros_control_deprecated&#x60;.
4208
+
4061
4209
  """
4062
4210
  path = "/api/v1/movement/ros/state"
4063
4211
  try:
@@ -4106,7 +4254,13 @@ class ROS:
4106
4254
  models.ROSControlStateResponse
4107
4255
  ]:
4108
4256
  """
4109
- Retrieves the current state of ROS control.
4257
+ Deprecated. Retrieves the current state of direct ROS control.
4258
+
4259
+ Superseded by the external-control API (POST
4260
+ /api/v1/external-control/start). Every successful response carries a
4261
+ &#x60;deprecationWarning&#x60;. On robots where the deprecated ROS2 API has been
4262
+ turned off this endpoint returns 410 &#x60;ros_control_deprecated&#x60;.
4263
+
4110
4264
  """
4111
4265
  path = "/api/v1/movement/ros/state"
4112
4266
  try:
@@ -4908,7 +5062,25 @@ class StandardBotsRobot(Default):
4908
5062
  pools: int = 10
4909
5063
  ):
4910
5064
  super().__init__(RequestManager(
4911
- urllib3.PoolManager(num_pools=2),
5065
+ urllib3.PoolManager(
5066
+ num_pools=2,
5067
+ # A cold robot answers 503 with a Retry-After header while
5068
+ # its tunnel wakes (worst case about 30s). Honoring it makes
5069
+ # the first call against a cold robot run slower instead of
5070
+ # failing. The 503 means the request never reached the
5071
+ # robot, so retrying non-idempotent methods is safe here
5072
+ # (allowed_methods=None retries every method).
5073
+ retries=urllib3.util.Retry(
5074
+ connect=3,
5075
+ read=3,
5076
+ status=4,
5077
+ other=0,
5078
+ status_forcelist=[503],
5079
+ allowed_methods=None,
5080
+ respect_retry_after_header=True,
5081
+ backoff_factor=0.5,
5082
+ ),
5083
+ ),
4912
5084
  token=token,
4913
5085
  host=url,
4914
5086
  robot_kind=RobotKind(robot_kind),