LieGroupsPy
Functions for the Lie Algebra group SE(2) and SE(3)
$$ SE(2) = \begin{bmatrix} R_{11} & R_{12} & t_1 \ R_{21} & R_{22} & t_2 \ 0 & 0 & 1 \end{bmatrix} $$
where:
- ( $\mathbf{R} \in SO(2) $) is the rotation matrix.
- ( $\mathbf{t} \in \mathbb{R}^2 $) is the translation vector.
$$ 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.
Install
To install the library run: pip install lie_groups_py
Development
- Install Poetry
make initto create the virtual environment and install dependenciesmake formatto format the code and check for errorsmake testto run the test suitemake cleanto delete the temporary files and directoriespoetry publish --buildto 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()
Metadata
Release files for lie_groups_py 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lie_groups_py-0.2.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lie_groups_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / lie_groups_py-0.2.0.tar.gz
| Download URL | lie_groups_py-0.2.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ae3697727c7e3578e0fa5c832dc2ebb60f2866d44050e79f2722e36109cb83
|
|
BLAKE2b-256 checksum How to use checksums |
fc47dd4a39277d54a845de4f7998da334b1211d7f39be672ca9ca70b08a8299e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0
|
Release files / lie_groups_py-0.2.0-py3-none-any.whl
| Download URL | lie_groups_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b9d349c00f07019c73c1799421e53b41282102ab76108dc820504f0c15d48c5
|
|
BLAKE2b-256 checksum How to use checksums |
cd32aefc217700c1ca98f1726ee79e5819b12e99c5cb168c0c7aeaaab725d350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0
|