Differentiable rotations and rigid transforms for CasADi: one C++ core,
a SciPy-style Python API, and support for DM, SX, and MX.
There is currently an issue with PyPI publishing. Install the latest version from GitHub instead (requires Git and a C++17 compiler):
pip install "git+https://github.com/cmower/spatial-casadi.git@master"
# or
uv add "spatial-casadi @ git+https://github.com/cmower/spatial-casadi.git@master"import casadi as cs
from spatial_casadi import Rotation
x = cs.SX.sym("x", 3)
r = Rotation.from_rotvec(x)
f = cs.Function("rotation", [x], [r.as_matrix()])Documentation · C++ installation · Issues · Citation
For development: uv sync, then uv run pytest (C++17 compiler required).
See development instructions for native tests and docs.
2.0.0 — 2026-11-15
- Shared C++ core, Python bindings, CMake packaging, and pip/uv wheel builds.
RigidTransform,Slerp, batches, indexing, broadcasting, and more SciPy-style operations.- Fixed identity derivatives, symbolic matrix conversion, and Euler gimbal-lock cases; added derivative and generated-code tests.
- Simpler documentation and a scalable SVG logo. Removed
deg2rad/rad2deg; legacy spatial classes remain.
See compatibility and migration for supported features, CasADi batch layouts, and intentional differences from SciPy.
| Previous version | Changes |
|---|---|
| 1.1.0 | Fixed rotation-vector conversion; added Transformation.flatten(). |
| 1.0.4 | Added symbolic constructors. |
| 1.0.3 | Added scalar-first and scalar-last quaternion formats. |
| 1.0.1–1.0.2 | Packaging, documentation, and project-link updates. |
| 1.0.0 | Initial Python rotations, translations, and transformations. |