Skip to main content

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_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file dm_robotics_transformations-0.0.1rc1-py3-none-any.whl.

File metadata

  • Download URL: dm_robotics_transformations-0.0.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2

File hashes

Hashes for dm_robotics_transformations-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f9896989cd5b0cfcd09777686da250ef0dff32ce87d16db489c1a8bb64083d3
MD5 f9f430f2a83306ad117e50f76eac52b3
BLAKE2b-256 fcb34c4c6f8fe72fd21b4478529cace117afd4f9204856aa9ec800eac08e95d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page