Skip to main content

Graph SLAM solver in Python

Project description

https://travis-ci.com/JeffLIrion/python-graphslam.svg?branch=master https://coveralls.io/repos/github/JeffLIrion/python-graphslam/badge.svg?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 edges
  • Import and export .g2o files for SE(2) and SE(3) datasets

Installation

pip install graphslam

Example Usage

SE(3) Dataset

>>> from graphslam.load import load_g2o_se3

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

>>> g.plot(vertex_markersize=1)

>>> g.calc_chi2()

16720.020602489112

>>> g.optimize()

>>> g.plot(vertex_markersize=1)

Output:

Iteration                chi^2        rel. change
---------                -----        -----------
        0           16720.0206
        1              26.5495          -0.998412
        2               1.2712          -0.952119
        3               1.2402          -0.024439
        4               1.2396          -0.000456
        5               1.2395          -0.000091
Original Optimized
https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage.png https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/parking-garage-optimized.png

SE(2) Dataset

>>> from graphslam.load import load_g2o_se2

>>> g = load_g2o_se2("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       319915276.1284          43.484042
        2       124894535.1749          -0.609601
        3          338185.8171          -0.997292
        4             734.5142          -0.997828
        5             215.8405          -0.706145
        6             215.8405          -0.000000
Original Optimized
https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL.png https://raw.githubusercontent.com/JeffLIrion/python-graphslam/master/docs/source/images/input_INTEL-optimized.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for graphslam, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size graphslam-0.0.7-py3-none-any.whl (20.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size graphslam-0.0.7.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page