robot-toolkit
v0.3.0 — Fast 6-DOF serial manipulator toolkit with IK, rigid body dynamics, trajectory planning, collision detection (GJK/EPA mesh), RRT* path planning, URDF parsing, and meshcat visualization. C++ accelerated.
Key features:
- DH parameter forward kinematics
- Damped least-squares IK (Levenberg-Marquardt)
- Geometric Jacobian computation
- Rigid body dynamics (RNEA, CRBA)
- Trajectory planning (linear, cubic, quintic, trapezoidal, S-curve, Cartesian, waypoints)
- Collision detection — sphere, box, capsule, triangle mesh (GJK + EPA)
- RRT* path planning
- URDF parser
- 3D visualization (matplotlib + meshcat with hardware streaming)
- Hardware abstraction layer (simulated + extensible HAL)
- C++ extensions (137x faster IK, 358x faster dynamics)
Quick Start
pip install -e .
# Run tests
pytest tests/ -v
Install optional extras:
pip install -e ".[viz]" # matplotlib 3D viz
pip install -e ".[meshcat]" # meshcat interactive viz
pip install -e ".[collision]" # mesh collision (GJK/EPA, requires scipy)
pip install -e ".[dev]" # dev tools (pytest, black, ruff, mypy)
pip install -e ".[all]" # everything above
Usage
from robot_ik import six_dof_articulated
import numpy as np
robot = six_dof_articulated()
# Define target pose as 4x4 homogeneous transform
target = np.array([
[0, -1, 0, 0.5],
[0, 0, -1, 0.2],
[1, 0, 0, 0.4],
[0, 0, 0, 1.0],
])
# Solve IK
success, joint_angles, iterations, errors = robot.ik_solve(target)
print(f"Solved in {iterations} iterations, angles: {joint_angles}")
# Verify
T = robot.forward_kinematics(joint_angles)
print(f"Position error: {np.linalg.norm(T[:3,3] - target[:3,3]):.6f} m")
Custom Robot
from robot_ik import RobotModel, DHParam
import numpy as np
my_robot = RobotModel([
DHParam(a=0, alpha=-np.pi/2, d=0.35, theta=0),
DHParam(a=0.6, alpha=0, d=0, theta=0),
DHParam(a=0.1, alpha=-np.pi/2, d=0, theta=0),
DHParam(a=0, alpha=np.pi/2, d=0.4, theta=0),
DHParam(a=0, alpha=-np.pi/2, d=0, theta=0),
DHParam(a=0, alpha=0, d=0.08, theta=0),
], joint_limits=[(-3.14, 3.14)] * 6)
Performance
| Metric | Value |
|---|---|
| Avg solve time | ~3 ms |
| P50 solve time | ~2 ms |
| P95 solve time | ~8 ms |
| Typical iterations | 5-15 |
| Position accuracy | <0.1 mm |
| Orientation accuracy | <0.001 rad |
Benchmarked on 6-DOF articulated robot, 200 random target poses.
Project Structure
src/robot_ik/ # Source (src layout)
├── __init__.py # Public API re-exports (v0.3.0)
├── ik/ # IK solver + C++ wrapper
├── dynamics/ # Rigid body dynamics
├── trajectory/ # Trajectory planning
├── collision/ # Collision detection (GJK/EPA mesh)
├── path_planning/ # RRT* path planning
├── urdf/ # URDF parsing
├── visualization/ # matplotlib + meshcat + HAL streaming
└── hardware/ # Hardware abstraction layer
tests/ # 141 tests across 7 modules
├── ik/
├── dynamics/
├── trajectory/
├── collision/ # GJK, EPA, mesh, benchmark, integration
├── path_planning/
└── visualization/ # meshcat + HAL streaming
csrc/ # C++ extension sources
├── ik_fast.cpp
└── robot_dyn_fast.cpp
docs/
├── tutorial/ # 8 markdown tutorials (t0–t7)
├── zh/ # Chinese translations
└── ... # Architecture, design, benchmarks
examples/ # Example scripts + notebook
├── solve_ik.py # Complete
├── tutorial_ik.ipynb # Complete
├── dual_arm_pick_place.py # Draft
└── force_simulation.py # Draft
C++ Extension
Build from source:
pip install -e . # setuptools (pyproject.toml) handles pybind11 build
from robot_ik.ik import FastIKSolver
solver = FastIKSolver(dh_params, joint_limits)
success, angles, iters, errors = solver.ik_solve(target_pose)
# Average: 0.09 ms (vs 12.6 ms pure Python)
| Metric | Python | C++ | Speedup |
|---|---|---|---|
| Avg solve | 12.6 ms | 0.09 ms | 137x |
| P50 solve | 5.4 ms | 0.03 ms | 180x |
| P95 solve | 36.9 ms | 0.56 ms | 66x |
Dynamics solver (RNEA forward dynamics):
| Metric | Python | C++ | Speedup |
|---|---|---|---|
| Avg solve | 4.2 ms | 0.01 ms | 358x |
License
MIT — see LICENSE file.
Metadata
Release files for robot-ik 0.4.0
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 |
|---|---|---|---|---|
| robot_ik-0.4.0.tar.gz | 68.6 kB | With provenance | Details for robot_ik-0.4.0.tar.gz |
Built distributions (wheels)
Total release size: 8.9 MB
Release files / robot_ik-0.4.0.tar.gz
| Download URL | robot_ik-0.4.0.tar.gz |
|---|---|
| Size | 68.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b241c01d2606c81e3f31dffb2e6240e380d8c7a87b34b75b5f93a8435ab5658a
|
|
BLAKE2b-256 checksum How to use checksums |
7f21043a80a96f8e0a684e21346b8934a430607496daa81df0f52db16097e7d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp312-cp312-win_amd64.whl
| Download URL | robot_ik-0.4.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 203.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5456f57ce61c7238354ec46a4b2e268abe85e88782d209c63b7cfc61c4b640e7
|
|
BLAKE2b-256 checksum How to use checksums |
f7fbf7d0eb08f466b3ce536bb15e84315bc21b0b0e1bd38b69027a85bfb3692a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | robot_ik-0.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac364828e1be7106ee341d1ac158c2edb78f6d65b549b84622f4cffb4d84883c
|
|
BLAKE2b-256 checksum How to use checksums |
06f4dcbb0bb256c367e11d5e8599204ad83e928f6ac2d83d9a019fda25bdcf35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | robot_ik-0.4.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 221.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
420bb95c45c1dc8b577cf2cb5f86ef8c3ba4796fa3c91a7aa7a2691374d1accd
|
|
BLAKE2b-256 checksum How to use checksums |
04d182b94e8bf1b704e0d9792a5fa5db60760a3a018160f32d894bf9f78278f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp311-cp311-win_amd64.whl
| Download URL | robot_ik-0.4.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 200.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
66add6e9747e5df02be5b7d77dc9aa5c7008bd5957dc6e0ca8f1032eab0d5505
|
|
BLAKE2b-256 checksum How to use checksums |
8c65640caf9f2abdadf4f05b0f63ff13f628526fff30359f10435745304e33b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | robot_ik-0.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a8228974674b161e31831e6d33360b8318d5e8271441bc6a1e7b29c735d814b2
|
|
BLAKE2b-256 checksum How to use checksums |
f7a0eed0e9bc61bfbd04cfcc69def93500352adb8c83b552ffd8c622943cfb6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | robot_ik-0.4.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 216.6 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
060e92fdafda9fc4dddea57523f330285787036f1c8c19904fdcd6be01e0e1ee
|
|
BLAKE2b-256 checksum How to use checksums |
ed4000e6abfe6520c2568d89b9cf5819c2a18e672b256dc584a6ef822bf53cea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp310-cp310-win_amd64.whl
| Download URL | robot_ik-0.4.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 199.1 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7970ecc27e22aa5238da53e164e35a1483a9d78986263ff4ef9be3021aed089b
|
|
BLAKE2b-256 checksum How to use checksums |
88630a896d36caa03ce570b9e80c14493187d99eec84c66689e6f23b56763108
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | robot_ik-0.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4d1f48ea69a260406519aff8e8159f57d82b5104467664d942462e08542cadf9
|
|
BLAKE2b-256 checksum How to use checksums |
1b92a3c06bc46767125fec4ef65d8d4831dab09c21ecff3de158edde78ec58a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / robot_ik-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | robot_ik-0.4.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 214.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5295a3ef294332526355c7defe9a44f1e5e133396fca2986f19b535b7561327b
|
|
BLAKE2b-256 checksum How to use checksums |
3efd9be5d46f095bce56e61804b595bfb5bfd9ff8b44a77713e080a0d846016b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logSecurity for robot-ik 0.4.0
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.
Full provenance
All 10 files in this release have been uploaded with provenance metadata.
Attestation for robot_ik-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logA 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.