Crates.io | transforms |
lib.rs | transforms |
version | 1.0.0 |
created_at | 2024-10-04 13:16:57.865294+00 |
updated_at | 2025-07-24 17:22:04.393304+00 |
description | A transform library to track reference frames and provide transforms between them. |
homepage | |
repository | https://github.com/deniz-hofmeister/transforms |
max_upload_size | |
id | 1396538 |
size | 178,487 |
A blazingly fast, minimalist and efficient coordinate transform library for robotics and computer vision applications.
This library provides functionality for managing coordinate transformations between different frames of reference.
For more detailed information, please refer to the documentation.
This library supports no_std implementations. By default the feature = "std" is enabled. Disable default features to use the no_std version:
transforms = { version = "1.0.0", default-features = false }
use core::time::Duration;
use transforms::{
geometry::{Quaternion, Transform, Vector3},
time::Timestamp,
Registry,
};
let mut registry = Registry::new(Duration::from_secs(60));
let timestamp = Timestamp::now();
// Create a transform from frame "base" to frame "sensor"
let transform = Transform {
translation: Vector3::new(1.0, 0.0, 0.0),
rotation: Quaternion::identity(),
timestamp,
parent: "base".into(),
child: "sensor".into(),
};
// Add the transform to the registry
registry.add_transform(transform);
// Retrieve the transform
let result = registry.get_transform("base", "sensor", timestamp);
For more in-depth examples please see the examples directory.
Please refer to the Milestones page for an up-to-date roadmap.
This library draws inspiration from ROS2's tf2 (Transform Framework 2), a widely-used transform library in the robotics community. While this crate aims to solve the same fundamental problem of transformation tracking, it does so in its own way. The core functionality of this library is similar to tf2.
A core conceptual difference between ROS2/tf2 and this library is that this library does not attempt to integrate into a communication layer as strongly as tf2 does with the ROS2 RMW DDS layer. If you would like this system to be DDS-enabled then it is left up to the user to write the pub-sub wrapper around this library. This is done based on the ideal that this library should be suitable for monolithic codebases and no_std implementations.
This library intentionally limits its scope to rigid body transformations (translation and rotation) commonly used in robotics and computer vision. The following transformations are explicitly not supported and will not be considered for future implementation:
All the features mentioned above are going beyond the definition of a minimal, precise and predictable library. If you feel like there is a feature here that could be argued as critically-needed, feel free to open an issue with a feature request. We are open to change our minds.
We are grateful for any form of comments, issues, or constructive criticism. Feel free to reach out or create an issue on this page. Feature requests are also more than welcome.
This project is licensed under the MIT License - see the LICENSE file for details.