dfki-ric/pytransform3d

3D transformations for Python.

What it solves

Working with 3D rotations and translations is error-prone because there are many conventions and representations. This library provides common operations (like concatenation and inversion) and conversions between the most widely used representations, with clear documentation of the conventions. It also helps manage complex chains of transformations (e.g., from an object to a camera to a robot) and makes it easy to visualize or animate them.

How it works

pytransform3d offers Python modules for rotations and transformations with functions such as transform_from_pq and random_quaternion. The TransformManager stores named transforms and computes composite transforms (e.g., get_transform("end-effector", "object")). A TransformEditor lets you modify transformations graphically (requires Qt). The UrdfTransformManager loads transformations from URDF robot files (requires lxml). Visualization is tightly coupled with Matplotlib for quick plots, and a Matplotlib-like interface to Open3D is provided for displaying and animating geometries and transformations.

Who it’s for

This is aimed at robotics researchers and engineers, and anyone who needs to work with 3D transformations in Python. The README lists example uses such as specifying robot motions, learning robot movements from human demonstration, sensor fusion for human pose estimation, and collision detection for robots.

Highlights

  • Operations (concatenation, inversion) and conversions for most common rotation/translation representations
  • Clear documentation of transformation conventions
  • Tight Matplotlib integration for quick visualization and animation
  • TransformManager for managing complex chains of transformations, with export to graph visualization as PNG (requires pydot)
  • TransformEditor for graphically modifying transformations (requires PyQt4/5)
  • UrdfTransformManager to load transformations from URDF files (requires lxml)
  • Matplotlib-like interface to Open3D’s visualizer for displaying and animating geometries and transformations (requires Open3D)

Related

  • Project
  • Project
  • Project
  • Project
  • Project