crx-kinematics
Forward and inverse kinematics for the FANUC CRX
family of collaborative robots. These are Python bindings for the Rust crate
crx-kinematics, and require only numpy.
The inverse kinematics is complete and direct. For a reachable flange pose it returns every joint configuration that reaches it, up to the sixteen this architecture allows, and it does so without seeding, sampling, or iterating toward a single answer. The method is derived in full in LINEAR_METHOD.md.
pip install crx-kinematics
import numpy as np
from crx_kinematics import Crx
robot = Crx.crx10ia()
# Forward: joint angles in controller degrees to a 4x4 flange pose.
target = robot.fk([10, -80, 10, 20, -20, 45])
# Inverse: every configuration that reaches the pose, as an (n, 6) array.
solutions = robot.ik(target)
# Or just the one nearest to where the arm already is.
best = robot.ik_closest(target, [0, 0, 0, 0, 0, 0])
print(np.round(best.joints, 6), best.residual, best.kind)
Joint angles are in degrees as the robot controller reports them, including the FANUC convention
where the J3 value is measured against J2 rather than against the world. All six kinematically
distinct models are available as Crx.crx3ia() through Crx.crx30ia(), and Crx.from_params
builds a robot from the four link dimensions directly.
Poses cross the boundary as 4x4 NumPy arrays. A target may also be any object with an as_numpy()
method returning one, which is how an engeom Iso3 can be
passed straight through without either package depending on the other:
from engeom.geom3 import Iso3
solutions = robot.ik(Iso3.from_xyzwpr(600, 0, 700, 180, 0, 0))
ik returns joint angles only. ik_detailed returns the same solutions with the residual and the
kind of configuration attached, and fk_all returns the pose of every frame in the chain.
Several configurations are mathematically degenerate, including the wrist center landing on the J1 axis, which an operator can enter directly and which defeats other implementations of this architecture. They are enumerated with their treatment in the derivation.
Link Meshes
The package carries visual geometry for the CRX-5iA and the CRX-10iA: seven triangle meshes each,
covering the stationary base and the six moving links. Vertices are returned as an (n, 3) array
of float64, and faces are returned as an (m, 3) array of uint32. Vertex coordinates are in
millimeters.
from crx_kinematics import Crx, CrxModel, LinkMeshes
robot = Crx.crx10ia()
meshes = LinkMeshes.load(CrxModel.Crx10iA)
for link in meshes.posed(robot, [10, -80, 10, 20, -20, 45]):
print(link.vertices.shape, link.faces.shape)
Index 0 contains the stationary base. Index i contains the link that moves with frame i - 1 of
fk_all. The final mesh is the flange, whose mating face lies on the z = 0 plane of the pose
reported by fk.
An engeom Mesh3 accepts these array shapes and data types, so drawing the robot requires no
conversion:
from engeom.geom3 import Mesh3
drawable = [Mesh3(link.vertices, link.faces) for link in meshes.posed(robot, joints)]
LinkMeshes.load raises ValueError for the other four models. LinkMeshes.is_available checks
whether geometry is present without raising an exception.
The interactive_ik.py example in
examples combines
the meshes with the solver. It draws the robot in a PyVista window and uses the keyboard to move the
flange target. After every key press, it solves the inverse kinematics and moves the arm. The example
requires engeom and pyvista in addition to this package.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Metadata
Release files for crx-kinematics 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crx_kinematics-0.1.2.tar.gz | 596.5 kB | Without provenance | Details for crx_kinematics-0.1.2.tar.gz |
Built distributions (wheels)
Total release size: 7.4 MB
Release files / crx_kinematics-0.1.2.tar.gz
| Download URL | crx_kinematics-0.1.2.tar.gz |
|---|---|
| Size | 596.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83be6fec21e9941d99023de14c8d571059691ce84cdb2d3fba63d53623540539
|
|
BLAKE2b-256 checksum How to use checksums |
bb4c16a2b904d451d072a0713a9aeb4f59c45b0bf133b7b80bab90c40a6fea9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl |
|---|---|
| Size | 687.9 kB |
| Tags | CPython 3.8 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3cc5db74672d3d98160ae13f0385287d9242a49f057f64e7533902eb5447b4ce
|
|
BLAKE2b-256 checksum How to use checksums |
e021fe2bf647568527ee2e1c98944a9955eff0556046308c6f9b377ab52ee47c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 703.2 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5abfc0ad6dcd8c1af7b682b8c8aaf25d99ba0301b7813108e223571377fae0d7
|
|
BLAKE2b-256 checksum How to use checksums |
050fddc2b1a293316c8e2265f4cba15e3285e7fc47b695761e33a09a63b00f0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
10508898999dde2f656c521eb80f1184ebd70ff1c7f8c2a68bc316750b9b7690
|
|
BLAKE2b-256 checksum How to use checksums |
acd4d14a9b7ec0a1c64f26ca139d8e0a4897426e4cab52fdae9efd398a647918
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.8 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4e74ec7493fbb2a82a03bc6b60e5d33c4b41824a185a95920a17860c354fa0cb
|
|
BLAKE2b-256 checksum How to use checksums |
a13bd9e4f23ca7904f18ee01b0fff681605626c82562abea6529ada660b23754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 866.4 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f909e11a961180c1dffea02de28973329a01993fa158b66e3caac735ee3cbe9f
|
|
BLAKE2b-256 checksum How to use checksums |
72efd36ae8789f8147f78f114fe6a27625e5c2e743a714985e3586887c0f33b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 853.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
dce74970a2fa26bf14bfef4c6315a4caa9c062a317076f5ea51283d6265e5c7c
|
|
BLAKE2b-256 checksum How to use checksums |
93d144fac03355449accdbfb88232d7b2f8cfd006fe63b011de45b2c9e42aac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 810.5 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
af7db22adcf2d6dc04156f5fa4a9b346d4cd3f5395219f85cefbb818e3049e6b
|
|
BLAKE2b-256 checksum How to use checksums |
a6b2ad49d6e0d198476a6eb8bed3762f277fbd9696ebb6099afd6b74dfd94af1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 818.0 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d191173a7bed341685f9f9bd4e39ea10271b69e21d6f75c31bfcee165cf3c94
|
|
BLAKE2b-256 checksum How to use checksums |
23f0149e4a407cf3371f4491d9ec72b8b06d10a76aa54fa99dbfd07ad7843052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for crx-kinematics 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.