dynibo 0.2.0

Tree-structured robot kinematics and dynamics with runtime-size workspace APIs
Documentation

dynibo

Package CI codecov GitHub Release Built with Rust License: MIT

English | 简体中文

dynibo is a fast, lightweight, and reliable library for robot kinematics and dynamics. It loads robot topology from URDF at runtime and provides allocation-free calculations through reusable workspaces. Python and C/C++ interfaces are available on top of the same Rust core.

Features

Fast

Dynibo is written in Rust and keeps allocation outside the calculation loop. After a Workspace and output buffers are created, the main kinematics and dynamics routines reuse that memory without allocating or resizing.

The following Criterion results compare Dynibo with Pinocchio using the same URDF models and joint states. Model construction, workspaces, Pinocchio Data, and output allocation are excluded from the timed region. Speedups are calculated from quick-mode interval medians after subtracting the measured 0.882 ns fixed C ABI overhead from the Pinocchio times.

Across these benchmarks, Dynibo is 1.17–2.70× as fast as Pinocchio. Higher is better.

Model FK Jacobian Gravity RNEA
Serial chain (4 joints) 1.17× 1.58× 1.59× 1.66×
Serial chain (40 joints) 1.24× 1.72× 1.63× 1.91×
Two-leaf tree (7 joints) 2.08× 2.70× 1.89× 1.91×

Measurements were collected on an Intel Core i9-14900K with rustc 1.97.1 and Pinocchio 3.9.0. When Pinocchio is available through pkg-config, reproduce them with:

cargo bench --features pinocchio-bench --bench pinocchio -- --quick

Lightweight

Dynibo intentionally focuses on the most commonly used robot kinematics and dynamics interfaces:

  • forward_kinematics — target-link pose
  • jacobian — target-link Jacobian
  • jacobian_derivative — time derivative of the target-link Jacobian
  • forward_velocity_kinematics — spatial velocity
  • forward_acceleration_kinematics — spatial acceleration
  • inverse_kinematics — damped least-squares IK
  • mass_matrix — joint-space mass matrix
  • coriolis_matrix — Coriolis and centrifugal matrix
  • gravity — gravity compensation with optional external loads
  • inverse_dynamics — recursive Newton–Euler inverse dynamics

The API is built around a small set of types: Robot, Workspace, LinkId, Frame, Twist, and Wrench. Rust, Python, C, and C++ interfaces share the same Rust implementation.

Reliable

Dynibo is thoroughly unit-tested. Tests cover finite-difference kinematics, dynamics regressions, branched robots and external loads, inverse kinematics, invalid inputs, workspace ownership and reuse, and allocation-free calculation. An independent Pinocchio oracle also compares complete FK, Jacobian, Jacobian time-derivative, mass matrix, Coriolis matrix, gravity, and RNEA outputs over deterministic robot states.

The Rust core contains no project-owned unsafe code. CI requires at least 85% line coverage and 75% branch coverage across the Rust workspace.

Dependencies

The Rust core has two direct runtime dependencies:

Python wheels bundle the native library and have no runtime Python dependencies.

Quick start

Rust

Add the Cargo package:

cargo add dynibo

Python

Install the Python package from PyPI:

python -m pip install dynibo

The package is imported as dynibo.

C/C++

Build and install the CMake package:

cmake -S . -B build/c -DCMAKE_BUILD_TYPE=Release
cmake --build build/c --parallel
cmake --install build/c --prefix /opt/dynibo

CMake consumers can use the installed dynibo::dynibo target.

Documentation

Examples

Complete usage examples are available in the examples/ directory.

Supported models

Dynibo supports runtime-sized tree URDFs with revolute, continuous, prismatic, and fixed joints. It rejects invalid topology and reports structured errors for bad input lengths, model-mismatched handles, and solver failures.

Testing

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --workspace --all-targets

Run the complete Rust, Pinocchio, Python, C, and C++ verification suite with:

bash ci/test-all.sh

Contributing

Dynibo is still at an early stage, and we welcome you to help shape and build it with us. Feel free to open an issue for bugs or ideas, submit a pull request with improvements, or contact me anytime to discuss how the project could evolve.

Citation

If Dynibo is useful in your work, please cite it as:

@software{xue2026dynibo,
  author  = {Xue, Xiaojie},
  title   = {Dynibo: a Fast, Lightweight, and Reliable Robot Kinematics and Dynamics Library},
  year    = {2026},
  version = {0.2.0},
  url     = {https://github.com/xiaojie-xue/dynibo}
}