graphslam


Namegraphslam JSON
Version 0.0.17 PyPI version JSON
download
home_pagehttps://github.com/JeffLIrion/python-graphslam
SummaryGraph SLAM solver in Python
upload_time2023-11-17 08:27:15
maintainer
docs_urlNone
authorJeff Irion
requires_python
licenseMIT
keywords graphslam slam graph optimization mapping
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            graphslam
=========

.. image:: https://github.com/JeffLIrion/python-graphslam/actions/workflows/python-package.yml/badge.svg?branch=master
   :target: https://github.com/JeffLIrion/python-graphslam/actions/workflows/python-package.yml

.. image:: https://coveralls.io/repos/github/JeffLIrion/python-graphslam/badge.svg?branch=master
   :target: https://coveralls.io/github/JeffLIrion/python-graphslam?branch=master


Documentation for this package can be found at https://python-graphslam.readthedocs.io/.


This package implements a Graph SLAM solver in Python.

Features
--------

- Optimize `R^2`, `R^3`, `SE(2)`, and `SE(3)` datasets
- Analytic Jacobians
- Supports odometry and landmark edges
- Supports custom edge types (see `tests/test_custom_edge.py <https://github.com/JeffLIrion/python-graphslam/blob/master/tests/test_custom_edge.py>`_ for an example)
- Import and export .g2o files


Installation
------------

.. code-block::

   pip install graphslam


Example Usage
-------------

SE(3) Dataset
^^^^^^^^^^^^^

.. code-block:: python

   >>> from graphslam.graph import Graph

   >>> g = Graph.from_g2o("data/parking-garage.g2o")  # https://lucacarlone.mit.edu/datasets/

   >>> g.plot(vertex_markersize=1)

   >>> g.calc_chi2()

   16720.02100546733

   >>> g.optimize()

   >>> g.plot(vertex_markersize=1)


**Output:**

::

   Iteration                chi^2        rel. change
   ---------                -----        -----------
           0           16720.0210
           1              45.6644          -0.997269
           2               1.2936          -0.971671
           3               1.2387          -0.042457
           4               1.2387          -0.000001


+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| **Original**                                                                                                          | **Optimized**                                                                                                                   |
+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage.png | .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage-optimized.png |
+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+


SE(2) Dataset
^^^^^^^^^^^^^

.. code-block:: python

   >>> from graphslam.graph import Graph

   >>> g = Graph.from_g2o("data/input_INTEL.g2o")  # https://lucacarlone.mit.edu/datasets/

   >>> g.plot()

   >>> g.calc_chi2()

   7191686.382493544

   >>> g.optimize()

   >>> g.plot()


**Output:**

::

   Iteration                chi^2        rel. change
   ---------                -----        -----------
           0         7191686.3825
           1       319950425.6477          43.488929
           2       124950341.8035          -0.609470
           3          338165.0770          -0.997294
           4             734.7343          -0.997827
           5             215.8405          -0.706233
           6             215.8405          -0.000000


+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| **Original**                                                                                                       | **Optimized**                                                                                                                |
+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL.png | .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL-optimized.png |
+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+

References and Acknowledgments
------------------------------


1. Grisetti, G., Kummerle, R., Stachniss, C. and Burgard, W., 2010. `A tutorial on graph-based SLAM <http://domino.informatik.uni-freiburg.de/teaching/ws10/praktikum/slamtutorial.pdf>`_. IEEE Intelligent Transportation Systems Magazine, 2(4), pp.31-43.
2. Blanco, J.L., 2010. `A tutorial on SE(3) transformation parameterizations and on-manifold optimization <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.468.5407&rep=rep1&type=pdf>`_. University of Malaga, Tech. Rep, 3.
3. Carlone, L., Tron, R., Daniilidis, K. and Dellaert, F., 2015, May. `Initialization techniques for 3D SLAM: a survey on rotation estimation and its use in pose graph optimization <https://smartech.gatech.edu/bitstream/handle/1853/53710/Carlone15icra.pdf>`_. In 2015 IEEE international conference on robotics and automation (ICRA) (pp. 4597-4604). IEEE.
4. Carlone, L. and Censi, A., 2014. `From angular manifolds to the integer lattice: Guaranteed orientation estimation with application to pose graph optimization <https://arxiv.org/pdf/1211.3063.pdf>`_. IEEE Transactions on Robotics, 30(2), pp.475-492.


Thanks to Luca Larlone for allowing inclusion of the `Intel and parking garage datasets <https://lucacarlone.mit.edu/datasets/>`_ in this repo.


Live Coding Graph SLAM in Python
--------------------------------

If you're interested, you can watch as I coded this up.

1. `Live coding Graph SLAM in Python (Part 1) <https://youtu.be/yXWkNC_A_YE>`_
2. `Live coding Graph SLAM in Python (Part 2) <https://youtu.be/M2udkF0UNUg>`_
3. `Live coding Graph SLAM in Python (Part 3) <https://youtu.be/CiBdVcIObVU>`_
4. `Live coding Graph SLAM in Python (Part 4) <https://youtu.be/GBAThis-_wM>`_
5. `Live coding Graph SLAM in Python (Part 5) <https://youtu.be/J3NyieGVwIw>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JeffLIrion/python-graphslam",
    "name": "graphslam",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "graphslam,slam,graph,optimization,mapping",
    "author": "Jeff Irion",
    "author_email": "jefflirion@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/19/12/04ff8145ef171b81fec9042f156e903a14656f290778d0433f14c7842d07/graphslam-0.0.17.tar.gz",
    "platform": null,
    "description": "graphslam\n=========\n\n.. image:: https://github.com/JeffLIrion/python-graphslam/actions/workflows/python-package.yml/badge.svg?branch=master\n   :target: https://github.com/JeffLIrion/python-graphslam/actions/workflows/python-package.yml\n\n.. image:: https://coveralls.io/repos/github/JeffLIrion/python-graphslam/badge.svg?branch=master\n   :target: https://coveralls.io/github/JeffLIrion/python-graphslam?branch=master\n\n\nDocumentation for this package can be found at https://python-graphslam.readthedocs.io/.\n\n\nThis package implements a Graph SLAM solver in Python.\n\nFeatures\n--------\n\n- Optimize `R^2`, `R^3`, `SE(2)`, and `SE(3)` datasets\n- Analytic Jacobians\n- Supports odometry and landmark edges\n- Supports custom edge types (see `tests/test_custom_edge.py <https://github.com/JeffLIrion/python-graphslam/blob/master/tests/test_custom_edge.py>`_ for an example)\n- Import and export .g2o files\n\n\nInstallation\n------------\n\n.. code-block::\n\n   pip install graphslam\n\n\nExample Usage\n-------------\n\nSE(3) Dataset\n^^^^^^^^^^^^^\n\n.. code-block:: python\n\n   >>> from graphslam.graph import Graph\n\n   >>> g = Graph.from_g2o(\"data/parking-garage.g2o\")  # https://lucacarlone.mit.edu/datasets/\n\n   >>> g.plot(vertex_markersize=1)\n\n   >>> g.calc_chi2()\n\n   16720.02100546733\n\n   >>> g.optimize()\n\n   >>> g.plot(vertex_markersize=1)\n\n\n**Output:**\n\n::\n\n   Iteration                chi^2        rel. change\n   ---------                -----        -----------\n           0           16720.0210\n           1              45.6644          -0.997269\n           2               1.2936          -0.971671\n           3               1.2387          -0.042457\n           4               1.2387          -0.000001\n\n\n+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n| **Original**                                                                                                          | **Optimized**                                                                                                                   |\n+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n| .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage.png | .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage-optimized.png |\n+-----------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n\n\nSE(2) Dataset\n^^^^^^^^^^^^^\n\n.. code-block:: python\n\n   >>> from graphslam.graph import Graph\n\n   >>> g = Graph.from_g2o(\"data/input_INTEL.g2o\")  # https://lucacarlone.mit.edu/datasets/\n\n   >>> g.plot()\n\n   >>> g.calc_chi2()\n\n   7191686.382493544\n\n   >>> g.optimize()\n\n   >>> g.plot()\n\n\n**Output:**\n\n::\n\n   Iteration                chi^2        rel. change\n   ---------                -----        -----------\n           0         7191686.3825\n           1       319950425.6477          43.488929\n           2       124950341.8035          -0.609470\n           3          338165.0770          -0.997294\n           4             734.7343          -0.997827\n           5             215.8405          -0.706233\n           6             215.8405          -0.000000\n\n\n+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+\n| **Original**                                                                                                       | **Optimized**                                                                                                                |\n+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+\n| .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL.png | .. image:: https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL-optimized.png |\n+--------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+\n\nReferences and Acknowledgments\n------------------------------\n\n\n1. Grisetti, G., Kummerle, R., Stachniss, C. and Burgard, W., 2010. `A tutorial on graph-based SLAM <http://domino.informatik.uni-freiburg.de/teaching/ws10/praktikum/slamtutorial.pdf>`_. IEEE Intelligent Transportation Systems Magazine, 2(4), pp.31-43.\n2. Blanco, J.L., 2010. `A tutorial on SE(3) transformation parameterizations and on-manifold optimization <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.468.5407&rep=rep1&type=pdf>`_. University of Malaga, Tech. Rep, 3.\n3. Carlone, L., Tron, R., Daniilidis, K. and Dellaert, F., 2015, May. `Initialization techniques for 3D SLAM: a survey on rotation estimation and its use in pose graph optimization <https://smartech.gatech.edu/bitstream/handle/1853/53710/Carlone15icra.pdf>`_. In 2015 IEEE international conference on robotics and automation (ICRA) (pp. 4597-4604). IEEE.\n4. Carlone, L. and Censi, A., 2014. `From angular manifolds to the integer lattice: Guaranteed orientation estimation with application to pose graph optimization <https://arxiv.org/pdf/1211.3063.pdf>`_. IEEE Transactions on Robotics, 30(2), pp.475-492.\n\n\nThanks to Luca Larlone for allowing inclusion of the `Intel and parking garage datasets <https://lucacarlone.mit.edu/datasets/>`_ in this repo.\n\n\nLive Coding Graph SLAM in Python\n--------------------------------\n\nIf you're interested, you can watch as I coded this up.\n\n1. `Live coding Graph SLAM in Python (Part 1) <https://youtu.be/yXWkNC_A_YE>`_\n2. `Live coding Graph SLAM in Python (Part 2) <https://youtu.be/M2udkF0UNUg>`_\n3. `Live coding Graph SLAM in Python (Part 3) <https://youtu.be/CiBdVcIObVU>`_\n4. `Live coding Graph SLAM in Python (Part 4) <https://youtu.be/GBAThis-_wM>`_\n5. `Live coding Graph SLAM in Python (Part 5) <https://youtu.be/J3NyieGVwIw>`_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Graph SLAM solver in Python",
    "version": "0.0.17",
    "project_urls": {
        "Homepage": "https://github.com/JeffLIrion/python-graphslam"
    },
    "split_keywords": [
        "graphslam",
        "slam",
        "graph",
        "optimization",
        "mapping"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "191204ff8145ef171b81fec9042f156e903a14656f290778d0433f14c7842d07",
                "md5": "25c64b482927fb1354fc01a53e11975a",
                "sha256": "482770a1e6aea732bbc5944d83a65e1ed74c458e29fc40b69f33178a3a87b574"
            },
            "downloads": -1,
            "filename": "graphslam-0.0.17.tar.gz",
            "has_sig": false,
            "md5_digest": "25c64b482927fb1354fc01a53e11975a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 35466,
            "upload_time": "2023-11-17T08:27:15",
            "upload_time_iso_8601": "2023-11-17T08:27:15.411866Z",
            "url": "https://files.pythonhosted.org/packages/19/12/04ff8145ef171b81fec9042f156e903a14656f290778d0433f14c7842d07/graphslam-0.0.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-17 08:27:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JeffLIrion",
    "github_project": "python-graphslam",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "graphslam"
}
        
Elapsed time: 0.17165s