Skip to main content

early stage..

Project description

Jaik

JAX analytic inverse kinematics: A fast solver for robots. Currently implemented are UR-robot arms, more will follow.

With vmap batches of 4k on a A100 GPU it reaches ~15M IK solves/s, saturating at ~500M/s at batch sizes of 4M+.

Installation

pip install jaik

It has jax, numpy, and sympy as dependencies.

Usage

UR robots can be imported by name, which uses default DH parameters. Custom DH and PoE parameters as well as URDF as input are planned in the future.

import jax
from jaik import make_robot

fk, ik_full, ik_closest = make_robot("ur10e")

q = jax.random.uniform(jax.random.PRNGKey(0), (6,))
R, p = fk(q)
Qs, valid = ik_full(R,p)
q0 = q * 1.1
q, branch = ik_closest(R, p, q0)

There is an additional optional numba backend installable with pip install "jaik[numba]". Then use it with jaik.make_robot(name, solver="numba"), by default it is solver="jax". For single calls or small batches, numba is significantly faster than jax.

The solvers avoid trigonometric functions where possible. If the first thing you do with the returned joint angles is jnp.sin(q), jnp.cos(q), we can save us both some time by using the keyword sincos=True in make_robot. This returns two values per joint as sin(q), cos(q). For UR robots, this avoids using trigonometric functions altogether.

By default it expects a (3,3) rotation matrix and (3,) vector as input (format="Rp" in make_robot). It can be changed to a single (4,4) matrix with format="T".

Planned

  • Add more robots available by name
  • Support for custom (calibrated) DH & PoE parameters
  • Support for URDF files as input

Benchmarks

The benchmarks were done on a Lenovo ThinkPad:

  • CPU: Intel Core Ultra 7 265U, 32 GB RAM

And on a cluster:

  • CPU: Intel Xeon E5-2698 v4 @ 2.20 GHz (40 cores, 32GB RAM allocated)
  • GPU: NVIDIA A100-SXM4-40GB

By using sincos=True which avoids the atan2 calls by returning sin(q), cos(q) directly:

Some examples

...

Project details


Download files

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

Source Distribution

jaik-0.0.3.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaik-0.0.3-py3-none-any.whl (111.3 kB view details)

Uploaded Python 3

File details

Details for the file jaik-0.0.3.tar.gz.

File metadata

  • Download URL: jaik-0.0.3.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jaik-0.0.3.tar.gz
Algorithm Hash digest
SHA256 504628af6efd4ac63b84fb40e4f2d10763c70a7db445fdb7b194056218e91d66
MD5 bf6158b4a0b6aeb6023724107c3139dd
BLAKE2b-256 88002b0e81d9098d82ec55d3561bb685dae506587411d27a7d6971e0afe5682f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaik-0.0.3.tar.gz:

Publisher: publish.yml on ValentinBhend/jaik

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jaik-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: jaik-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 111.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jaik-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e9af1383be2ebd6bfcaf72b4db9dac9348d4f35ffaf02658453d5db8beb63ba
MD5 ec84a2f64334f032475af29942d0a619
BLAKE2b-256 cd4f0f8e132ce26b7066b31264668c1dbe774994b94dd076c71faba85556f177

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaik-0.0.3-py3-none-any.whl:

Publisher: publish.yml on ValentinBhend/jaik

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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