Metadata-Version: 2.4
Name: compas_fab_native
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Requires-Dist: compas-fab>=2.1,<3
Requires-Dist: numpy
Requires-Dist: bump-my-version ; extra == 'dev'
Requires-Dist: maturin>=1.9,<2 ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Requires-Dist: markdown-callouts>=0.4 ; extra == 'docs'
Requires-Dist: mike ; extra == 'docs'
Requires-Dist: mkdocs>=1.6 ; extra == 'docs'
Requires-Dist: mkdocs-autorefs>=1.4 ; extra == 'docs'
Requires-Dist: mkdocs-material>=9.5 ; extra == 'docs'
Requires-Dist: mkdocstrings[python] ; extra == 'docs'
Provides-Extra: dev
Provides-Extra: docs
License-File: LICENSE
License-File: NOTICE
License-File: licenses/Apache-2.0.txt
License-File: licenses/THIRD_PARTY_RUST.txt
License-File: licenses/robowflex_resources-MIT.txt
License-File: licenses/ur_kinematics-BSD-3-Clause.txt
Summary: Native (Rust) planning backend for compas_fab: batched kinematics, collision checks, Cartesian and free-motion planning.
Keywords: robotics,motion planning,inverse kinematics,collision checking,compas,compas_fab,digital fabrication
Author-email: Gramazio Kohler Research <gramaziokohler@arch.ethz.ch>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/compas-dev/compas_fab_native/blob/main/CHANGELOG.md
Project-URL: Documentation, https://compas.dev/compas_fab_native
Project-URL: Forum, https://forum.compas-framework.org/
Project-URL: Homepage, https://compas.dev/compas_fab_native
Project-URL: Issues, https://github.com/compas-dev/compas_fab_native/issues
Project-URL: Repository, https://github.com/compas-dev/compas_fab_native

# compas_fab_native

A planning backend for [compas_fab](https://github.com/compas-dev/compas_fab) whose work
happens in a compiled Rust core inside the Python process: no Docker, no PyBullet, no ROS.

It is experimental. The API is the usual compas_fab backend API, but what it supports is
limited and may change. The [documentation](https://compas.dev/compas_fab_native) covers
what it does, its trade-offs and how it works; [`SPIKE.md`](SPIKE.md) has the design notes,
measurements and open issues.

## Install

```bash
pip install compas_fab_native
```

Wheels are available for Linux (x86_64), macOS (Intel and Apple Silicon) and Windows (x64),
for Python 3.9 and later. Elsewhere, pip builds from source, which needs a
[Rust toolchain](https://rustup.rs).

## Use

```python
from compas_fab.backends import UR5Kinematics
from compas_fab_native import NativePlanner

planner = NativePlanner(UR5Kinematics())
```

More examples are in [`docs/files/`](docs/files).

## Repository layout

| Path | Contents |
|---|---|
| `crates/` | Rust workspace: the core (`motion_core`), exact checks and sphere fitting (`motion_exact`), GPU kernels (`motion_gpu`), benchmarks (`motion_bench`) and Python bindings (`motion_py`) |
| `src/compas_fab_native/` | The compas_fab backend: `NativePlanner` and the robot model translation |
| `tests/` | Python tests of the backend; the Rust tests live in each crate |
| `docs/` | Documentation, examples and diagrams |
| `demo/live_viewer/` | Live browser demo |
| `scripts/`, `fixtures/`, `results/` | Benchmark tooling, robot and scene data, and recorded results |

## Development

With a [Rust toolchain](https://rustup.rs) installed:

```bash
pip install -e ".[dev]"     # builds the extension; rerun after changing Rust code
python -m pytest
cargo test --workspace --exclude motion_py --release
ruff check && ruff format --check
```

Documentation: `pip install -e ".[docs]"`, then `mkdocs serve`.

## Releasing

1. Run the **prepare release** workflow (Actions tab) with the kind of bump. It opens a
   release pull request that bumps the version and dates the changelog.
2. Review and merge it. The **release** workflow then builds and tests the wheels and the
   source distribution, publishes them to PyPI, creates the GitHub release and deploys the
   documentation.

## License

MIT, see [`LICENSE`](LICENSE). Third-party code, data and algorithms used here are credited
in [`NOTICE`](NOTICE), with their licenses in [`licenses/`](licenses), including those of
the Rust crates compiled into the extension.

