Skip to main content

literobo

Lightweight kinematics utilities for URDF robots, implemented in Rust with Python bindings.

Features

  • Parse URDF files and build a kinematic chain between any two links.
  • Forward kinematics that returns a homogeneous transform.
  • Geometric Jacobian for revolute and prismatic joints.
  • Python bindings powered by PyO3 and packaged with maturin.

Layout

  • src/chain.rs – core kinematics implementation
  • src/python.rs – PyO3 bindings exposed to Python
  • examples/ – ready-to-run assets (planar.urdf, quickstart.py)

Rust usage

use literobo::KinematicChain;

let chain = KinematicChain::from_urdf_file("robot.urdf", "base_link", "tool_link")?;
let pose = chain.forward_kinematics(&[0.0, 0.5, -1.0])?;
let jacobian = chain.jacobian(&[0.0, 0.5, -1.0])?;
println!("Pose:\n{}", pose.to_homogeneous());
println!("Jacobian:\n{}", jacobian);
  • A URDF describes a tree (or forest), so the loader must know which branch to treat as the active sub-chain.
  • Explicit base_link and end_link let the library search only between those two links and ignore unrelated branches when extracting the shortest path.
  • This also clarifies behavior for floating bases or multi–end-effector robots: callers can choose different start/end pairs from one URDF to construct multiple chains as needed.

Development commands

Rust:

cargo fmt
cargo test

Benchmark output (CI)

The Rust test suite includes lightweight benchmark-style tests that print timing results for forward kinematics and Jacobian computations. In CI, tests run with --nocapture so the benchmark lines appear in the GitHub Actions logs. To see the same output locally, run:

cargo test -- --nocapture

To capture Python benchmark output and compare runs, use the helper script:

uv run python benchmarks/python_benchmark.py --output benchmarks/python_baseline.txt
uv run python benchmarks/python_benchmark.py --output benchmarks/python_latest.txt --compare benchmarks/python_baseline.txt

Python (using uv):

uv venv
source .venv/bin/activate
uv run pip install maturin  # build backend
uv run pip install .        # build + install the wheel
uv run python examples/quickstart.py

Python usage

The project is configured for uv so you can manage dependencies and builds without a virtualenv toolchain mismatch.

# Create an isolated environment
uv venv
source .venv/bin/activate

# Install build dependency and compile the wheel
uv run pip install maturin
uv run pip install .
import numpy as np
import literobo

robot = literobo.from_urdf_file("robot.urdf", "base_link", "tool_link")
q = np.array([0.0, 0.5, -1.0])
pose = robot.forward_kinematics(q)
jacobian = robot.jacobian(q)

print("Pose:\n", pose)
print("Jacobian:\n", jacobian)

To publish, run uv build (which delegates to maturin under the hood) and upload the wheel to PyPI with uv publish.

Quick sample run (Python)

Below is a minimal end-to-end example you can run locally:

# 1. Prepare environment (inside repo root)
uv venv
source .venv/bin/activate
uv run pip install maturin  # build backend

# 2. Build & install the wheel from the checked-out source
uv run pip install .

# 3. Run the bundled sample
uv run python examples/quickstart.py

Metadata

Release files for literobo 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for literobo 0.1.7
File Size Uploaded Provenance Actions
literobo-0.1.7.tar.gz 45.1 kB Without provenance Details for literobo-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for literobo 0.1.7
File Interpreter ABI Platform Actions
literobo-0.1.7-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for literobo-0.1.7-cp38-abi3-macosx_11_0_arm64.whl

Total release size: 414.0 kB

Release files / literobo-0.1.7.tar.gz

Download URL literobo-0.1.7.tar.gz
Size 45.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b9cf559342e72e628a731062b6adaa9901a7521af670deee69695b3f81b86c32
BLAKE2b-256 checksum
How to use checksums
f3b180d415908b57100cb8981ea1db7b64db6ce0a89955b3ecdf267bd9eee8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / literobo-0.1.7-cp38-abi3-macosx_11_0_arm64.whl

Download URL literobo-0.1.7-cp38-abi3-macosx_11_0_arm64.whl
Size 369.0 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7151ea9437eaeb9df198e384b873ce06193741a1b7013e01bb4d9b033e0920f2
BLAKE2b-256 checksum
How to use checksums
ab530930fe2500e2d663ab36d2164e091b28d0ca64cdfca1512c34db545857dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Security for literobo 0.1.7

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.

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