Skip to main content

Functions for the lie groups SE(2), SO(2), and SO(3), and SE(3).

Project description

LieGroupsPy

Functions for the Lie Algebra group SE(3)

$$ SE(3) = \begin{bmatrix} R_{11} & R_{12} & R_{13} & t_1 \ R_{21} & R_{22} & R_{23} & t_2 \ R_{31} & R_{32} & R_{33} & t_3 \ 0 & 0 & 0 & 1 \end{bmatrix} $$

where:

  • ( $\mathbf{R} \in SO(3) $) is the rotation matrix.
  • ( $\mathbf{t} \in \mathbb{R}^3 $) is the translation vector.

This representation is commonly used in robotics and computer vision for rigid body transformations.

Screenshot 2025-03-31 at 9 37 41 AM

Install

To install the library run: pip install lie_groups_py

Development

  1. Install Poetry
  2. make init to create the virtual environment and install dependencies
  3. make format to format the code and check for errors
  4. make test to run the test suite
  5. make clean to delete the temporary files and directories
  6. poetry publish --build to build and publish to https://pypi.org/project/lie_groups_py/

Usage

"""Basic docstring for my module."""

import matplotlib.pyplot as plt
import numpy as np
from loguru import logger

from se3_group import se3


def main() -> None:
    """Run a simple demonstration."""
    pose_0 = se3.SE3(
        xyz=np.array([0.0, 0.0, 0.0]),
        rot=np.eye(3),
    )
    pose_1 = se3.SE3(
        xyz=np.array([[2.0], [4.0], [8.0]]),
        roll_pitch_yaw=np.array([np.pi / 2, np.pi / 4, np.pi / 8]),
    )

    logger.info(f"Pose 1: {pose_0}")
    logger.info(f"Pose 2: {pose_1}")

    fig = plt.figure()
    ax = fig.add_subplot(111, projection="3d")
    pose_0.plot(ax)
    pose_1.plot(ax)

    for t in np.arange(0.0, 1.01, 0.1):
        pose_interp = se3.interpolate(pose_1, pose_0, t=t)
        pose_interp.plot(ax)
        logger.info(f"Interpolated Pose at t={t:.2f}: {pose_interp}")

    plt.axis("equal")
    ax.set_xlabel("x-axis")
    ax.set_ylabel("y-axis")
    ax.set_zlabel("z-axis")
    plt.tight_layout()
    plt.show()


if __name__ == "__main__":
    main()

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

lie_groups_py-0.1.6.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

lie_groups_py-0.1.6-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file lie_groups_py-0.1.6.tar.gz.

File metadata

  • Download URL: lie_groups_py-0.1.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for lie_groups_py-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4eafa765d0799770945d1184ef53ee65942f5a64417c44ae9150961e214aefb9
MD5 a113d7fcf373d983676e41d2a40dc01f
BLAKE2b-256 1ae2b8036fbb6eb74292e1aca82099a56b7263cd87ec8bbecd85cceff468e916

See more details on using hashes here.

File details

Details for the file lie_groups_py-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: lie_groups_py-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for lie_groups_py-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0e951c6ee8b1005ad5359412e2dc45091248567ebc36b7b0070c7cf7ec68b5d4
MD5 44f9ad19ed6c6b3bd9f3cc7360d8c488
BLAKE2b-256 da35c16f49cd0f5c563c7fcc911daaf886784560129bffddd1f6d0489bd83f84

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