Skip to main content

Blackwell

Test Documentation PyPI Python 3.10+ Apache-2.0

Blackwell is a compact, JAX-native probabilistic-robotics library. It provides manifold-aware Gaussian beliefs, weighted particles, Euclidean, SE(2) and SE(3) state spaces, an extended Kalman filter, a bootstrap particle filter, reproducible simulation and uncertainty metrics.

It is useful today for planar localisation, 3D transform uncertainty, linear state estimation and estimator research, while remaining deliberately pre-alpha: expect API changes before version 1.0.

Documentation · Five-minute localisation · Examples · API reference

Explore the documentation for installation guidance, practical tutorials, runnable examples and the complete API reference.

Install

Blackwell requires Python 3.10 or newer. Install the latest release from PyPI:

python -m pip install blackwell

Blackwell requires jax>=0.6. Python 3.10 selects JAX 0.6.2; newer Python versions select newer compatible JAX releases. The installer uses the Python interpreter running the command. To use Python 3.11 explicitly, run python3.11 -m pip install --upgrade blackwell jax.

Accelerator-specific JAX packages are intentionally not pinned. See the installation guide for GPU/TPU and development setups.

A first SE(2) estimate

import jax
import jax.numpy as jnp

from blackwell import GaussianBelief
from blackwell.filters.ekf import ExtendedKalmanFilter
from blackwell.models import range_bearing
from blackwell.models import se2 as se2_models
from blackwell.spaces import se2

filter_ = ExtendedKalmanFilter(se2, se2_models, range_bearing)
dynamics = se2_models.BodyMotion(
    process_covariance=jnp.diag(jnp.array([0.01, 0.01, 0.0025]))
)
observation = range_bearing.KnownLandmarksRangeBearing(
    landmarks=jnp.array([[5.0, 0.0], [0.0, 5.0]]),
    measurement_covariance=jnp.diag(jnp.array([0.08, 0.02])),
)
belief = GaussianBelief(
    mean=jnp.array([0.0, 0.0, 0.0]),
    covariance=jnp.diag(jnp.array([0.5, 0.5, 0.1])),
)

belief = jax.jit(filter_.step)(
    belief,
    dynamics,
    observation,
    jnp.array([0.3, 0.0, 0.04]),
    range_bearing.observe(jnp.array([0.35, 0.08, 0.05]), observation),
)
print(belief.mean)

SE(2) states are [x, y, heading]; controls and covariance use local body-frame tangent coordinates [forward, lateral, turn].

SE(3) states are [x, y, z, qx, qy, qz, qw], with a scalar-last Hamilton quaternion. Their covariance uses six body-frame coordinates: translation rho followed by rotation vector phi. See the SE(3) uncertainty example for composition, inversion and point transformation with correlated inputs.

What is included?

  • Euclidean and right-retraction SE(2)/SE(3) state spaces
  • Linear dynamics and observations
  • Reusable finite-horizon linear mean predictions and exact input sensitivities
  • SE(2) body-motion and known-landmark range-bearing models
  • Manifold-aware extended Kalman filtering
  • Bootstrap particle filtering with explicit ESS and systematic resampling
  • Reproducible trajectory simulation
  • RMSE, planar position RMSE and NEES metrics
  • Finite-candidate selection regret and observed binary decision counts
  • Runnable linear, SE(2) EKF, particle-localisation and correlated SE(3) examples

Blackwell does not yet include built-in IMU models, smoothing, SLAM state augmentation, data association, sensor drivers or production persistence. See Choose an estimator for the current fit and limits.

Design commitments

  • JAX is the sole numerical backend.
  • Mathematical kernels are pure and beliefs are immutable PyTrees.
  • Manifold uncertainty lives in local tangent coordinates.
  • Geometry, stochastic models and inference remain separate.
  • Random keys, JIT compilation and resampling policy stay explicit.
  • Simulation and consistency metrics are part of the public API.

Run the examples

git clone https://github.com/unswei/blackwell.git
cd blackwell
uv sync --all-extras
uv run python examples/quickstart.py
uv run python examples/linear_kalman_filter.py
uv run python examples/linear_prediction.py
uv run python examples/decision_relevant_model_evaluation.py
uv run python examples/se3_uncertainty.py
uv run python examples/se2_localisation.py --plot localisation.png
uv run python examples/particle_localisation.py --plot particles.png

Contribute

Set up the reproducible development environment and run all local checks:

uv sync --all-extras
uv run ruff check .
uv run pytest
uv run python -m build
uv run mkdocs build --strict

See CONTRIBUTING.md for workflow, test and documentation expectations.

Licence

Blackwell is licensed under the Apache License 2.0.

Metadata

Release files for blackwell 0.0.4

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

Source distribution (sdist)

Source distribution for blackwell 0.0.4
File Size Uploaded Provenance Actions
blackwell-0.0.4.tar.gz 1.8 MB With provenance Details for blackwell-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blackwell 0.0.4
File Interpreter ABI Platform Actions
blackwell-0.0.4-py3-none-any.whl Python 3 none any Details for blackwell-0.0.4-py3-none-any.whl

Total release size: 1.9 MB

Release files / blackwell-0.0.4.tar.gz

Download URL blackwell-0.0.4.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
e99d38bbc84435e28b372320165ecf4c989f6b26b62b9d0204753b2d2eb5e5e0
BLAKE2b-256 checksum
How to use checksums
e91be0acbe7f495f06cda3dcc50fa32ff8b8570c2cb8ac518395a1eb8fd75b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Release files / blackwell-0.0.4-py3-none-any.whl

Download URL blackwell-0.0.4-py3-none-any.whl
Size 38.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807355dc64378ed921869781a404337ca65470ba95f67a7a264764938f221618
BLAKE2b-256 checksum
How to use checksums
98004bb843c43c19ddf4601857a62613a7863706a3ca1374023f1e07e264e753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for blackwell 0.0.4

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for blackwell-0.0.4.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 Nov 3, 2026.

Transparency log

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