Skip to main content

This module calculates FK and Jacobian, accelerated by Jax to utilize JIT and GPU parallelization

Project description

kinjax


kinjax is a Python package that provides functions for computing the forward kinematics and Jacobian of a robot. It uses JAX to enable fast computations on GPUs.

Installation

To install the module, run: pip install kinjax

Usage

To use kinjax, you need to provide it with a URDF file that describes the robot you want to compute the forward kinematics and Jacobian for. You can then call get_fk_fn and get_jacobian_fn to create functions that can compute the forward kinematics and Jacobian of the robot, respectively.

Here's an example of how to use kinjax to compute the forward kinematics and Jacobian of a robot:

import jax
import jax.numpy as jnp
import kinjax

end_effector_link_name = "hand"
dof = 6
# Load the URDF file
link_dict, joint_dict = kinjax.get_link_joint_dict("robot.urdf")

# Compute the forward kinematics function for the robot
fk_fn = kinjax.get_fk_fn(link_dict, joint_dict, dof, end_effector_link_name)

# Compute the Jacobian function for the robot
jac_fn = kinjax.get_jacobian_fn(link_dict, joint_dict, dof, end_effector_link_name)

# Compute the forward kinematics and Jacobian for a given joint configuration
q = jnp.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6])
T_fk = fk_fn(q)
J = jac_fn(q) 

License

This project is licensed under the MIT License

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

kinjax-0.0.5.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

kinjax-0.0.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file kinjax-0.0.5.tar.gz.

File metadata

  • Download URL: kinjax-0.0.5.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.1.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.10

File hashes

Hashes for kinjax-0.0.5.tar.gz
Algorithm Hash digest
SHA256 50a601fec6da9b58099db2d9d2b812630dc50e2b7bf4ec9d44b3571c242956e2
MD5 a579aff7c07e86108c2bed54b03c13af
BLAKE2b-256 1746b63e347173dbf2f903256cc639e543a521bb309d715a1575c86a64af010d

See more details on using hashes here.

File details

Details for the file kinjax-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: kinjax-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.1.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.10

File hashes

Hashes for kinjax-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 71a41a4da4c667905b4e517617dc43d2d559ec41430f5dc5923d8426a4d1081f
MD5 ab054dc157f8bb88bbf5a901d1e1a9f7
BLAKE2b-256 7190ff172f45cd2f104d8a766e30057644c6527df7a21c321d4b61f176f85ccf

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