Skip to main content

3D rigid-body transformations and rotations

Project description

SE3kit

Documentation Status License Python 3.9+

SE3kit is a lightweight Python library designed for 3D rigid-body transformations and rotations. It provides intuitive wrappers for homogeneous transformations, rotation representations (matrices, Euler angles, quaternions), and geometric primitives.

[!NOTE] This library includes optional ROS compatibility, automatically detecting and converting to/from ROS 1 or ROS 2 geometry messages if available.


🚀 Features

  • Rigid Body Transformations: Easy-to-use 4x4 homogenous transformation matrices (Transformation).
  • Rotations: Comprehensive 3x3 rotation matrix support with conversions to/from Euler angles, Quaternions, and Axis-Angles (Rotation).
  • Translations: Vector arithmetic and unit management (Translation).
  • Homogeneous Points: 4D point representation for SE(3) operations (HPoint).
  • ROS Integration: Seamless conversion between SE3kit objects and ROS geometry_msgs.

📦 Installation

This library is pure Python with minimal dependencies (numpy, numpy-quaternion).

PyPI (Recommended)

To install the latest stable version from PyPI:

pip install se3kit

From Source (Development)

To install the library in editable mode from source:

git clone https://github.com/daniyalmaroufi/se3kit.git
cd se3kit
pip install -e .

Development Setup

For contributors, install the development dependencies (testing, linting, docs):

pip install -e '.[dev]'
pre-commit install

🛠 Usage

Rigid Body Transformations

Create and compose transformations intuitively:

from se3kit.transformation import Transformation
from se3kit.rotation import Rotation
from se3kit.translation import Translation

# Create a transformation: 1 meter up in Z, with identity rotation
t1 = Transformation(Translation([0, 0, 1]), Rotation())

# Compose transformations
t2 = Transformation(Translation([0.5, 0, 0]), Rotation.from_rpy([0, 0, 1.57])) # Rotate 90 deg around Z
t_combined = t1 * t2

Point Transformation

Transform homogeneous points efficiently:

from se3kit.hpoint import HPoint

p = HPoint(0.1, 0.5, 0.0)
p_transformed = t_combined.transform_hpoint(p)

print(p_transformed.xyz) # Access as standard 3D vector

📚 Documentation

Full API documentation is available at: 👉 https://daniyalmaroufi.github.io/se3kit/

Building Docs Locally

You can build the Sphinx documentation locally to preview changes:

cd docs
make html
open _build/html/index.html

🤝 Contributing

We welcome contributions! Please follow these steps to ensure a smooth workflow:

  1. Install Hooks: Run pre-commit install to set up linting hooks.
  2. Test Locally: Run python -m unittest discover -v to ensure all tests pass.
  3. Lint: Code is automatically formatted with black and ruff on commit.

📄 License

Distributed under the Apache 2.0 License. See LICENSE for more information.

✍️ Authors

  • Daniyal Maroufi
  • Omid Rezayof

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

se3kit-1.0.1.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

se3kit-1.0.1-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file se3kit-1.0.1.tar.gz.

File metadata

  • Download URL: se3kit-1.0.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for se3kit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 85ec2cf74128463f2e8db9021a9174cd001c913e00cea41b5bdf86765c322e51
MD5 03bb9868d81997ed61b79244ba1c985f
BLAKE2b-256 b5170895dc902da680f733ca1086b547759c0156bf0ce34b8f582e128757dc8c

See more details on using hashes here.

File details

Details for the file se3kit-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: se3kit-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for se3kit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17579b4c72819d7708f37d6093aca64a0edd3e37bedac1c36b5b1711688020df
MD5 f27aedcda58f68220dce668278df9076
BLAKE2b-256 92c7d4fde185bbb4f9454de1bfac7ecb19c0e490e98d23c813cd9e02ade6e151

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page