{"id":15296128,"url":"https://github.com/rainerkuemmerle/g2o","last_synced_at":"2025-05-13T19:09:28.902Z","repository":{"id":2212056,"uuid":"3161336","full_name":"RainerKuemmerle/g2o","owner":"RainerKuemmerle","description":"g2o: A General Framework for Graph Optimization","archived":false,"fork":false,"pushed_at":"2025-04-20T08:35:46.000Z","size":10762,"stargazers_count":3213,"open_issues_count":10,"forks_count":1120,"subscribers_count":111,"default_branch":"master","last_synced_at":"2025-04-27T04:54:02.863Z","etag":null,"topics":["c-plus-plus","cpp","g2o","graph-optimization","slam"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RainerKuemmerle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2012-01-12T10:18:45.000Z","updated_at":"2025-04-25T06:49:11.000Z","dependencies_parsed_at":"2023-02-19T01:01:42.507Z","dependency_job_id":"f859ae79-4c29-4577-be75-9f31a5486ae5","html_url":"https://github.com/RainerKuemmerle/g2o","commit_stats":{"total_commits":1312,"total_committers":103,"mean_commits":"12.737864077669903","dds":0.6768292682926829,"last_synced_commit":"ce14518bea0323b77eb6e807a11e0bb5c2e2dd60"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RainerKuemmerle%2Fg2o","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RainerKuemmerle%2Fg2o/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RainerKuemmerle%2Fg2o/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RainerKuemmerle%2Fg2o/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RainerKuemmerle","download_url":"https://codeload.github.com/RainerKuemmerle/g2o/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251089605,"owners_count":21534518,"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":["c-plus-plus","cpp","g2o","graph-optimization","slam"],"created_at":"2024-09-30T18:09:29.618Z","updated_at":"2025-04-27T04:54:05.048Z","avatar_url":"https://github.com/RainerKuemmerle.png","language":"C++","readme":"# g2o - General Graph Optimization\n\nLinux/Mac: [![CI](https://github.com/RainerKuemmerle/g2o/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/RainerKuemmerle/g2o/actions/workflows/ci.yml)\nWindows: [![win64](https://github.com/RainerKuemmerle/g2o/actions/workflows/windows.yml/badge.svg?branch=master)](https://github.com/RainerKuemmerle/g2o/actions/workflows/windows.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/280c5eed95ed4059ad5d003d59e72704)](https://app.codacy.com/gh/RainerKuemmerle/g2o/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" width=\"250\" srcset=\"doc/pics/g2o-logo-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" width=\"250\" srcset=\"doc/pics/g2o-logo.svg\"\u003e\n    \u003cimg alt=\"g2o logo\" width=\"250\" src=\"doc/pics/g2o-logo.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\ng2o is an open-source C++ framework for optimizing graph-based nonlinear error\nfunctions. g2o has been designed to be easily extensible to a wide range of\nproblems and a new problem typically can be specified in a few lines of code.\nThe current implementation provides solutions to several variants of SLAM and\nBA.\n\nA wide range of problems in robotics as well as in computer-vision involve the\nminimization of a non-linear error function that can be represented as a graph.\nTypical instances are simultaneous localization and mapping (SLAM) or bundle\nadjustment (BA). The overall goal in these problems is to find the\nconfiguration of parameters or state variables that maximally explain a set of\nmeasurements affected by Gaussian noise. g2o is an open-source C++ framework\nfor such nonlinear least squares problems. g2o has been designed to be easily\nextensible to a wide range of problems and a new problem typically can be\nspecified in a few lines of code. The current implementation provides solutions\nto several variants of SLAM and BA. g2o offers a performance comparable to\nimplementations of state-of-the-art approaches for the specific problems\n(02/2011).\n\n## Python and updated memory management\n\nThe branch [pymem](https://github.com/RainerKuemmerle/g2o/tree/pymem) contains a python wrapper and switches to smart pointer instead of RAW pointers.\nIt is currently experimental but PRs and improvements are welcome - as always.\n\nSee [g2o-python](https://github.com/miquelmassot/g2o-python) for the pypi release of g2o's python bindings.\n\n## Papers Describing the Approach\n\nRainer Kuemmerle, Giorgio Grisetti, Hauke Strasdat,\nKurt Konolige, and Wolfram Burgard\n[g2o: A General Framework for Graph Optimization](http://ais.informatik.uni-freiburg.de/publications/papers/kuemmerle11icra.pdf)\nIEEE International Conference on Robotics and Automation (ICRA), 2011\n\n## Documentation\n\nA detailed description of how the library is structured and how to use and extend it can be found in /doc/g2o.pdf\nThe API documentation can be generated as described in doc/doxygen/readme.txt\n\n## License\n\ng2o is licensed under the BSD License. However, some libraries are available\nunder different license terms. See below.\n\nThe following parts are licensed under LGPL v2.1+:\n\n-   csparse_extension\n\nThe following parts are licensed under GPL3+:\n\n-   g2o_viewer\n-   g2o_incremental\n-   slam2d_g2o (example for 2D SLAM with a QGLviewer GUI)\n\nPlease note that some features of CHOLMOD (which may be used by g2o, see\nlibsuitesparse below) are licensed under the GPL. To avoid the GPL, you may\nhave to re-compile CHOLMOD without including its GPL features. The CHOLMOD\nlibrary distributed with, for example, Ubuntu or Debian includes the GPL\nfeatures. For example, the supernodal factorization that is licensed under GPL\nis considered by g2o if it is available.\n\nWithin sub-folders we include software not written by us to guarantee easy compilation and integration into g2o itself.\n\n-   ceres: BSD (see g2o/autodiff/LICENSE)\n    Extracted headers to perform Automatic Differentiation.\n\n-   freeglut: X-Consortium (see g2o/EXTERNAL/freeglut/COPYING)\n    Copyright (c) 1999-2000 Pawel W. Olszta\n    We use a stripped down version for drawing text in OpenGL.\n\nSee the doc folder for the full text of the licenses.\n\ng2o is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nlicenses for more details.\n\n## Requirements\n\n-   C++17 compiler (CI pipeline runs with gcc, clang and MSVC)\n-   cmake \u003chttp://www.cmake.org\u003e\n-   Eigen3 \u003chttp://eigen.tuxfamily.org\u003e\n\nOn Ubuntu / Debian these dependencies are resolved by installing the\nfollowing packages.\n\n-   cmake\n-   libeigen3-dev\n\n### Optional requirements\n\n-   spdlog \u003chttps://github.com/gabime/spdlog\u003e\n-   suitesparse \u003chttp://faculty.cse.tamu.edu/davis/suitesparse.html\u003e\n-   Qt5 \u003chttp://qt-project.org\u003e\n-   libQGLViewer \u003chttp://www.libqglviewer.com\u003e\n\nOn Ubuntu / Debian these dependencies are resolved by installing the\nfollowing packages.\n\n-   libspdlog-dev\n-   libsuitesparse-dev\n-   qtdeclarative5-dev\n-   qt5-qmake\n-   libqglviewer-dev-qt5\n\nYou can install those packages with the following command\n```\nsudo apt install libeigen3-dev libspdlog-dev libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5\n```\n\n## Mac OS X\n\nIf using [Homebrew](http://brew.sh/), then\n\n`brew install g2o`\n\nwill install g2o together with its required dependencies. In this case no manual compilation is necessary.\n\n## Windows\n\nIf using [vcpkg](https://github.com/Microsoft/vcpkg), then\n\n`script\\install-deps-windows.bat`\n\nor for full dependencies installation\n\n`script\\install-additional-deps-windows.bat`\n\nwill build and install the dependencies. The location of `vcpkg` and required\ntriplet can be passed as cli arguments respectively. Note that usually vcpkg\nwill auto detect the triplet. Set it only if your are not using the default\nbuild for your OS.\n\n## Compilation\n\nOur primary development platform is Linux. Experimental support for\nMac OS X, Android and Windows (MinGW or MSVC).\nWe recommend a so-called out of source build which can be achieved\nby the following command sequence.\n\n```\nmkdir build\ncd build\ncmake ../\nmake\n```\n\nThe binaries will be placed in bin and the libraries in lib which\nare both located underneath cmake's build folder.\n\nOn Windows with `vcpkg` the following commands will generate build scripts (please change the Visual Studio version number in accordance with your system):\n\n```\nmkdir build\ncd build\ncmake -DG2O_BUILD_APPS=ON -DG2O_BUILD_EXAMPLES=ON-DVCPKG_TARGET_TRIPLET=\"%VCPKG_DEFAULT_TRIPLET%\" -DCMAKE_TOOLCHAIN_FILE=\"%VCPKG_ROOT_DIR%\\scripts\\buildsystems\\vcpkg.cmake\" ..`\ncmake --build . --target ALL_BUILD\n```\n\nIf you are compiling on Windows and you are for some reasons **not** using `vcpkg` please download Eigen3 and extract it.\nWithin cmake-gui set the variable EIGEN3_INCLUDE_DIR to that directory.\n\n```\nmkdir build\ncd build\ncmake .. -DG2O_BUILD_APPS=ON -DG2O_BUILD_EXAMPLES=ON -DEIGEN3_INCLUDE_DIR=\"\u003cTHE_PATH_WHERE_YOU_PLACED_EIGEN3_AND_THE_EIGEN3_CMakeLists.txt\u003e\"\n```\n\n## Cross-Compiling for Android\n\n```\nmkdir build`\ncd build`\ncmake -DCMAKE_TOOLCHAIN_FILE=../script/android.toolchain.cmake -DANDROID_NDK=\u003cYOUR_PATH_TO_ANDROID_NDK_r10d+\u003e -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI=\"armeabi-v7a with NEON\" -DEIGEN3_INCLUDE_DIR=\"\u003cYOUR_PATH_TO_EIGEN\u003e\" -DEIGEN3_VERSION_OK=ON ..\ncmake --build .\n```\n\n## Acknowledgments\n\nWe thank the following contributors for providing patches:\n\n-   Simon J. Julier: patches to achieve compatibility with Mac OS X and others.\n-   Michael A. Eriksen for submitting patches to compile with MSVC.\n-   Mark Pupilli for submitting patches to compile with MSVC.\n\n## Projects using g2o\n\n-   [g2o-python](https://github.com/miquelmassot/g2o-python): Python binding which is also installable via `pip`\n-   [.Net wrapper](https://github.com/fugro/g2o)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainerkuemmerle%2Fg2o","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainerkuemmerle%2Fg2o","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainerkuemmerle%2Fg2o/lists"}