Unofficial Python bindings for the ASAM OpenCRG C API
Reason this release was yanked:
superseded by 1.0.0
Project description
pycrg
Unofficial Python bindings for the ASAM OpenCRG C API.
Features
- Full non-visual OpenCRG C API coverage in Python
- High-level
DataSet,ContactPoint, andRoadSurfaceAPIs - Stable message callback support
- Experimental allocator callback support behind
PYCRG_ENABLE_UNSAFE_CALLBACKS=1 - Demo scripts and smoke tests
Exposed functionality includes:
- dataset lifecycle and consistency checks
- dataset metadata printing and range/increment queries
- dataset modifier set/get/remove/apply/default operations
- contact point lifecycle and option set/get/remove/default/history operations
- evaluation and transforms:
(u, v) <-> (x, y),(u, v) -> z,(x, y) -> z,(u, v)/(x, y) -> (phi, curv) - global controls: OpenCRG release info, memory release, message level and limits
Public callback APIs:
- Stable/public:
set_message_callbackclear_message_callback
- Experimental/unsafe (
pycrg.experimental):set_calloc_callbackset_realloc_callbackset_free_callbackclear_unsafe_callbacks
Unsafe allocator callbacks are disabled by default and require PYCRG_ENABLE_UNSAFE_CALLBACKS=1.
Legal notice
pycrg is an unofficial community wrapper and is not affiliated with or endorsed by ASAM e.V.
ASAM OpenCRG® is a registered trademark of ASAM e.V.
This package redistributes parts of OpenCRG under Apache License 2.0 and includes required attribution files:
LICENSENOTICE- vendored source license files under
src/pycrg/vendor/opencrg/
Installation
pip install pycrg
Development
0) Install development dependencies
pip install -r requirements-dev.txt
1) Refresh vendor snapshot (before building wheel/sdist)
python tools/vendor_snapshot.py --source ../OpenCRG
--source may point to any local clone of OpenCRG.
2) Build
python -m build
3) Install locally
pip install dist/*.whl
Changelog
Release notes are maintained in CHANGELOG.md.
Minimal usage
from pycrg import ContactPoint, DataSet, RoadSurface
dataset = DataSet.open("tests/data/sample.crg")
cp: ContactPoint = dataset.create_contact_point()
print(dataset.u_range())
print(cp.uv_to_z(0.0, 0.0))
cp.close()
dataset.close()
road = RoadSurface.open("tests/data/sample.crg")
print(road.u_range())
print(road.v_range())
print(road.uv_to_z(0.0, 0.0))
road.close()
Example scripts
Run from project root after install/build.
- C demo ports (
simple,eval_z,eval_xyuv,eval_options) are exception-safe: evaluation/conversion failures are handled as warnings and execution continues. - This behavior is implemented via non-throwing
try_*API methods onContactPoint/RoadSurface. python examples/scripts/basic_roadsurface_demo.pypython examples/scripts/dataset_contactpoint_demo.pypython examples/scripts/message_callback_demo.pypython examples/scripts/simple_demo.pypython examples/scripts/reader_demo.pypython examples/scripts/eval_z_demo.pypython examples/scripts/eval_xyuv_demo.pypython examples/scripts/eval_options_demo.pypython examples/scripts/curvature_demo.pyPYCRG_ENABLE_UNSAFE_CALLBACKS=1 python examples/scripts/unsafe_allocator_callbacks_demo.pyPYCRG_ENABLE_UNSAFE_CALLBACKS=1 python examples/scripts/experimental_allocator_api_demo.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycrg-0.1.1.tar.gz.
File metadata
- Download URL: pycrg-0.1.1.tar.gz
- Upload date:
- Size: 81.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
969ba79b23255326bf82b98dfba8659021c9ad111b0a034a1a7ee99fd2301d50
|
|
| MD5 |
d9686ed7998408a17d64a2866771c652
|
|
| BLAKE2b-256 |
40729c36ada001ce959866726957cd1f529a70f839e4a0dc6b79dc7620af16ff
|
Provenance
The following attestation bundles were made for pycrg-0.1.1.tar.gz:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1.tar.gz -
Subject digest:
969ba79b23255326bf82b98dfba8659021c9ad111b0a034a1a7ee99fd2301d50 - Sigstore transparency entry: 1116906248
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pycrg-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 243.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417562394fa67767b567c05c7244ec3f32fbcb5f89a61e787aa026d4b5e951c1
|
|
| MD5 |
25af07e537be125168c32dab33bce6d8
|
|
| BLAKE2b-256 |
aab60e2cf908d4f5810f93f461d93930e730a539b252e1d190d8259b72bd9dc4
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
417562394fa67767b567c05c7244ec3f32fbcb5f89a61e787aa026d4b5e951c1 - Sigstore transparency entry: 1116906274
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pycrg-0.1.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 231.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a67adcc89fd096f569a72da31a50da66f67bd001f984d213d217b7066ebf1f
|
|
| MD5 |
11610cbc18a8b7c2769a9aed98433b17
|
|
| BLAKE2b-256 |
4cebd2b7d2cbb9789055df73f7d29ed80beb3591dd149b010cea411044210395
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl -
Subject digest:
d0a67adcc89fd096f569a72da31a50da66f67bd001f984d213d217b7066ebf1f - Sigstore transparency entry: 1116906269
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pycrg-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 244.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54c31fd3e27f0c6b0d4c2085ec82b0bd73eb46974fd78ab9a44ed9de8ad1a2a9
|
|
| MD5 |
242de585a564abf412246f62b5237b87
|
|
| BLAKE2b-256 |
c09cdc624473110c774cec7d65e6b716d311e07df891c345a54e5859f0e151a2
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
54c31fd3e27f0c6b0d4c2085ec82b0bd73eb46974fd78ab9a44ed9de8ad1a2a9 - Sigstore transparency entry: 1116906258
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pycrg-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 232.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e86f77e69ae524ec5e7567d2aa9a3ffc7efb6a038558ccf7b21c8b5763ac5364
|
|
| MD5 |
c76911fc45cac4110551dca0049f6bb9
|
|
| BLAKE2b-256 |
3c3ebb8994d395b2c3db3d0ec62071d1b59bfb8cbc7cfc2c25bcc10c6a01de63
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl -
Subject digest:
e86f77e69ae524ec5e7567d2aa9a3ffc7efb6a038558ccf7b21c8b5763ac5364 - Sigstore transparency entry: 1116906254
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pycrg-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 244.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3085d3bf290e50e47b19c8ab96367ce46bea67c9f4378a49e4582662c7b9c20e
|
|
| MD5 |
875fe6bfbd156cef6f3fa79e5ff54962
|
|
| BLAKE2b-256 |
7948f50f5f44493d0b5b2dee6d0bfaea5f34333b6d1839074d1b4d52085965c4
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
3085d3bf290e50e47b19c8ab96367ce46bea67c9f4378a49e4582662c7b9c20e - Sigstore transparency entry: 1116906250
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycrg-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pycrg-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 232.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616f8d72765b4e61d765d30da12bf1f2c55b07fd5b63a2672c69f73b764838e8
|
|
| MD5 |
98f262308325eee5e802122a315a96f1
|
|
| BLAKE2b-256 |
ee7056477aa438ee81d5516141bde07101b15148aeeeef8184e32f5fdc7a56be
|
Provenance
The following attestation bundles were made for pycrg-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:
Publisher:
release.yml on ExpectedArgument/pycrg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycrg-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl -
Subject digest:
616f8d72765b4e61d765d30da12bf1f2c55b07fd5b63a2672c69f73b764838e8 - Sigstore transparency entry: 1116906264
- Sigstore integration time:
-
Permalink:
ExpectedArgument/pycrg@7e8f19d4438ea100b168506126d469e365048004 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ExpectedArgument
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e8f19d4438ea100b168506126d469e365048004 -
Trigger Event:
release
-
Statement type: