Giter Club home page Giter Club logo

pylgmath's Introduction

pylgmath

pylgmath is a Python library for handling geometry in state estimation problems in robotics. It is used to store, manipulate, and apply three-dimensional rotations and transformations and their associated uncertainties.

There are no minimal, constraint-free, singularity-free representations for these quantities, so lgmath exploits two different representations for the nominal and noisy parts of the uncertain random variable.

  • Nominal rotations and transformations are represented using their composable, singularity-free matrix Lie groups, SO(3) and SE(3).
  • Their uncertainties are represented as multiplicative perturbations on the minimal, constraint-free vectorspaces of their Lie algebras, *so**(3)* and *se**(3)*.

This library uses concepts and mathematics described in Timothy D. Barfoot's book State Estimation for Robotics. It is used for robotics research at the Autonomous Space Robotics Lab; most notably in the STEAM Engine, a library for Simultaneous Trajectory Estimation and Mapping.

Installation

## PyPI
pip install asrl-pylgmath

## Source
git clone https://github.com/utiasASRL/pylgmath.git
pip install -e pylgmath  # may need to replace `pip` with `pip3` if not using a virtual environment.

Unit tests

Use pytest to run the unit tests:

pytest ./tests

pylgmath's People

Contributors

cheneyuwu avatar holmesco avatar johannlac avatar keenan-burnett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ben-isaac

pylgmath's Issues

Truncation Issue

There is currently a truncation issue when initializing Transformation class with a Lie Algebra vector that has a small rotation component. This kinds of vectors show up frequently when applying retractions for SE3 optimization schemes. Example:

del_xi = np.array([[0,0,0,alpha,0,0]]).T
T_delta = pylgmath.se3.transformation.Transformation(xi_ab=del_xi)
T_bar = T_delta @ T_bar

Currently, if alpha is set to lower than approximately 1e-7, T_delta is set to identity. This is due to the default "analytical" solution used in the underlying se3op.vec2tran, which uses numpy.sin and numpy.cos. The tolerance for use of the analytical solution should be set to 1e-7 rather than the current 1e-12.

The issue can be avoided if num_terms argument is passed to the constructor:

T_delta = pylgmath.se3.transformation.Transformation(xi_ab=del_xi, num_terms=20)

TODO:

  • create unit tests for Connor's vec2tran for small angles issue
  • create unit tests for the tran2vec issue encountered by David, Daniil
  • should the methods automatically default to numerical for small translations and rotations?
  • propose a fix that covers both issues
  • Apply fix to both pylgmath and C++/lgmath
  • make sure the API is consistent between the C++ and Python code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.