This release is a pre-release and may not be stable for production use.
whirl-tf
whirl-tf provides timestamped coordinate-frame transforms for robotics. The
core is implemented in Rust and exposed as both the whirl_tf crate and a
Python package built with PyO3 and maturin.
The transform buffer supports static and dynamic edges, interpolation between dynamic samples, explicit-timestamp lookup, matrix conversion, frame-name validation, and a small set of canonical robot frame constants. It does not extrapolate outside the available dynamic history.
Installation
Install the Python package from PyPI:
pip install whirl-tf
Or add the Rust crate:
cargo add whirl_tf
Python 3.11 and newer are supported. Wheels are published for manylinux x86-64, manylinux AArch64, and macOS Apple silicon.
Python example
from whirl_tf import TransformBuffer
identity = [
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 1.0],
]
buffer = TransformBuffer(history_seconds=10.0)
buffer.insert_transform("field", "odom", identity, stamp_ns=0, is_static=True)
T_odom_to_field = buffer.lookup("odom", "field", stamp_ns=1_000_000_000)
lookup(from_frame, to_frame, stamp_ns) returns a 4 x 4 matrix that maps
coordinates expressed in from_frame into to_frame.
ROS-style Python TransformStamped and TFMessage objects can be inserted
with insert_transform_stamped and insert_transform_message; these methods
use attribute access and therefore do not require a ROS Python dependency.
Rust example
use std::time::Duration;
use nalgebra::Isometry3;
use whirl_tf::TransformBuffer;
let mut buffer = TransformBuffer::new(Duration::from_secs(10));
buffer.insert_isometry("field", "odom", &Isometry3::identity(), 0, true)?;
let odom_to_field = buffer.lookup_ns("odom", "field", 1_000_000_000)?;
# Ok::<(), whirl_tf::TransformBufferError>(())
The crate's default ros feature also exposes minimal ROS 2 transform message
types and conversion helpers. Disable default features when only the
ROS-free timestamp and matrix API is needed:
whirl_tf = { version = "0.1", default-features = false }
Development
The repository contains a Rust core crate and a separate PyO3 binding crate. Pixi provides the development tasks:
pixi run rs-check
pixi run python-stubs
pixi run -e py py-lint
pixi run -e py py-build-wheel
The generated wheel is written to whirl_tf_py/dist/.
License
Licensed under either the Apache License, Version 2.0 or the MIT License, at your option.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 whirl_tf-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: whirl_tf-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 339.1 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8113c2f4da714c8799b7cb229f327deba95b0fd3d870fedc70322d88ab2a26c
|
|
| MD5 |
596b2a6986064f0fbd3fcd6618f6a198
|
|
| BLAKE2b-256 |
8ea6269ef82d6e96dc8d99c130cead4a76efbb310f48fe8ba9b79e11f29c7617
|
File details
Details for the file whirl_tf-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: whirl_tf-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 362.0 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
725a53bc6bedcfd00fb7acd478be5b8a47ecc354deb12ad11f26a022caac60cc
|
|
| MD5 |
9ca11cbc7ca0c1a79665de107d01f9a6
|
|
| BLAKE2b-256 |
70204e883b1c736ef6fb0d7b12b5da23b5a872de71a3ad4e58d9d34d975ac66b
|
File details
Details for the file whirl_tf-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: whirl_tf-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 342.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dbc6520da0452f36f09432a851fe0b43af0378d91d076ba5d2bab9caeca1632
|
|
| MD5 |
addae042fe3055385ab82139816a58a1
|
|
| BLAKE2b-256 |
b6238f39a5acfe3f0b6c44f91e01c3485a4140cf94899b03067e0ea9fad6ebc5
|
File details
Details for the file whirl_tf-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: whirl_tf-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 343.3 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3f34cb55be356688e583ec142b1ab49f363c5c75a2b0dd3c25c1ba345900cbe
|
|
| MD5 |
fd4f54cc597e68f350255375f1054b47
|
|
| BLAKE2b-256 |
e258ceb10cd58f788bd04748c7c34fdc3015607cdf7ae977d91ca9f1ed995b5a
|