Skip to main content

SE3 utilities and robot kinematics

Project description

SE3kit

Documentation Status License Python 3.9+

SE3kit is a lightweight Python library designed for 3D rigid-body transformations, rotations, and robot kinematics. It provides intuitive wrappers for homogeneous transformations, rotation representations (matrices, Euler angles, quaternions), and geometric primitives, along with a flexible forward kinematics solver for serial manipulators.

[!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).

From Source (Recommended)

To install the library in editable mode:

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.0.tar.gz (36.6 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.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: se3kit-1.0.0.tar.gz
  • Upload date:
  • Size: 36.6 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.0.tar.gz
Algorithm Hash digest
SHA256 250d9e1775dc05043a6c4c952311d20d07a8ea167aae63405d00b3d685887a0b
MD5 c78d945f570d6b625d2400f41f7d74cf
BLAKE2b-256 390511b074c296c919bc12ef2588b4fe04929b5822f47d48e71df4f8c155be7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: se3kit-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5acc32e609c9f0a0f3b7a08be61bd566cbd519007a96edf3c51cba4e26548fea
MD5 ec89f09e64257f67f70efc59d2f0f733
BLAKE2b-256 ccd22290372351ba25aa4f1fe3a7a2729b81a087311eac8c1a5766dcdb67a257

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