# 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.
```python
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
```python
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)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/deepmind/dm_robotics/tree/main/py/transformations",
"name": "dm-robotics-transformations",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "DeepMind",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# DeepMind Robotics Transformations\n\nTransformations is a pure python library for rigid-body transformations\nincluding velocities and forces.\n\nThe objectives for this library are **simplicity** and **comprehensiveness**\nacross all canonical representations (euler, axis-angle, quaternion,\nhomogeneous matrices).\n\n\n## Supported conversions:\n* Quaternion to Rotation matrix, Axis-angle and Euler-angle\n* Axis-angle to Quaternion, Rotation matrix and Euler-angle\n* Rotation matrix to Quaternion, Axis-angle and Euler-angle\n* Euler-angle to Quaternion, Rotation matrix and Axis-angle\n\n## Quaternions:\nQuaternions are represented with the scalar part (w) first, e.g.\n\n```python\nidentity_quaternion = np.asarray([1, 0, 0, 0]) # w, i, j, k\n```\n\nSupported quaternion operations:\n\n* Difference\n* Distance\n* Multiplication\n* Inverse\n* Conjugate\n* Logarithm and Exponent\n* Slerp (spherical linear interpolation)\n* Rotation of a vector by a quaternion.\n\n## Euler-angles\nAll 24 from-euler orderings are supported.\n7 of 24 to-euler orderings are supported.\n\n## Transforms\nThis library supports force and velocity transforms.\n\n## Usage Example\n\n```python\nfrom dm_robotics.transformations import transformations as tr\n\n# Convert a pose, euler angle into a homogeneous matrix (a 4x4 matrix):\nhmat = tr.poseuler_to_hmat(\n np.array([x, y, z, rot_x, rot_y, rot_z]), 'XYZ')\n\n# Convert the homogeneous matrix to a twist (a 6 vector):\ntwist = tr.hmat_to_twist(hmat)\n```\n\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A library for Rigid Body Transformations",
"version": "0.8.1",
"project_urls": {
"Homepage": "https://github.com/deepmind/dm_robotics/tree/main/py/transformations"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b560b7add00ef1ddfc8398d7442bd37bdee1321fa557f8a4a5e134f54c0b5864",
"md5": "7a24ed723664ae4285ee48a1ca2a1f5b",
"sha256": "22067811a7c9820ee3a78632e019eba93d3fd1e603acc21a9ff5e53d7ffbd064"
},
"downloads": -1,
"filename": "dm_robotics_transformations-0.8.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7a24ed723664ae4285ee48a1ca2a1f5b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 28114,
"upload_time": "2024-06-20T10:34:31",
"upload_time_iso_8601": "2024-06-20T10:34:31.314663Z",
"url": "https://files.pythonhosted.org/packages/b5/60/b7add00ef1ddfc8398d7442bd37bdee1321fa557f8a4a5e134f54c0b5864/dm_robotics_transformations-0.8.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-20 10:34:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deepmind",
"github_project": "dm_robotics",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dm-robotics-transformations"
}