Trafolib
The use of 2D and 3D rigid body transformations is common in fields such as robotics and computer vision. This package provides two classes, Trafo2d and Trafo3d, to handle all different representations, such as homogeneous matrices, quaternions, and various flavors of Euler angles. All classes are well tested and documented. The library has few external dependencies and can be easily used in any project requiring transformation computations.
Features
- Class representations for 2D and 3D rigid body transformations
- Conversions from/to rotation matrices, homogeneous matrices, RPY angles, Euler angles, quaternions and Rodrigues vectors
- Inversion and concatenation of transformations
- Transformation of points
- Save to dictionary/JSON, load from dictionary/JSON
- Interpolations of transformations
- Averaging and distance computations
- Visualizations in
Matplotlib - Very well tested in unit tests and various projects
- Permissive License (MIT), code can be used in commercial software
Requirements
- Python >=3.10
- NumPy
- Quaternions in NumPy
- Matplotlib
- pytest and pytest-cov for testing
- Ruff for linting
All dependencies are declared in pyproject.toml.
Installation
It is strongly recommended to use a virtual environment.
For Users (Runtime Only)
This will install the core libraries needed to run Trafolib, without any development tools or tests.
pip install trafolib
2. For Developers
This installation is for contributors who want to run tests or modify the code.
-
Clone the repository:
git clone https://gitlab.com/proebrock/trafolib.git cd trafolib
-
Create a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate # Linux / macOS .venv\Scripts\activate # Windows
-
Install the project with development extras:
pip install -e ".[dev]"
-
Run ruff:
- As a linter:
ruff check - As a formatter:
ruff format
- As a linter:
-
Run all tests:
pytest
About me and the project
My name is Philipp Roebrock and I work as a lecturer at the Institute for Photonics and Robotics at the University of Applied Sciences of the Grisons FHGR in Chur in Switzerland.
If you have any questions or suggestions please drop and issue or a personal message to philipp DOT roebrock AT fhgr DOT ch.
Metadata
Release files for trafolib 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trafolib-1.0.0.tar.gz | 23.4 kB | Without provenance | Details for trafolib-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trafolib-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for trafolib-1.0.0-py3-none-any.whl |
Total release size: 40.7 kB
Release files / trafolib-1.0.0.tar.gz
| Download URL | trafolib-1.0.0.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76823ba9ff6e48e4fe4dd47af228517f23e8c46797d2f3ca2dcef2ea7e297e2b
|
|
BLAKE2b-256 checksum How to use checksums |
8bab065bbbf376215e90705d679cb04811df361bef68ae8a4e36cf21bd90302a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / trafolib-1.0.0-py3-none-any.whl
| Download URL | trafolib-1.0.0-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d816dc00626c981fbbe3b2f74cfa9c7742d92baedf68bcbefcc0f8f07c54360
|
|
BLAKE2b-256 checksum How to use checksums |
6fe225438f61297201d12f14e83ee9cb9008f15badd62c16cee882afedcac8a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for trafolib 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.