Skip to main content

pyfabrik

Badge showing number of total downloads from PyPI.

Badge showing number of monthly downloads from PyPI.

Badge showing that code has been formated with Black formatter.

Python 3 implementation of FABRIK (Forward And Backward Reaching Inverse Kinematics).

Installation

pip install pyfabrik

Usage

NOTE: API is still very unstable (until the 1.0 release). Suggestions are welcome.

import pyfabrik
from vectormath import Vector3

initial_joint_positions = [Vector3(0, 0, 0), Vector3(10, 0, 0), Vector3(20, 0, 0)]
tolerance = 0.01

# Initialize the Fabrik class (Fabrik, Fabrik2D or Fabrik3D)
fab = pyfabrik.Fabrik3D(initial_joint_positions, tolerance)

fab.move_to(Vector3(20, 0, 0))
fab.angles_deg # Holds [0.0, 0.0, 0.0]

fab.move_to(Vector3(60, 60, 0)) # Return 249 as number of iterations executed
fab.angles_deg # Holds [43.187653094161064, 3.622882738369357, 0.0]

Goal

Inverse kinematics example with human skeleton.

Roadmap

  • Basic 2D (flat chain)
  • Basic 3D (flat chain)
  • 3D testing sandbox
  • Basic 2D joint movement restrictions
  • Basic 3D joint movement restrictions
  • Complex chain support 2D
  • Complex chain support 3D

Contributing

All contributions are appreciated.

Read the paper paper.

FABRIKs homepage has links to other implementations.

License

MIT License

Copyright (c) 2020 Saša Savić

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for pyfabrik 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfabrik 0.4.0
File Size Uploaded
pyfabrik-0.4.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyfabrik 0.4.0
File Interpreter ABI Platform
pyfabrik-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size:9.3 kB

Release files / pyfabrik-0.4.0.tar.gz

Download URL pyfabrik-0.4.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3eaac67646b1b6f3648726d50b0a9cd31a5644bdfce65832e100542eb20b1b37
BLAKE2b-256 checksum
How to use checksums
68a40eb841babece334e059b5ee2db371e5e1dcf4659e92613503be827535616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.9.16-200.fc33.x86_64

Release files / pyfabrik-0.4.0-py3-none-any.whl

Download URL pyfabrik-0.4.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1564e681c1fa9571ff1c6a8efdb5c73e311d0d6b25ea71a71576c6c1a787abe4
BLAKE2b-256 checksum
How to use checksums
dc1b32331c615d9d8aca0e78b51b38deb4a8b169c9ddf7d2d07ae3349c3c417b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.9.16-200.fc33.x86_64

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page