{"id":22441448,"url":"https://github.com/decargroup/pymlg","last_synced_at":"2025-08-01T18:32:36.030Z","repository":{"id":95801000,"uuid":"477820939","full_name":"decargroup/pymlg","owner":"decargroup","description":"Pure static Lie groups in Numpy, Jax, and C++","archived":false,"fork":false,"pushed_at":"2024-09-14T22:38:16.000Z","size":8014,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-09-15T06:24:09.719Z","etag":null,"topics":["jax","lie-groups","numpy","python","state-estimation"],"latest_commit_sha":null,"homepage":"https://decargroup.github.io/pymlg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decargroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T18:15:58.000Z","updated_at":"2024-09-14T22:37:25.000Z","dependencies_parsed_at":"2023-04-24T06:46:23.665Z","dependency_job_id":"0df2fe10-3280-483d-b559-01819b0425ef","html_url":"https://github.com/decargroup/pymlg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decargroup%2Fpymlg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decargroup%2Fpymlg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decargroup%2Fpymlg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decargroup%2Fpymlg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decargroup","download_url":"https://codeload.github.com/decargroup/pymlg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228397818,"owners_count":17913540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jax","lie-groups","numpy","python","state-estimation"],"created_at":"2024-12-06T02:14:36.008Z","updated_at":"2024-12-06T02:14:36.539Z","avatar_url":"https://github.com/decargroup.png","language":"Python","readme":"# PyMLG - Matrix Lie groups with Numpy, Pytorch, Jax, and C++ implementations!\n![test package](https://github.com/decargroup/pymlg/actions/workflows/test-package.yml/badge.svg)\n\nAn instantiation-free python package for common matrix Lie group operations implemented as __pure static classes__. Using pure static classes keeps the usage extremely simple while still allowing for abstraction and inheritance. We do not introduce new objects with stateful behavior that must be learnt. Everything operates directly on arrays/tensors. This allows users to implement their own more sophisticated objects using these classes as back-end mathematical implementations.\n\n## Installation\nBegin by cloning this repo somewhere. To install, go to the clone directory and run\n\n    pip install -e .\n\n## Documentation\n\nDocumentation can be found here: https://decargroup.github.io/pymlg\n\n## Example\n\n```python\nfrom pymlg import SE3 \nimport numpy as np\n\n# Random pose\nT = SE3.random()\n\n# R^n to group directly (using \"Capital\" notation)\nx = np.array([0.1, 0.2, 0.3, 4, 5, 6])\nT = SE3.Exp(x)\n\n# Group to R^n directly\nx = SE3.Log(T)\n\n# Wedge, vee\nXi = SE3.wedge(x)\nx = SE3.vee(Xi)\n\n# Actual exp/log maps \nT = SE3.exp(Xi)\nXi = SE3.log(T)\n\n# Adjoint matrix representation of group element\nA = SE3.adjoint(T)\n\n# Adjoint representation of algebra element\nad = SE3.adjoint_algebra(Xi)\n\n# Inverse of group element\nT_inv = SE3.inverse(T)\n\n# Group left/right jacobians, and their inverses\nJ_L = SE3.left_jacobian(x)\nJ_R = SE3.right_jacobian(x)\nJ_L_inv = SE3.left_jacobian_inv(x)\nJ_R_inv = SE3.right_jacobian_inv(x)\n\n# ... and more.\n\n```\n### Using Numpy/C++/Jax\nTo explicitly access pure numpy implementations use \n\n```python \nfrom pymlg.numpy import SO2, SO3, SE2, SE3, SE23\n```\n\nTo explicitly access classes which internally use C++ use \n\n```python \nfrom pymlg.cpp import SO3, SE3, SE23\n```\n\nTo explicitly access Jax implementations use\n\n```python \nfrom pymlg.jax import SE2\n```\n\nCurrently, only `SO3`, `SE3`,`SL3` and `SE23` are implemented in C++, with the functions accepting and returning numpy arrays. They are also the default internal implementations when simply using `from pymlg import SO3, SE3, SE23`. For the JAX implementation, the return types will be `jax.numpy` arrays. All operations in the jax implementation can be JIT-compiled. \n\n\n__For all implementations (jax, numpy, C++), the user API is exactly the same! This means that by changing the import statement the example still works.__\n\n\n**Note:** functions which output \"vectors\", such as `SE2.Log(T)` all return a 2D numpy array with dimensions `(n, 1)`.\n\n\n## Running Tests\nIf you use VS Code, you should be able to enable the VS Code testing feature using pytest. Otherwise, you can run tests from the command line when inside this folder using\n\n    pytest tests\n\n## Credit to UTIAS's STARS group\nSome specific implementations came from the [UTIAS STARS Lie group package.](https://github.com/utiasSTARS/liegroups). We wanted a different API and variable ordering, which led to us making our own package. Eventually, this repo evolved to contain more groups, as well as Jax and C++ implementations.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecargroup%2Fpymlg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecargroup%2Fpymlg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecargroup%2Fpymlg/lists"}