pytransform3d

pytransform3d: 3D Transformations for Python - Published in JOSS (2019)

https://github.com/dfki-ric/pytransform3d

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 12 DOI reference(s) in README
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    3 of 27 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

mathematics matplotlib python transformations visualization

Scientific Fields

Mathematics Computer Science - 63% confidence
Last synced: 4 months ago · JSON representation ·

Repository

3D transformations for Python.

Basic Info
Statistics
  • Stars: 681
  • Watchers: 9
  • Forks: 71
  • Open Issues: 4
  • Releases: 45
Topics
mathematics matplotlib python transformations visualization
Created over 8 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

codecov Paper DOI Release DOI

pytransform3d

A Python library for transformations in three dimensions.

pytransform3d offers...

  • operations like concatenation and inversion for most common representations of rotation (orientation) and translation (position)
  • conversions between those representations
  • clear documentation of transformation conventions
  • tight coupling with matplotlib to quickly visualize (or animate) transformations
  • the TransformManager which manages complex chains of transformations (with export to graph visualization as PNG, additionally requires pydot)
  • the TransformEditor which allows to modify transformations graphically (additionally requires PyQt4/5)
  • the UrdfTransformManager which is able to load transformations from URDF files (additionally requires lxml)
  • a matplotlib-like interface to Open3D's visualizer to display and animate geometries and transformations (additionally requires Open3D)

pytransform3d is used in various domains, for example:

  • specifying motions of a robot
  • learning robot movements from human demonstration
  • sensor fusion for human pose estimation
  • collision detection for robots

The API documentation can be found here.

I gave a talk at EuroSciPy 2023 about pytransform3d. Slides are available here.

If you need similar features in JAX (on GPU, vectorized, differentiable), have a look at the experimental library jaxtransform3d.

Installation

Use pip to install the package from PyPI:

bash pip install 'pytransform3d[all]'

or conda:

bash conda install -c conda-forge pytransform3d

Take a look at the installation instructions in the documentation for more details.

Gallery

The following plots and visualizations have been generated with pytransform3d. The code for most examples can be found in the documentation.

Left: Nao robot with URDF from Bullet3. Right: Kuka iiwa. The animation is based on pytransform3d's visualization interface to Open3D.

Visualizations based on Open3D.

Various plots based on Matplotlib.

Transformation editor based on Qt.

Example

This is just one simple example. You can find more examples in the subfolder examples/.

```python import numpy as np import matplotlib.pyplot as plt from pytransform3d import rotations as pr from pytransform3d import transformations as pt from pytransform3d.transform_manager import TransformManager

rng = np.random.default_rng(0)

ee2robot = pt.transformfrompq( np.hstack((np.array([0.4, -0.3, 0.5]), pr.randomquaternion(rng)))) cam2robot = pt.transformfrompq( np.hstack((np.array([0.0, 0.0, 0.8]), pr.qid))) object2cam = pt.transformfrom( pr.activematrixfromintrinsiceulerxyz(np.array([0.0, 0.0, -0.5])), np.array([0.5, 0.1, 0.1]))

tm = TransformManager() tm.addtransform("end-effector", "robot", ee2robot) tm.addtransform("camera", "robot", cam2robot) tm.add_transform("object", "camera", object2cam)

ee2object = tm.get_transform("end-effector", "object")

ax = tm.plotframesin("robot", s=0.1) ax.setxlim((-0.25, 0.75)) ax.setylim((-0.5, 0.5)) ax.set_zlim((0.0, 1.0)) plt.show() ```

output

Documentation

The API documentation can be found here.

The documentation can be found in the directory doc. To build the documentation, run e.g. (on linux):

bash cd doc make html

The HTML documentation is now located at doc/build/html/index.html. Execute the following command in the main folder of the repository to install the dependencies:

bash pip install -e '.[doc]'

Tests

You can use pytest to run the tests of this project in the root directory:

bash pytest

A coverage report will be located at htmlcov/index.html. Note that you have to install pytest to run the tests and pytest-cov to obtain the code coverage report.

Contributing

If you wish to report bugs, please use the issue tracker at Github. If you would like to contribute to pytransform3d, just open an issue or a pull request. The target branch for pull requests is the develop branch. The development branch will be merged to main for new releases. If you have questions about the software, you should ask them in the discussion section.

The recommended workflow to add a new feature, add documentation, or fix a bug is the following:

  • Push your changes to a branch (e.g. feature/x, doc/y, or fix/z) of your fork of the pytransform3d repository.
  • Open a pull request to the latest development branch. There is usually an open merge request from the latest development branch to the main branch.
  • When the latest development branch is merged to the main branch, a new release will be made.

Note that there is a checklist for new features.

It is forbidden to directly push to the main branch. Each new version has its own development branch from which a pull request will be opened to the main branch. Only the maintainer of the software is allowed to merge a development branch to the main branch.

License

The library is distributed under the 3-Clause BSD license.

Citation

If you use pytransform3d for a scientific publication, I would appreciate citation of the following paper:

Fabisch, A. (2019). pytransform3d: 3D Transformations for Python. Journal of Open Source Software, 4(33), 1159, Paper DOI

Bibtex entry:

bibtex @article{Fabisch2019, doi = {10.21105/joss.01159}, url = {https://doi.org/10.21105/joss.01159}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {33}, pages = {1159}, author = {Alexander Fabisch}, title = {pytransform3d: 3D Transformations for Python}, journal = {Journal of Open Source Software} }

Owner

  • Name: DFKI GmbH, Robotics Innovation Center
  • Login: dfki-ric
  • Kind: organization
  • Location: Bremen

Research group at the German Research Center for Artificial Intelligence GmbH.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Fabisch
  given-names: Alexander
title: "pytransform3d"
url: https://github.com/dfki-ric/pytransform3d
doi: 10.5281/zenodo.2553450
preferred-citation:
    type: article
    authors:
    - family-names: Fabisch
      given-names: Alexander
      orcid: https://orcid.org/0000-0003-2824-7956
    title: "pytransform3d: 3D Transformations for Python"
    doi: 10.21105/joss.01159
    journal: Journal of Open Source Software
    start: 1159
    issue: 33
    volume: 4
    month: 1
    year: 2019

GitHub Events

Total
  • Create event: 26
  • Issues event: 35
  • Release event: 9
  • Watch event: 50
  • Delete event: 25
  • Issue comment event: 76
  • Push event: 174
  • Gollum event: 6
  • Pull request review comment event: 127
  • Pull request review event: 129
  • Pull request event: 65
  • Fork event: 6
Last Year
  • Create event: 26
  • Issues event: 35
  • Release event: 9
  • Watch event: 50
  • Delete event: 25
  • Issue comment event: 76
  • Push event: 174
  • Gollum event: 6
  • Pull request review comment event: 127
  • Pull request review event: 129
  • Pull request event: 65
  • Fork event: 6

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 2,136
  • Total Committers: 27
  • Avg Commits per committer: 79.111
  • Development Distribution Score (DDS): 0.059
Past Year
  • Commits: 408
  • Committers: 10
  • Avg Commits per committer: 40.8
  • Development Distribution Score (DDS): 0.083
Top Committers
Name Email Commits
Alexander Fabisch a****h@g****m 2,009
Marat Kopytjuk k****k@g****m 61
Jonas Hablitzel J****l@g****e 10
SuperSocialForce g****g@g****m 7
Daniel Morton d****n@g****m 6
David Wendorff 4****i 5
Alex McClung a****g@h****m 4
Albert Tung t****9@g****m 3
Robert Kampf R****f@g****e 3
barts b****a@o****m 3
teunhoevenaars t****s@g****m 3
Aleks a****c@g****m 2
Alex 5****5 2
Christoph Petzoldt c****t@d****e 2
Erik Holmlund e****d@h****m 2
Jiayuan-Gu j****u@e****u 2
Kyle Chen l****3@g****m 2
Teun Hoevenaars t****s@v****m 1
Arne Böckmann a****e@t****e 1
Alexander Fabisch a****h@A****e 1
Liu Zhen l****v@o****m 1
Mateus m****i@g****t 1
Mitchell Allain a****h@g****m 1
Shimon Wang 3****2@q****m 1
chinaheyu 8****2@q****m 1
u25g31 j****l@a****m 1
vincentme 1****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 83
  • Total pull requests: 136
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 37
  • Total pull request authors: 22
  • Average comments per issue: 1.88
  • Average comments per pull request: 1.38
  • Merged pull requests: 117
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 26
  • Pull requests: 60
  • Average time to close issues: 17 days
  • Average time to close pull requests: 13 days
  • Issue authors: 8
  • Pull request authors: 10
  • Average comments per issue: 1.65
  • Average comments per pull request: 0.98
  • Merged pull requests: 50
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • AlexanderFabisch (44)
  • Mechazo11 (2)
  • stanleyshly (2)
  • romainVala (1)
  • ljmanso (1)
  • maheshkkumar (1)
  • ekmungi (1)
  • scottshambaugh (1)
  • dennisushi (1)
  • ozgur-kurt (1)
  • HernandoR (1)
  • vincentme (1)
  • mitchallain (1)
  • ShimonWang (1)
  • perkomvik (1)
Pull Request Authors
  • AlexanderFabisch (117)
  • kopytjuk (8)
  • ShimonWang (5)
  • JonasHablitzel (2)
  • savidini (2)
  • vincentme (2)
  • clungzta (2)
  • SuperSocialForce (2)
  • danielpmorton (2)
  • yzqin (2)
  • mitchallain (1)
  • ljmanso (1)
  • Jiayuan-Gu (1)
  • HernandoR (1)
  • luckykk273 (1)
Top Labels
Issue Labels
enhancement (20) help wanted (16) new feature (8) feature-request (7) bug (7) open task (6) ongoing discussion (3) test (1) refactor (1) question (1) documentation (1)
Pull Request Labels
test (2) refactor (2) new feature (2) bug (1) ongoing discussion (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 95,903 last-month
  • Total docker downloads: 474
  • Total dependent packages: 9
    (may contain duplicates)
  • Total dependent repositories: 29
    (may contain duplicates)
  • Total versions: 52
  • Total maintainers: 3
pypi.org: pytransform3d

3D transformations for Python

  • Versions: 43
  • Dependent Packages: 7
  • Dependent Repositories: 27
  • Downloads: 95,903 Last month
  • Docker Downloads: 474
Rankings
Dependent packages count: 1.6%
Docker downloads count: 2.5%
Stargazers count: 2.8%
Dependent repos count: 2.8%
Average: 3.0%
Downloads: 3.0%
Forks count: 5.4%
Last synced: 4 months ago
conda-forge.org: pytransform3d
  • Versions: 9
  • Dependent Packages: 2
  • Dependent Repositories: 2
Rankings
Stargazers count: 18.7%
Dependent packages count: 19.6%
Dependent repos count: 20.2%
Average: 20.8%
Forks count: 24.5%
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • beautifulsoup4 *
  • lxml *
  • matplotlib *
  • numpy *
  • open3d *
  • pydot *
  • scipy *
  • trimesh *
setup.py pypi
  • beautifulsoup4 *
  • numpy *
.github/workflows/python-package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1.3.2 composite