5 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Fast Kinematics
This is a cuda enabled library for calculating forward kinematics and Jacobian of a kinematics chain. It can be used with numpy arrays or pytorch tensors. Compared to pytorch_kinematics, this is about 1000 times faster at Jacobian calculation with 4096 parallel 7dof robot arms.
Installation
From PyPi
pip install fast_kinematics
From Source
- Get the docker image
docker pull lexseal/fast_kinematics:latest
- Run the docker image
docker run -it lexseal/fast_kinematics:latest
- Update the repo
cd /workspace/fast_kinematics && git pull
- Run
build.shto build all wheels. The built wheels will showup in thewheelhousedir./build.sh
- Take the wheel out of the docker container. From your host machine, run
docker cp <container_id>:/workspace/fast_kinematics/wheelhouse .
Usage
[!WARNING] Please use dtype
np.float32ortorch.float32for the joint configuration. The library is optimized forfloat32and will not work withfloat64.
[!NOTE] You might need to import torch before using this library as torch will load the shared libraries. Your mileage may vary.
Minimal numpy example:
import numpy as np
from fast_kinematics import FastKinematics
N = 1024 # number of parallel calculations
# need the urdf file, number of parallel calculations and end effector link
model = FastKinematics("kuka_iiwa.urdf", N, "lbr_iiwa_link_7")
# this robot has 7 joints, so the joint configuration has size (N*7,) (1d array)
# the first 7 values are for the first robot... Note we need to use float32!
joint_config = np.random.rand(N*7).astype(np.float32)
# get the forward kinematics size (N*7,) (1d array)
# the first 7 values are the first robot's pose [x,y,z,qw,qx,qy,qz]
ee_pose = model.forward_kinematics(joint_config)
# get the jacobian size (N*6*7,) (1d array) The 7 here is the number of joints
jac = model.jacobian_mixed_frame(joint_config)
# we can reshape the jacobian to (N,7,6) and then transpose to (N,6,7)
jac = jac.reshape(-1, 6, 7).transpose(0, 2, 1)
Minimal pytorch example:
import torch
from fast_kinematics import FastKinematics
N = 1024
model = FastKinematics("kuka_iiwa.urdf", N, "lbr_iiwa_link_7")
joint_config = torch.rand(N*7, dtype=torch.float32, device="cuda")
ee_pose = model.forward_kinematics_pytorch(joint_config)
ee_pose = ee_pose.view(-1,7,6).permute(0,2,1)
There is also a jupyter notebook in the tests folder that contains usage as well as some benchmarks against pytorch_kinematics.
APIs
The docs are embedded in the library itself, you can either print out the doc string or use the code suggestions in your IDE to see the API documentation.
Alternatively, please see pybind11/pybind_fast_kinematics.cpp for the API documentation.
Metadata
Release files for fast-kinematics 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
5 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Built distributions (wheels)
Total release size: 6.6 MB
Release files / fast_kinematics-0.2.2-cp312-cp312-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fast_kinematics-0.2.2-cp312-cp312-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 691.2 kB |
| Tags | CPython 3.12 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
739e0a72cc14dee72debb68112c0a517409b8e1168318ee72371fa1c0f4d48c8
|
|
BLAKE2b-256 checksum How to use checksums |
f76ab1376959b4a405adfd9bc966dc33c49a3a44ccfbf26c0818ad0a94529361
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fast_kinematics-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_kinematics-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 624.3 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0500a63494e69d1e51d9770f4fa429e1d50dbbe27e5c448f8daca32bc4e03bb6
|
|
BLAKE2b-256 checksum How to use checksums |
1b036d52d961d47d0a3847967e477abfd41f4ac4b4b6001a0172359a4981491b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / fast_kinematics-0.2.2-cp311-cp311-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fast_kinematics-0.2.2-cp311-cp311-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 692.1 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
02dc9467bfa26932aebc073cf21dc8e578855bbf6a8f7df658dfa9ffcef0ed4d
|
|
BLAKE2b-256 checksum How to use checksums |
fce32b9928ae4049049c3196689245bf50fb83c693ff476ed3cda4e41ce04efd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fast_kinematics-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_kinematics-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 624.7 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d2e24e736944aa7723f7445c8630d421eb61a6fcd2c23822e9bf4c6bc2d5bf69
|
|
BLAKE2b-256 checksum How to use checksums |
5a6e9f9d89f2c135d33b3c2568962415e9210b7f7e74a9d7646c638cbb5121e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / fast_kinematics-0.2.2-cp310-cp310-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fast_kinematics-0.2.2-cp310-cp310-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 690.6 kB |
| Tags | CPython 3.10 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
f330f66236ff9a23a4fc354bc879f7fd8810be31d4c33424d6305e30c554e602
|
|
BLAKE2b-256 checksum How to use checksums |
8c9c1bd23ab810a027d520ec954a93eb6cf33c51dba03388d8f6c1d49a7c1191
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fast_kinematics-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_kinematics-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 623.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
908f7ec94dfd947028170c0a37b326b3dde1b8c0a14417646e874f3e81b2cd71
|
|
BLAKE2b-256 checksum How to use checksums |
49c7c11523db2e63fd50f87276128bf26f758ffae8fcc997cdbc437029409047
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / fast_kinematics-0.2.2-cp39-cp39-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fast_kinematics-0.2.2-cp39-cp39-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 690.8 kB |
| Tags | CPython 3.9 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
8a31bcfd28931d47ac9d2bc622350c170522b82678b69b2338cada4756212cc3
|
|
BLAKE2b-256 checksum How to use checksums |
e62c47f9e9a75511166fdad4182de76e2faac71f043fcd5e5d95469fb8d3b6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fast_kinematics-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_kinematics-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 624.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c01274f03fda3660c45816a86a5db820ec3d2ebc19abfac66a49451701a308f4
|
|
BLAKE2b-256 checksum How to use checksums |
5701fe14947878e7cc05ed8beebbbf9e92955eb4d462e7a5be6540505835ef35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / fast_kinematics-0.2.2-cp38-cp38-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fast_kinematics-0.2.2-cp38-cp38-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 690.4 kB |
| Tags | CPython 3.8 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
51422ff72e58b6fa5302863993fa944ee816f83edfe9de0381253421e6662a52
|
|
BLAKE2b-256 checksum How to use checksums |
44bd40e0f52f841892747ccb53b07f069a25c04853bc3d1c459f40387d95c47a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fast_kinematics-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_kinematics-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 623.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c31be181899b0ad2600f00899810496a829b54819cc59d012c32ad0d0b32854
|
|
BLAKE2b-256 checksum How to use checksums |
0ae455a1aa4f5dc5126d1ddc566f6aaa37b031dc4292331eecb9bd6ea9c1bbc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|