A library for Rigid Body Transformations
Project description
DeepMind Robotics Transformations
Transformations is a pure python library for rigid-body transformations including velocities and forces.
The objectives for this library are simplicity and comprehensiveness across all canonical representations (euler, axis-angle, quaternion, homogeneous matrices).
Supported conversions:
- Quaternion to Rotation matrix, Axis-angle and Euler-angle
- Axis-angle to Quaternion, Rotation matrix and Euler-angle
- Rotation matrix to Quaternion, Axis-angle and Euler-angle
- Euler-angle to Quaternion, Rotation matrix and Axis-angle
Quaternions:
Quaternions are represented with the scalar part (w) first, e.g.
identity_quaternion = np.asarray([1, 0, 0, 0]) # w, i, j, k
Supported quaternion operations:
- Difference
- Distance
- Multiplication
- Inverse
- Conjugate
- Logarithm and Exponent
- Slerp (spherical linear interpolation)
- Rotation of a vector by a quaternion.
Euler-angles
All 24 from-euler orderings are supported. 7 of 24 to-euler orderings are supported.
Transforms
This library supports force and velocity transforms.
Usage Example
from dm_robotics.transformations import transformations as tr
# Convert a pose, euler angle into a homogeneous matrix (a 4x4 matrix):
hmat = tr.poseuler_to_hmat(
np.array([x, y, z, rot_x, rot_y, rot_z]), 'XYZ')
# Convert the homogeneous matrix to a twist (a 6 vector):
twist = tr.hmat_to_twist(hmat)
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 Distributions
Built Distribution
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 dm_robotics_transformations-0.10.0-py3-none-any.whl.
File metadata
- Download URL: dm_robotics_transformations-0.10.0-py3-none-any.whl
- Upload date:
- Size: 40.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c9cf582b8da16701706ecf87ff0971dd89810901a62d0a92dcb78d525c98fe2
|
|
| MD5 |
0ef993682923d0d065363a9072594620
|
|
| BLAKE2b-256 |
6a77aace110dbe71f211d8c1ab46d5e62ae4bb49ba96acafbbbcdd48a5aa0958
|