Skip to main content

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.

Download files

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

Source Distribution

crx_kinematics-0.1.2.tar.gz (596.5 kB view details)

Uploaded Source

Built Distributions

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

crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl (687.9 kB view details)

Uploaded CPython 3.8+Windows ARM64

crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl (703.2 kB view details)

Uploaded CPython 3.8+Windows x86-64

crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (866.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (853.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl (810.5 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl (818.0 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file crx_kinematics-0.1.2.tar.gz.

File metadata

  • Download URL: crx_kinematics-0.1.2.tar.gz
  • Upload date:
  • Size: 596.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 83be6fec21e9941d99023de14c8d571059691ce84cdb2d3fba63d53623540539
MD5 580d79ce186a3fc2d45add5094be7313
BLAKE2b-256 bb4c16a2b904d451d072a0713a9aeb4f59c45b0bf133b7b80bab90c40a6fea9a

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 687.9 kB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3cc5db74672d3d98160ae13f0385287d9242a49f057f64e7533902eb5447b4ce
MD5 9f22aff7e7e76b50371486df3f77e221
BLAKE2b-256 e021fe2bf647568527ee2e1c98944a9955eff0556046308c6f9b377ab52ee47c

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 703.2 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5abfc0ad6dcd8c1af7b682b8c8aaf25d99ba0301b7813108e223571377fae0d7
MD5 46ffd55271a26a98e6a3509e58823d74
BLAKE2b-256 050fddc2b1a293316c8e2265f4cba15e3285e7fc47b695761e33a09a63b00f0a

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 10508898999dde2f656c521eb80f1184ebd70ff1c7f8c2a68bc316750b9b7690
MD5 1e1ffd35d8206e2e1a16014de5da9905
BLAKE2b-256 acd4d14a9b7ec0a1c64f26ca139d8e0a4897426e4cab52fdae9efd398a647918

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ ARM64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4e74ec7493fbb2a82a03bc6b60e5d33c4b41824a185a95920a17860c354fa0cb
MD5 3789a8cd0e363af178947445f4e7798d
BLAKE2b-256 a13bd9e4f23ca7904f18ee01b0fff681605626c82562abea6529ada660b23754

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 866.4 kB
  • Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f909e11a961180c1dffea02de28973329a01993fa158b66e3caac735ee3cbe9f
MD5 9e8b1d463ad89713e788f9eb1cc42442
BLAKE2b-256 72efd36ae8789f8147f78f114fe6a27625e5c2e743a714985e3586887c0f33b3

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 853.6 kB
  • Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dce74970a2fa26bf14bfef4c6315a4caa9c062a317076f5ea51283d6265e5c7c
MD5 8f94f08289c1b40c5e9ac478e3c0a03a
BLAKE2b-256 93d144fac03355449accdbfb88232d7b2f8cfd006fe63b011de45b2c9e42aac2

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 810.5 kB
  • Tags: CPython 3.8+, macOS 11.0+ ARM64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af7db22adcf2d6dc04156f5fa4a9b346d4cd3f5395219f85cefbb818e3049e6b
MD5 150aed4dc89c319071fa7048919f2bde
BLAKE2b-256 a6b2ad49d6e0d198476a6eb8bed3762f277fbd9696ebb6099afd6b74dfd94af1

See more details on using hashes here.

File details

Details for the file crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 818.0 kB
  • Tags: CPython 3.8+, macOS 10.12+ x86-64
  • Uploaded using 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}

File hashes

Hashes for crx_kinematics-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d191173a7bed341685f9f9bd4e39ea10271b69e21d6f75c31bfcee165cf3c94
MD5 7c4f8f0a740a9130ad419b0d3b2bff92
BLAKE2b-256 23f0149e4a407cf3371f4491d9ec72b8b06d10a76aa54fa99dbfd07ad7843052

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

9 files

0.1.1

9 files

0.1.0

9 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