{"id":28926604,"url":"https://github.com/ami-iit/lie-group-controllers","last_synced_at":"2025-07-26T08:37:10.370Z","repository":{"id":42686895,"uuid":"284651612","full_name":"ami-iit/lie-group-controllers","owner":"ami-iit","description":"Header-only C++ library containing controllers designed for Lie Groups.","archived":false,"fork":false,"pushed_at":"2025-07-24T07:16:26.000Z","size":887,"stargazers_count":71,"open_issues_count":1,"forks_count":7,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-07-24T10:56:37.761Z","etag":null,"topics":["cpp","eigen-library","header-only","lie-groups"],"latest_commit_sha":null,"homepage":"https://ami-iit.github.io/lie-group-controllers/","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ami-iit.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,"zenodo":null}},"created_at":"2020-08-03T08:58:11.000Z","updated_at":"2025-07-24T07:16:31.000Z","dependencies_parsed_at":"2025-01-13T18:25:10.144Z","dependency_job_id":"761ef0cb-41ed-4e7b-a1aa-9fc0cd0cccff","html_url":"https://github.com/ami-iit/lie-group-controllers","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":0.0980392156862745,"last_synced_commit":"58a1e2952272b0295476c574d448d93d6713db64"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ami-iit/lie-group-controllers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ami-iit%2Flie-group-controllers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ami-iit%2Flie-group-controllers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ami-iit%2Flie-group-controllers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ami-iit%2Flie-group-controllers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ami-iit","download_url":"https://codeload.github.com/ami-iit/lie-group-controllers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ami-iit%2Flie-group-controllers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266844973,"owners_count":23993983,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","eigen-library","header-only","lie-groups"],"created_at":"2025-06-22T12:11:32.087Z","updated_at":"2025-07-26T08:37:10.363Z","avatar_url":"https://github.com/ami-iit.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003elie-group-controllers \u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://isocpp.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/standard-C++17-blue.svg?style=flat\u0026logo=c%2B%2B\" alt=\"C++ Standard\"/\u003e\u003c/a\u003e\n\u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/BSD%20license-3--Clause-green.svg\" alt=\"Size\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://ami-iit.github.io/lie-group-controllers/doxygen/doc/html/index.html\"\u003e\u003cimg src=\"https://github.com/ami-iit/lie-group-controllers/workflows/GitHub%20Pages/badge.svg\" alt=\"Size\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ami-iit/lie-group-controllers/actions?query=workflow%3A%22C%2B%2B+CI+Workflow%22\"\u003e\u003cimg src=\"https://github.com/ami-iit/lie-group-controllers/workflows/C++%20CI%20Workflow/badge.svg\" alt=\"Size\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e \u003cb\u003eHeader-only C++ library containing controllers designed for Lie Groups\u003c/b\u003e\u003c/p\u003e\n\n## Some theory behind the library\n\nThe library aims to contain some controllers designed in lie groups. The library depends only on `Eigen` and [`manif`](https://github.com/artivis/manif).\n\nAll the controllers defined in `lie-group-controllers` have in common that they inherit from a templated base class ([CRTP](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)). It allows one to write generic code abstracting the controller details. This follows the structure of `manif` and `Eigen`.\n\nThe library implements two controllers:\n1. Proportional Controller (`P controller`)\n2. Proportional Derivative Controller (`PD controller`)\n\nThe controllers have the following form\n\n| Trivialization |                   Proportional Controller                    |              Proportional Derivative Controller              |\n| :------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |\n| Left (default) | $\\psi = \\psi^d + k_p \\text{Log}\\left(X^d \\circ X^{-1}\\right)$ | $\\dot{\\psi} = \\dot{\\psi}^d + k_d \\left(\\psi^d - \\psi \\right) +  k_p \\text{Log}\\left(X^d \\circ X^{-1}\\right)$ |\n| Right | $\\psi = \\psi^d + k_p \\text{Log}\\left(X^{-1} \\circ X^d \\right)$ | $\\dot{\\psi} = \\dot{\\psi}^d + k_d \\left(\\psi^d - \\psi \\right) +  k_p \\text{Log}\\left(X^{-1}\\circ X^d \\right)$ |\n\nwhere `X` and `Xᵈ` are elements of a Lie group. `∘` is the group operator. `ψ` represents an element in the Lie algebra of the Lie group whose coordinates are expressed in `ℝⁿ`.\n\nThe controllers support all the groups defined in `manif`. Namely:\n- ℝ(n): Euclidean space with addition.\n- SO(2): rotations in the plane.\n- SE(2): rigid motion (rotation and translation) in the plane.\n- SO(3): rotations in 3D space.\n- SE(3): rigid motion (rotation and translation) in 3D space.\n\nPlease you can find further information in\n```\nModern Robotics: Mechanics, Planning, and Control,\nKevin M. Lynch and Frank C. Park,\nCambridge University Press, 2017,\nISBN 9781107156302\n```\n\n## Basic Usage\nThe library implements proportional and proportional derivative controllers on Lie groups. What follows are two simple snippets that you can follow to build and use such controllers. For sake of simplicity, only controllers in SO(3) are shown. The very same applies to the other Lie groups\n\n## Proportional controller SO(3)\n```cpp\n// set random initial state and zero feedforward\nmanif::SO3d desiredState, state;\ndesiredState.setRandom();\nstate.setRandom();\nEigen::Vector3d feedForward = Eigen::Vector3d::Zero();\n\n// create the controller.\nProportionalControllerSO3d controller;\n\n// In case you want to use the right trivialized controller\n// ProportionalControllerTplSO3d\u003cTrivialization::Right\u003e controller;\n\n// set the proportional gain\nconst double kp = 10;\ncontroller.setGains(kp);\n\n// set the desired state, the feed-forward, and the state\ncontroller.setDesiredState(desiredState);\ncontroller.setFeedForward(feedForward);\ncontroller.setState(state);\n\n// compute the control law\ncontroller.computeControlLaw();\nconst auto\u0026 controlOutput = controller.getControl();\n```\n\n## Proportional Derivative controller SO(3)\n```cpp\n// set random initial state and zero feedforward\nmanif::SO3d desiredState, state;\ndesiredState.setRandom();\nstate.setRandom();\nmanif::SO3d::Tangent stateDerivative = Eigen::Vector3d::Zero();\nmanif::SO3d::Tangent desiredStateDerivative = Eigen::Vector3d::Zero();\nEigen::Vector3d feedForward = Eigen::Vector3d::Zero();\n\n// create the controller.\nProportionalDerivativeControllerSO3d controller;\n\n// In case you want to use the right trivialized controller\n// ProportionalDerivativeControllerTplSO3d\u003cTrivialization::Right\u003e controller;\n\n// set the proportional and the derivative gains\nconst double kp = 10;\nconst double kd = 2 * std::sqrt(kp);\ncontroller.setGains(kp, kd);\n\n// set the desired state, its derivative, the feed-forward, and the state\ncontroller.setDesiredState(desiredState, desiredStateDerivative);\ncontroller.setFeedForward(feedForward);\ncontroller.setState(state, stateDerivative);\n\n// compute the control law\ncontroller.computeControlLaw();\nconst auto\u0026 controlOutput = controller.getControl();\n```\n\n## Dependeces\n\n- [manif](https://github.com/artivis/manif)\n- [Eigen3](http://eigen.tuxfamily.org/index.php?title=Main_Page)\n- [cmake](https://cmake.org/)\n\n## Source installation \n\n```console\ngit clone https://github.com/GiulioRomualdi/lie-group-controllers.git\ncd lie-group-controllers\nmkdir build \u0026\u0026 cd build\ncmake ../\ncmake --build .\n[sudo] cmake --build . --target install\n```\nIf you want to enable tests set the `BUILD_TESTING` option to `ON`.\n\n## Conda installation\nIn case you do not need the src file of the library, it is possible to install the library also via conda, using the following command: \n\n```console\nconda install -c conda-forge liblie-group-controllers\n```\n\n## Use lie-group-controllers in your project\n\n**lie-group-controllers** provides native CMake support which allows the library to be easily used in CMake projects. Please add in your `CMakeLists.txt`\n\n```cmake\nproject(foo)\nfind_package(LieGroupControllers REQUIRED)\nadd_executable(${PROJECT_NAME} src/foo.cpp)\ntarget_link_libraries(${PROJECT_NAME} LieGroupControllers::LieGroupControllers)\n```\n\n## Bug reports and support\n\nAll types of [issues](https://github.com/ami-iit/lie-group-controllers/issues/new) are welcome.\n\n## Note\n\nThe original version of the library can be found [here](https://github.com/GiulioRomualdi/lie-group-controllers).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fami-iit%2Flie-group-controllers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fami-iit%2Flie-group-controllers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fami-iit%2Flie-group-controllers/lists"}