current-data-py 0.1.17__tar.gz → 0.1.18__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.
- {current_data_py-0.1.17 → current_data_py-0.1.18}/MANIFEST.in +2 -0
- {current_data_py-0.1.17/current_data_py.egg-info → current_data_py-0.1.18}/PKG-INFO +25 -3
- {current_data_py-0.1.17 → current_data_py-0.1.18}/README.md +24 -2
- current_data_py-0.1.18/_urdf_dae.py +37 -0
- current_data_py-0.1.18/_urdf_directory.py +87 -0
- current_data_py-0.1.18/_urdf_mesh.py +39 -0
- current_data_py-0.1.18/_urdf_validation.py +230 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18/current_data_py.egg-info}/PKG-INFO +25 -3
- {current_data_py-0.1.17 → current_data_py-0.1.18}/current_data_py.egg-info/SOURCES.txt +16 -1
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/api/management.md +124 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/index.md +10 -1
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/sdk-client/references/data-client.md +6 -5
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/sdk-client/references/metadata-v2.md +1 -1
- current_data_py-0.1.18/docs/urdf.md +84 -0
- current_data_py-0.1.18/examples/upload_urdf.py +38 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/management.py +59 -4
- {current_data_py-0.1.17 → current_data_py-0.1.18}/oss.py +37 -2
- current_data_py-0.1.18/proto_gen/python/management/service/service_pb2.py +131 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/management/service/service_pb2_grpc.py +100 -0
- current_data_py-0.1.18/proto_gen/python/management/urdf/asset_pb2.py +31 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/pyproject.toml +1 -1
- {current_data_py-0.1.17 → current_data_py-0.1.18}/remote/client.py +16 -4
- {current_data_py-0.1.17 → current_data_py-0.1.18}/setup.py +1 -1
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_docs.py +5 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_management.py +2 -2
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_oss.py +85 -9
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_remote.py +16 -8
- current_data_py-0.1.18/tests/check_urdf.py +440 -0
- current_data_py-0.1.18/tests/check_urdf_validation.py +286 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tos.py +5 -1
- current_data_py-0.1.18/urdf.py +66 -0
- current_data_py-0.1.17/proto_gen/python/management/service/service_pb2.py +0 -118
- {current_data_py-0.1.17 → current_data_py-0.1.18}/__init__.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/_multipart.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/current_data_py.egg-info/dependency_links.txt +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/current_data_py.egg-info/requires.txt +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/current_data_py.egg-info/top_level.txt +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/decoding.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/api/processing.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/convert-robot-data/SKILL.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/SKILL.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/api.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/data-transfer.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/dev-pod.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/jobs.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/test-environment.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/data-platform/references/use-cases.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs/skills/sdk-client/SKILL.md +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/docs.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/examples/__init__.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/examples/list_schemas.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/examples/read_remote_td.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/examples/read_td.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/examples/write_td.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/labeling.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/labeling/service/service_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/labeling/service/service_pb2_grpc.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/labeling/task/task_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/labeling/template/template_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/management/metadata/metadata_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/management/selection/selection_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/builtin_interfaces/duration_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/builtin_interfaces/time_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/encoder_status_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/joint_current_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/keypoints_quality_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/pose_rpy_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/slam_quality_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/sonic_frame_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/subtask_description_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/custom_msgs/target_quality_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/foxglove/compressed_audio_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/foxglove/compressed_video_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/point32_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/point_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/pose_array_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/pose_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/pose_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/pose_with_covariance_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/pose_with_covariance_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/quaternion_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/transform_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/transform_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/twist_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/twist_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/twist_with_covariance_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/twist_with_covariance_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/vector3_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/wrench_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/geometry_msgs/wrench_stamped_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/nav_msgs/map_meta_data_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/nav_msgs/occupancy_grid_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/nav_msgs/odometry_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/nav_msgs/path_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/battery_state_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/camera_info_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/compressed_image_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/image_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/imu_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/joint_state_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/laser_scan_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/nav_sat_fix_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/nav_sat_status_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/point_cloud2_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/point_field_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/range_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/sensor_msgs/region_of_interest_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/bool_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/color_rgba_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/float32_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/float64_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/header_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/int32_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/string_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/std_msgs/uint32_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/proto_gen/python/msg/tf2_msgs/tf_message_pb2.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/remote/__init__.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/remote/source.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/remote/tos_source.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/schema/__init__.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/schema/message_metadata.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/setup.cfg +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_environment.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_labeling.py +0 -0
- {current_data_py-0.1.17 → current_data_py-0.1.18}/tests/check_package.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: current-data-py
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary: Current Data protobuf messages and schema metadata
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -49,6 +49,15 @@ Set `ENV=test` before the first SDK import to select the test service; an unset
|
|
|
49
49
|
empty value defaults to production. An explicit client `address=` overrides the
|
|
50
50
|
default. Remote examples require service connectivity and accessible data.
|
|
51
51
|
|
|
52
|
+
Downloads and remote reads with a selected bucket default to the storage provider's
|
|
53
|
+
internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
|
|
54
|
+
`open_data`, and bucket-selected `open_td`). Outside that cloud network, pass
|
|
55
|
+
`use_internal_endpoint=False`; there is no automatic public fallback. A supplied
|
|
56
|
+
TOS `endpoint` selects that public address unless internal networking is explicitly
|
|
57
|
+
requested, which remains an error. Uploads still default to public networking.
|
|
58
|
+
Legacy OSS `open_td` without `bucket` retains the server's default read scope and
|
|
59
|
+
does not support network selection. V2/V3 read-credential methods default to internal.
|
|
60
|
+
|
|
52
61
|
Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
|
|
53
62
|
`current_data_py` for the environment's HTTPS Collection callback endpoint on
|
|
54
63
|
`DEFAULT_ADDRESS` (port 443).
|
|
@@ -93,6 +102,19 @@ policy update and ensure the underlying cloud role permits cleanup before use.
|
|
|
93
102
|
There is no persistent checkpoint: a later call starts a new upload. Uploading
|
|
94
103
|
does not register the data; call `ManagementClient.register_data` separately.
|
|
95
104
|
|
|
105
|
+
## URDF packages
|
|
106
|
+
|
|
107
|
+
Use `ManagementClient.upload_urdf(directory, entrypoint, info=...)` to check local
|
|
108
|
+
dependencies, upload source files without overwriting objects, and register one
|
|
109
|
+
asset under a new UUID on each call. Keep the directory unchanged throughout the
|
|
110
|
+
call; validation, hashing and upload read the source directly without private
|
|
111
|
+
copies. Failed calls leave uploaded objects in place and do not resume or recover
|
|
112
|
+
registration on a later call.
|
|
113
|
+
STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
|
|
114
|
+
checked in preview. The result is the locally generated asset UUID; model lists
|
|
115
|
+
provide URDF URLs. See the
|
|
116
|
+
[URDF guide](docs/urdf.md) and run `python -I -m current_data_py.examples.upload_urdf --help`.
|
|
117
|
+
|
|
96
118
|
## Test changes
|
|
97
119
|
|
|
98
120
|
The package bundles generated Protobuf modules during its build. After protocol
|
|
@@ -109,7 +131,7 @@ shared dependencies are left unchanged:
|
|
|
109
131
|
(cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
|
|
110
132
|
python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
|
|
111
133
|
python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
|
|
112
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding multipart docs; do
|
|
134
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
|
|
113
135
|
python -I "current_data_py/tests/check_${check}.py"
|
|
114
136
|
done
|
|
115
137
|
)
|
|
@@ -151,7 +173,7 @@ sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
|
|
|
151
173
|
(
|
|
152
174
|
cd "$sdk_release_dir"
|
|
153
175
|
unset PYTHONPATH PYTHONHOME
|
|
154
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding; do
|
|
176
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding urdf urdf_validation docs; do
|
|
155
177
|
python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
|
|
156
178
|
done
|
|
157
179
|
)
|
|
@@ -35,6 +35,15 @@ Set `ENV=test` before the first SDK import to select the test service; an unset
|
|
|
35
35
|
empty value defaults to production. An explicit client `address=` overrides the
|
|
36
36
|
default. Remote examples require service connectivity and accessible data.
|
|
37
37
|
|
|
38
|
+
Downloads and remote reads with a selected bucket default to the storage provider's
|
|
39
|
+
internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
|
|
40
|
+
`open_data`, and bucket-selected `open_td`). Outside that cloud network, pass
|
|
41
|
+
`use_internal_endpoint=False`; there is no automatic public fallback. A supplied
|
|
42
|
+
TOS `endpoint` selects that public address unless internal networking is explicitly
|
|
43
|
+
requested, which remains an error. Uploads still default to public networking.
|
|
44
|
+
Legacy OSS `open_td` without `bucket` retains the server's default read scope and
|
|
45
|
+
does not support network selection. V2/V3 read-credential methods default to internal.
|
|
46
|
+
|
|
38
47
|
Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
|
|
39
48
|
`current_data_py` for the environment's HTTPS Collection callback endpoint on
|
|
40
49
|
`DEFAULT_ADDRESS` (port 443).
|
|
@@ -79,6 +88,19 @@ policy update and ensure the underlying cloud role permits cleanup before use.
|
|
|
79
88
|
There is no persistent checkpoint: a later call starts a new upload. Uploading
|
|
80
89
|
does not register the data; call `ManagementClient.register_data` separately.
|
|
81
90
|
|
|
91
|
+
## URDF packages
|
|
92
|
+
|
|
93
|
+
Use `ManagementClient.upload_urdf(directory, entrypoint, info=...)` to check local
|
|
94
|
+
dependencies, upload source files without overwriting objects, and register one
|
|
95
|
+
asset under a new UUID on each call. Keep the directory unchanged throughout the
|
|
96
|
+
call; validation, hashing and upload read the source directly without private
|
|
97
|
+
copies. Failed calls leave uploaded objects in place and do not resume or recover
|
|
98
|
+
registration on a later call.
|
|
99
|
+
STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
|
|
100
|
+
checked in preview. The result is the locally generated asset UUID; model lists
|
|
101
|
+
provide URDF URLs. See the
|
|
102
|
+
[URDF guide](docs/urdf.md) and run `python -I -m current_data_py.examples.upload_urdf --help`.
|
|
103
|
+
|
|
82
104
|
## Test changes
|
|
83
105
|
|
|
84
106
|
The package bundles generated Protobuf modules during its build. After protocol
|
|
@@ -95,7 +117,7 @@ shared dependencies are left unchanged:
|
|
|
95
117
|
(cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
|
|
96
118
|
python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
|
|
97
119
|
python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
|
|
98
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding multipart docs; do
|
|
120
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
|
|
99
121
|
python -I "current_data_py/tests/check_${check}.py"
|
|
100
122
|
done
|
|
101
123
|
)
|
|
@@ -137,7 +159,7 @@ sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
|
|
|
137
159
|
(
|
|
138
160
|
cd "$sdk_release_dir"
|
|
139
161
|
unset PYTHONPATH PYTHONHOME
|
|
140
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding; do
|
|
162
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding urdf urdf_validation docs; do
|
|
141
163
|
python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
|
|
142
164
|
done
|
|
143
165
|
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Check static COLLADA scope and collect its external image filenames."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
_NAMESPACE = "http://www.collada.org/2005/11/COLLADASchema"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def dae_dependencies(root):
|
|
8
|
+
if root.tag != "{" + _NAMESPACE + "}COLLADA" or root.get("version") != "1.4.1":
|
|
9
|
+
raise ValueError("only static COLLADA 1.4.1 is supported")
|
|
10
|
+
|
|
11
|
+
# Internal IDs and surface/sampler SIDs are not downloadable file paths.
|
|
12
|
+
# Geometry arrays, indices, UVs and exporter metadata belong to preview.
|
|
13
|
+
unsupported = {"library_animations", "library_animation_clips", "animation", "animation_clip",
|
|
14
|
+
"library_controllers", "controller", "skin", "morph", "instance_controller",
|
|
15
|
+
"skeleton"}
|
|
16
|
+
pending = [root]
|
|
17
|
+
while pending:
|
|
18
|
+
node = pending.pop()
|
|
19
|
+
tag = node.tag.removeprefix("{" + _NAMESPACE + "}")
|
|
20
|
+
if tag in ("asset", "extra"):
|
|
21
|
+
continue
|
|
22
|
+
pending.extend(node)
|
|
23
|
+
if tag in unsupported or (tag == "node" and node.get("type") == "JOINT"):
|
|
24
|
+
raise ValueError("animated or skeletal COLLADA is not supported")
|
|
25
|
+
if tag.startswith("instance_") or tag in ("input", "accessor"):
|
|
26
|
+
for attribute in ("url", "target", "source"):
|
|
27
|
+
value = node.get(attribute)
|
|
28
|
+
if value is not None and (not value.startswith("#") or len(value) == 1):
|
|
29
|
+
raise ValueError("COLLADA external document references are not supported")
|
|
30
|
+
|
|
31
|
+
references = []
|
|
32
|
+
for image in root.findall("{" + _NAMESPACE + "}library_images/{" + _NAMESPACE + "}image"):
|
|
33
|
+
sources = image.findall("{" + _NAMESPACE + "}init_from")
|
|
34
|
+
if len(sources) != 1 or list(sources[0]):
|
|
35
|
+
raise ValueError("COLLADA image requires one external PNG/JPEG filename")
|
|
36
|
+
references.append((sources[0].text or "").strip())
|
|
37
|
+
return references
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Inspect model directories and build bounded per-file upload manifests."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
import hashlib
|
|
5
|
+
import os
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
import stat
|
|
8
|
+
|
|
9
|
+
from ._proto.management.urdf.asset_pb2 import FileInfo
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(frozen=True)
|
|
13
|
+
class ModelDirectory:
|
|
14
|
+
root: Path
|
|
15
|
+
files: tuple
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _file_path(name):
|
|
19
|
+
if (not name or len(name.encode("utf-8")) > 512 or name.startswith("/")
|
|
20
|
+
or any(c in name for c in "\\\x00:%?#")
|
|
21
|
+
or any(ord(c) < 32 or ord(c) == 127 for c in name)
|
|
22
|
+
or any(part in ("", ".", "..") for part in name.split("/"))):
|
|
23
|
+
raise ValueError(f"Unsafe URDF relative path: {name!r}")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _inventory(root, max_files):
|
|
27
|
+
def unreadable(error):
|
|
28
|
+
raise error
|
|
29
|
+
|
|
30
|
+
files = []
|
|
31
|
+
for directory, folders, names in os.walk(root, followlinks=False, onerror=unreadable):
|
|
32
|
+
folders[:] = [name for name in folders
|
|
33
|
+
if name not in (".git", "__MACOSX", ".DS_Store")
|
|
34
|
+
and not name.startswith("._")]
|
|
35
|
+
names = [name for name in names if name != ".DS_Store" and not name.startswith("._")]
|
|
36
|
+
for name in folders + names:
|
|
37
|
+
path = Path(directory) / name
|
|
38
|
+
relative = path.relative_to(root).as_posix()
|
|
39
|
+
value = path.lstat()
|
|
40
|
+
if stat.S_ISLNK(value.st_mode):
|
|
41
|
+
raise ValueError(f"URDF directory contains a symbolic link: {relative}")
|
|
42
|
+
if not (stat.S_ISDIR(value.st_mode) or stat.S_ISREG(value.st_mode)):
|
|
43
|
+
raise ValueError(f"URDF directory contains a special file: {relative}")
|
|
44
|
+
if stat.S_ISREG(value.st_mode):
|
|
45
|
+
_file_path(relative)
|
|
46
|
+
files.append(relative)
|
|
47
|
+
if len(files) > max_files:
|
|
48
|
+
raise ValueError("URDF directory exceeds the file count limit")
|
|
49
|
+
return files
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _hash_file(source, max_file_bytes, remaining_bytes):
|
|
53
|
+
"""Read a source file, enforcing byte limits while computing its digest."""
|
|
54
|
+
flags = os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0)
|
|
55
|
+
digest, size = hashlib.sha256(), 0
|
|
56
|
+
with os.fdopen(os.open(source, flags), "rb") as stream:
|
|
57
|
+
while True:
|
|
58
|
+
chunk = stream.read(1024 * 1024)
|
|
59
|
+
if not chunk:
|
|
60
|
+
break
|
|
61
|
+
size += len(chunk)
|
|
62
|
+
if size > max_file_bytes:
|
|
63
|
+
raise ValueError(f"URDF file exceeds the size limit: {source.name}")
|
|
64
|
+
if size > remaining_bytes:
|
|
65
|
+
raise ValueError("URDF directory exceeds the total size limit")
|
|
66
|
+
digest.update(chunk)
|
|
67
|
+
return digest.hexdigest(), size
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def prepare_directory(source, *, max_total_bytes=1024**3, max_file_bytes=256 * 1024**2,
|
|
71
|
+
max_files=10000):
|
|
72
|
+
"""Inspect ordinary source files before credentials or any network upload."""
|
|
73
|
+
source = Path(source).absolute()
|
|
74
|
+
value = source.lstat()
|
|
75
|
+
if stat.S_ISLNK(value.st_mode):
|
|
76
|
+
raise ValueError("URDF directory input cannot be a symbolic link")
|
|
77
|
+
if not stat.S_ISDIR(value.st_mode):
|
|
78
|
+
raise ValueError("URDF upload input must be a model directory")
|
|
79
|
+
names = _inventory(source, max_files)
|
|
80
|
+
if not names:
|
|
81
|
+
raise ValueError("URDF directory must contain at least one file")
|
|
82
|
+
files, total = [], 0
|
|
83
|
+
for name in names:
|
|
84
|
+
digest, size = _hash_file(source / name, max_file_bytes, max_total_bytes - total)
|
|
85
|
+
files.append(FileInfo(path=name, size_bytes=size, sha256=digest))
|
|
86
|
+
total += size
|
|
87
|
+
return ModelDirectory(source, tuple(files))
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Read OBJ/MTL resource references without validating their geometry."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def _statements(filename):
|
|
5
|
+
with filename.open("rb") as stream:
|
|
6
|
+
while True:
|
|
7
|
+
line = stream.readline(1024**2 + 1)
|
|
8
|
+
if not line:
|
|
9
|
+
return
|
|
10
|
+
if len(line) > 1024**2:
|
|
11
|
+
raise ValueError("mesh text line exceeds 1 MiB")
|
|
12
|
+
try:
|
|
13
|
+
fields = line.decode("utf-8").split("#", 1)[0].split()
|
|
14
|
+
except UnicodeDecodeError:
|
|
15
|
+
raise ValueError("mesh text must be UTF-8") from None
|
|
16
|
+
if fields:
|
|
17
|
+
yield fields[0], fields[1:]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def obj_dependencies(filename):
|
|
21
|
+
references = []
|
|
22
|
+
for kind, values in _statements(filename):
|
|
23
|
+
if kind == "mtllib":
|
|
24
|
+
if not values or any(value.startswith("-") for value in values):
|
|
25
|
+
raise ValueError("OBJ mtllib requires a local material filename")
|
|
26
|
+
references.extend(values)
|
|
27
|
+
return references
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def mtl_dependencies(filename):
|
|
31
|
+
references = []
|
|
32
|
+
maps = {"map_Ka", "map_Kd", "map_Ks", "map_Ke", "map_d", "map_Ns", "map_Bump",
|
|
33
|
+
"map_bump", "bump", "disp", "decal", "norm"}
|
|
34
|
+
for kind, values in _statements(filename):
|
|
35
|
+
if kind in maps:
|
|
36
|
+
if len(values) != 1 or values[0].startswith("-"):
|
|
37
|
+
raise ValueError("MTL texture options/space-containing paths are not supported")
|
|
38
|
+
references.append(values[0])
|
|
39
|
+
return references
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"""Validate model structure and the dependency closure of a source directory."""
|
|
2
|
+
|
|
3
|
+
import math
|
|
4
|
+
import posixpath
|
|
5
|
+
import xml.etree.ElementTree as ET
|
|
6
|
+
|
|
7
|
+
from ._urdf_directory import _file_path
|
|
8
|
+
from ._urdf_dae import dae_dependencies
|
|
9
|
+
from ._urdf_mesh import mtl_dependencies, obj_dependencies
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
_MESH = {".stl", ".obj", ".dae"}
|
|
13
|
+
_TEXTURE = {".png", ".jpg", ".jpeg"}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _CheckedTreeBuilder(ET.TreeBuilder):
|
|
17
|
+
"""Check XML events while building the single tree used by model validation."""
|
|
18
|
+
|
|
19
|
+
def __init__(self, namespaces):
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.namespaces, self.depth = namespaces, 0
|
|
22
|
+
|
|
23
|
+
def start(self, name, attributes):
|
|
24
|
+
self.depth += 1
|
|
25
|
+
if self.depth > 128 or len(attributes) > 128:
|
|
26
|
+
raise ValueError("XML nesting or attribute limit exceeded")
|
|
27
|
+
if not self.namespaces and ("}" in name or any("}" in key for key in attributes)):
|
|
28
|
+
raise ValueError("namespaced URDF/Xacro is not supported")
|
|
29
|
+
if any("${" in value or "$(" in value for value in attributes.values()):
|
|
30
|
+
raise ValueError("Xacro substitutions are not supported")
|
|
31
|
+
return super().start(name, attributes)
|
|
32
|
+
|
|
33
|
+
def end(self, name):
|
|
34
|
+
self.depth -= 1
|
|
35
|
+
return super().end(name)
|
|
36
|
+
|
|
37
|
+
def doctype(self, *args):
|
|
38
|
+
raise ValueError("XML document type declarations and entities are not supported")
|
|
39
|
+
|
|
40
|
+
def pi(self, *args):
|
|
41
|
+
raise ValueError("XML processing instructions are not supported")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _read_xml(filename, *, namespaces=False, max_xml_bytes=8 * 1024**2):
|
|
45
|
+
with filename.open("rb") as stream:
|
|
46
|
+
data = stream.read(max_xml_bytes + 1)
|
|
47
|
+
if len(data) > max_xml_bytes:
|
|
48
|
+
raise ValueError("XML exceeds the 8 MiB size limit")
|
|
49
|
+
|
|
50
|
+
try:
|
|
51
|
+
return ET.fromstring(data, parser=ET.XMLParser(target=_CheckedTreeBuilder(namespaces)))
|
|
52
|
+
except ET.ParseError:
|
|
53
|
+
raise ValueError("malformed XML or unsupported entity") from None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _name(value):
|
|
57
|
+
return (bool(value) and len(value) <= 256 and value.strip() == value
|
|
58
|
+
and not any(character in value for character in "\x00\r\n\t"))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def numbers(values, count):
|
|
62
|
+
if len(values) != count:
|
|
63
|
+
raise ValueError("invalid numeric field length")
|
|
64
|
+
try:
|
|
65
|
+
result = [float(value) for value in values]
|
|
66
|
+
except (ValueError, OverflowError):
|
|
67
|
+
raise ValueError("malformed numeric value") from None
|
|
68
|
+
if not all(math.isfinite(value) for value in result):
|
|
69
|
+
raise ValueError("non-finite numeric value")
|
|
70
|
+
return result
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _urdf_geometry(root):
|
|
74
|
+
dimensions = {"box": {"size": 3}, "cylinder": {"radius": 1, "length": 1},
|
|
75
|
+
"sphere": {"radius": 1}, "mesh": {}}
|
|
76
|
+
for element in root.findall("link/visual") + root.findall("link/collision"):
|
|
77
|
+
geometries = element.findall("geometry")
|
|
78
|
+
if len(geometries) != 1 or len(geometries[0]) != 1:
|
|
79
|
+
raise ValueError("URDF visual/collision geometry requires exactly one shape")
|
|
80
|
+
shape = geometries[0][0]
|
|
81
|
+
if shape.tag not in dimensions or list(shape):
|
|
82
|
+
raise ValueError("unsupported URDF geometry shape")
|
|
83
|
+
for name, count in dimensions[shape.tag].items():
|
|
84
|
+
numbers(shape.get(name, "").split(), count)
|
|
85
|
+
if shape.tag == "mesh" and not shape.get("filename"):
|
|
86
|
+
raise ValueError("URDF mesh requires a filename")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _urdf_numbers(root):
|
|
90
|
+
# Check standard URDF fields only; plugin attributes can have unrelated meanings.
|
|
91
|
+
origins = ("joint/origin", "link/inertial/origin", "link/visual/origin", "link/collision/origin")
|
|
92
|
+
fields = {path: {"xyz": 3, "rpy": 3} for path in origins}
|
|
93
|
+
fields.update({
|
|
94
|
+
"joint/axis": {"xyz": 3},
|
|
95
|
+
"joint/limit": {key: 1 for key in ("lower", "upper", "effort", "velocity")},
|
|
96
|
+
"joint/dynamics": {"damping": 1, "friction": 1},
|
|
97
|
+
"joint/mimic": {"multiplier": 1, "offset": 1},
|
|
98
|
+
"joint/calibration": {"rising": 1, "falling": 1},
|
|
99
|
+
"joint/safety_controller": {key: 1 for key in
|
|
100
|
+
("soft_lower_limit", "soft_upper_limit", "k_position", "k_velocity")},
|
|
101
|
+
"link/inertial/mass": {"value": 1},
|
|
102
|
+
"link/inertial/inertia": {key: 1 for key in ("ixx", "ixy", "ixz", "iyy", "iyz", "izz")},
|
|
103
|
+
"link/visual/geometry/mesh": {"scale": 3},
|
|
104
|
+
"link/collision/geometry/mesh": {"scale": 3},
|
|
105
|
+
"material/color": {"rgba": 4},
|
|
106
|
+
"link/visual/material/color": {"rgba": 4},
|
|
107
|
+
})
|
|
108
|
+
for path, attributes in fields.items():
|
|
109
|
+
for node in root.findall(path):
|
|
110
|
+
for attribute, count in attributes.items():
|
|
111
|
+
if attribute in node.attrib:
|
|
112
|
+
numbers(node.get(attribute).split(), count)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _validate_urdf(root):
|
|
116
|
+
links, joints = root.findall("link"), root.findall("joint")
|
|
117
|
+
if (root.tag != "robot" or not root.get("name") or not 1 <= len(links) <= 10000
|
|
118
|
+
or len(joints) != len(links) - 1):
|
|
119
|
+
raise ValueError("robot requires a name and a bounded link/joint tree")
|
|
120
|
+
|
|
121
|
+
names, joint_names, parents, children = set(), set(), {}, {}
|
|
122
|
+
for link in links:
|
|
123
|
+
name = link.get("name", "")
|
|
124
|
+
if not _name(name) or name in names:
|
|
125
|
+
raise ValueError("empty or duplicate link name")
|
|
126
|
+
names.add(name)
|
|
127
|
+
|
|
128
|
+
# Validate joint names and build the parent/child relationships.
|
|
129
|
+
for joint in joints:
|
|
130
|
+
name = joint.get("name", "")
|
|
131
|
+
if not _name(name) or name in joint_names:
|
|
132
|
+
raise ValueError("empty or duplicate joint name")
|
|
133
|
+
if joint.get("type") not in {"fixed", "revolute", "continuous", "prismatic", "floating", "planar"}:
|
|
134
|
+
raise ValueError("unsupported joint type")
|
|
135
|
+
parent, child = joint.findall("parent"), joint.findall("child")
|
|
136
|
+
if len(parent) != 1 or len(child) != 1:
|
|
137
|
+
raise ValueError("joint requires one parent and one child")
|
|
138
|
+
parent, child = parent[0].get("link"), child[0].get("link")
|
|
139
|
+
if parent not in names or child not in names or parent == child or child in parents:
|
|
140
|
+
raise ValueError("joint has unknown links, a self-cycle, or multiple parents")
|
|
141
|
+
joint_names.add(name)
|
|
142
|
+
parents[child] = parent
|
|
143
|
+
children.setdefault(parent, []).append(child)
|
|
144
|
+
|
|
145
|
+
# Walk the single-root tree to verify connectivity.
|
|
146
|
+
roots = names - parents.keys()
|
|
147
|
+
if len(roots) != 1:
|
|
148
|
+
raise ValueError("robot requires one root")
|
|
149
|
+
visited, queue = set(), list(roots)
|
|
150
|
+
while queue:
|
|
151
|
+
name = queue.pop()
|
|
152
|
+
visited.add(name)
|
|
153
|
+
queue.extend(children.get(name, ()))
|
|
154
|
+
if visited != names:
|
|
155
|
+
raise ValueError("robot tree is disconnected or cyclic")
|
|
156
|
+
|
|
157
|
+
_urdf_geometry(root)
|
|
158
|
+
_urdf_numbers(root)
|
|
159
|
+
|
|
160
|
+
# Inline definitions can repeat a name in real source models. Only URDF
|
|
161
|
+
# materials participate in binding; Gazebo extension material text does not.
|
|
162
|
+
material_nodes = set(root.findall("material") + root.findall("link/visual/material"))
|
|
163
|
+
materials = {node.get("name") for node in material_nodes if list(node) and node.get("name")}
|
|
164
|
+
references = []
|
|
165
|
+
meshes = root.findall("link/visual/geometry/mesh") + root.findall("link/collision/geometry/mesh")
|
|
166
|
+
textures = [texture for material in material_nodes for texture in material.findall("texture")]
|
|
167
|
+
for node in meshes + textures:
|
|
168
|
+
value = node.get("filename", "")
|
|
169
|
+
allowed = _MESH if node.tag == "mesh" else _TEXTURE
|
|
170
|
+
if posixpath.splitext(value)[1].lower() not in allowed:
|
|
171
|
+
raise ValueError("mesh/texture requires a supported filename")
|
|
172
|
+
references.append(value)
|
|
173
|
+
for node in material_nodes:
|
|
174
|
+
if not list(node) and node.get("name") not in materials:
|
|
175
|
+
raise ValueError("unknown URDF material reference")
|
|
176
|
+
for node in root.findall("joint/mimic"):
|
|
177
|
+
if node.get("joint") not in joint_names:
|
|
178
|
+
raise ValueError("mimic refers to an unknown joint")
|
|
179
|
+
return references
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def resolve_reference(source, raw):
|
|
183
|
+
if (not raw or raw.strip() != raw or len(raw.encode("utf-8")) > 512
|
|
184
|
+
or raw.startswith("/") or "//" in raw
|
|
185
|
+
or any(character in raw for character in "\\\x00:%?#") or "${" in raw or "$(" in raw
|
|
186
|
+
or any(ord(character) < 32 or ord(character) == 127 for character in raw)):
|
|
187
|
+
raise ValueError("only package-local relative references are supported")
|
|
188
|
+
resolved = posixpath.normpath(posixpath.join(posixpath.dirname(source), raw))
|
|
189
|
+
_file_path(resolved)
|
|
190
|
+
return resolved
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def validate_directory(directory, entrypoint):
|
|
194
|
+
"""Check model content and references in the prepared source directory."""
|
|
195
|
+
_file_path(entrypoint)
|
|
196
|
+
declared = {file.path for file in directory.files}
|
|
197
|
+
if posixpath.splitext(entrypoint)[1].lower() != ".urdf" or entrypoint not in declared:
|
|
198
|
+
raise ValueError("entrypoint must name a .urdf file in the model directory")
|
|
199
|
+
|
|
200
|
+
# Follow only resources used by this entrypoint. Other package files are attachments.
|
|
201
|
+
pending, visited = {entrypoint}, set()
|
|
202
|
+
while pending:
|
|
203
|
+
source = pending.pop()
|
|
204
|
+
if source in visited:
|
|
205
|
+
continue
|
|
206
|
+
visited.add(source)
|
|
207
|
+
filename, extension = directory.root / source, posixpath.splitext(source)[1].lower()
|
|
208
|
+
try:
|
|
209
|
+
if extension == ".urdf":
|
|
210
|
+
dependencies = _validate_urdf(_read_xml(filename))
|
|
211
|
+
allowed = _MESH | _TEXTURE
|
|
212
|
+
elif extension == ".dae":
|
|
213
|
+
dependencies, allowed = dae_dependencies(_read_xml(filename, namespaces=True)), _TEXTURE
|
|
214
|
+
elif extension == ".obj":
|
|
215
|
+
dependencies, allowed = obj_dependencies(filename), {".mtl"}
|
|
216
|
+
elif extension == ".mtl":
|
|
217
|
+
dependencies, allowed = mtl_dependencies(filename), _TEXTURE
|
|
218
|
+
else:
|
|
219
|
+
continue
|
|
220
|
+
except ValueError as error:
|
|
221
|
+
raise ValueError(f"{source}: {error}") from None
|
|
222
|
+
|
|
223
|
+
for raw in dependencies:
|
|
224
|
+
target = resolve_reference(source, raw)
|
|
225
|
+
if target not in declared:
|
|
226
|
+
raise ValueError(f"{source}: missing dependency: {target}")
|
|
227
|
+
if posixpath.splitext(target)[1].lower() not in allowed:
|
|
228
|
+
raise ValueError(f"{source}: unsupported dependency type: {target}")
|
|
229
|
+
if target not in visited:
|
|
230
|
+
pending.add(target)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: current-data-py
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary: Current Data protobuf messages and schema metadata
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -49,6 +49,15 @@ Set `ENV=test` before the first SDK import to select the test service; an unset
|
|
|
49
49
|
empty value defaults to production. An explicit client `address=` overrides the
|
|
50
50
|
default. Remote examples require service connectivity and accessible data.
|
|
51
51
|
|
|
52
|
+
Downloads and remote reads with a selected bucket default to the storage provider's
|
|
53
|
+
internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
|
|
54
|
+
`open_data`, and bucket-selected `open_td`). Outside that cloud network, pass
|
|
55
|
+
`use_internal_endpoint=False`; there is no automatic public fallback. A supplied
|
|
56
|
+
TOS `endpoint` selects that public address unless internal networking is explicitly
|
|
57
|
+
requested, which remains an error. Uploads still default to public networking.
|
|
58
|
+
Legacy OSS `open_td` without `bucket` retains the server's default read scope and
|
|
59
|
+
does not support network selection. V2/V3 read-credential methods default to internal.
|
|
60
|
+
|
|
52
61
|
Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
|
|
53
62
|
`current_data_py` for the environment's HTTPS Collection callback endpoint on
|
|
54
63
|
`DEFAULT_ADDRESS` (port 443).
|
|
@@ -93,6 +102,19 @@ policy update and ensure the underlying cloud role permits cleanup before use.
|
|
|
93
102
|
There is no persistent checkpoint: a later call starts a new upload. Uploading
|
|
94
103
|
does not register the data; call `ManagementClient.register_data` separately.
|
|
95
104
|
|
|
105
|
+
## URDF packages
|
|
106
|
+
|
|
107
|
+
Use `ManagementClient.upload_urdf(directory, entrypoint, info=...)` to check local
|
|
108
|
+
dependencies, upload source files without overwriting objects, and register one
|
|
109
|
+
asset under a new UUID on each call. Keep the directory unchanged throughout the
|
|
110
|
+
call; validation, hashing and upload read the source directly without private
|
|
111
|
+
copies. Failed calls leave uploaded objects in place and do not resume or recover
|
|
112
|
+
registration on a later call.
|
|
113
|
+
STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
|
|
114
|
+
checked in preview. The result is the locally generated asset UUID; model lists
|
|
115
|
+
provide URDF URLs. See the
|
|
116
|
+
[URDF guide](docs/urdf.md) and run `python -I -m current_data_py.examples.upload_urdf --help`.
|
|
117
|
+
|
|
96
118
|
## Test changes
|
|
97
119
|
|
|
98
120
|
The package bundles generated Protobuf modules during its build. After protocol
|
|
@@ -109,7 +131,7 @@ shared dependencies are left unchanged:
|
|
|
109
131
|
(cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
|
|
110
132
|
python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
|
|
111
133
|
python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
|
|
112
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding multipart docs; do
|
|
134
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
|
|
113
135
|
python -I "current_data_py/tests/check_${check}.py"
|
|
114
136
|
done
|
|
115
137
|
)
|
|
@@ -151,7 +173,7 @@ sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
|
|
|
151
173
|
(
|
|
152
174
|
cd "$sdk_release_dir"
|
|
153
175
|
unset PYTHONPATH PYTHONHOME
|
|
154
|
-
for check in package environment management labeling remote remote_v2 oss tos decoding; do
|
|
176
|
+
for check in package environment management labeling remote remote_v2 oss tos decoding urdf urdf_validation docs; do
|
|
155
177
|
python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
|
|
156
178
|
done
|
|
157
179
|
)
|
|
@@ -2,6 +2,10 @@ MANIFEST.in
|
|
|
2
2
|
README.md
|
|
3
3
|
__init__.py
|
|
4
4
|
_multipart.py
|
|
5
|
+
_urdf_dae.py
|
|
6
|
+
_urdf_directory.py
|
|
7
|
+
_urdf_mesh.py
|
|
8
|
+
_urdf_validation.py
|
|
5
9
|
decoding.py
|
|
6
10
|
docs.py
|
|
7
11
|
labeling.py
|
|
@@ -10,18 +14,25 @@ oss.py
|
|
|
10
14
|
pyproject.toml
|
|
11
15
|
setup.py
|
|
12
16
|
tos.py
|
|
17
|
+
urdf.py
|
|
13
18
|
./__init__.py
|
|
14
19
|
./_multipart.py
|
|
20
|
+
./_urdf_dae.py
|
|
21
|
+
./_urdf_directory.py
|
|
22
|
+
./_urdf_mesh.py
|
|
23
|
+
./_urdf_validation.py
|
|
15
24
|
./decoding.py
|
|
16
25
|
./docs.py
|
|
17
26
|
./labeling.py
|
|
18
27
|
./management.py
|
|
19
28
|
./oss.py
|
|
20
29
|
./tos.py
|
|
30
|
+
./urdf.py
|
|
21
31
|
./examples/__init__.py
|
|
22
32
|
./examples/list_schemas.py
|
|
23
33
|
./examples/read_remote_td.py
|
|
24
34
|
./examples/read_td.py
|
|
35
|
+
./examples/upload_urdf.py
|
|
25
36
|
./examples/write_td.py
|
|
26
37
|
./remote/__init__.py
|
|
27
38
|
./remote/client.py
|
|
@@ -35,10 +46,12 @@ current_data_py.egg-info/dependency_links.txt
|
|
|
35
46
|
current_data_py.egg-info/requires.txt
|
|
36
47
|
current_data_py.egg-info/top_level.txt
|
|
37
48
|
docs/index.md
|
|
49
|
+
docs/urdf.md
|
|
38
50
|
examples/__init__.py
|
|
39
51
|
examples/list_schemas.py
|
|
40
52
|
examples/read_remote_td.py
|
|
41
53
|
examples/read_td.py
|
|
54
|
+
examples/upload_urdf.py
|
|
42
55
|
examples/write_td.py
|
|
43
56
|
remote/__init__.py
|
|
44
57
|
remote/client.py
|
|
@@ -52,4 +65,6 @@ tests/check_labeling.py
|
|
|
52
65
|
tests/check_management.py
|
|
53
66
|
tests/check_oss.py
|
|
54
67
|
tests/check_package.py
|
|
55
|
-
tests/check_remote.py
|
|
68
|
+
tests/check_remote.py
|
|
69
|
+
tests/check_urdf.py
|
|
70
|
+
tests/check_urdf_validation.py
|