Skip to content
forked from artivis/manif

A small c++11 header-only library for Lie theory.

License

Notifications You must be signed in to change notification settings

liuzhenboo/manif

Repository files navigation

manif

A library for on-Manifold operations.

Package Summary

manif is a header-only C++ library for operations on Manifold targeted at robotics applications.

Build Status

Quick Start

Installation

From source

$ git clone https://github.com/artivis/manif.git
$ cd manif && mkdir build && cd build
$ cmake ..
$ make
To build also examples/tests
$ cmake -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON ..
$ make
Using catkin_tools
$ git clone https://github.com/artivis/manif.git
$ catkin build manif --cmake-args -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON

Use manif in your project

In your project CMakeLists.txt add :

project(foo)

# Find the manif library
find_package(manif REQUIRED)

add_executable(${PROJECT_NAME} src/foo.cpp)

# Add include directories to the target
target_include_directories(${PROJECT_NAME} SYSTEM ${manif_INCLUDE_DIRS})

Some more details about the package

Available Operations

Operation Code
Base Operation
Inverse X.inverse()
Composition
  • X * Y
  • X.compose(Y)
Retract to manifold space w.retract()
Act on vector X.act(v)
Lift to tangent space X.lift()
Manifold Adjoint X.adj()
Tangent adjoint w.adj()
Composed Operation
Manifold right plus
  • X + w
  • X.plus(w)
  • X.rplus(w)
Manifold left plus
  • w + X
  • w.plus(X)
  • w.lplus(X)
Manifold right minus
  • X - Y
  • X.minus(Y)
  • X.rminus(Y)
Manifold left minus X.lminus(Y)
Between X.compose(Y)

Above, \mathcal{Y} represents a manifold element, small phi or w represents an element of the tangent space and v or v represents any element of .

Jacobians

All operations come with their respectives analytical Jacobian matrices.
Thoughout manif, Jacobians are differentiated with respect to a perturbation on the tangent space.

The Jacobians of any of the aforementionned operations can then be evaluated, e.g.,

  SO2 X = SO2::Random(),
      Y = SO2::Random();

  SO2::Jacobian J_c_x, J_c_y;
  auto compose = x.compose(Y, J_c_x, J_c_y);

  SO2::Jacobian J_m_x, J_m_y;
  auto minus   = x.minus(Y, J_m_x, J_m_y);

  SO2::Jacobian J_i_x;
  auto inverse   = x.inverse(J_i_x);

  // etc...

Shall you be interested only in a specific Jacobian, it can be retrieved without evaluating the other:

  auto composition = x.compose(Y, J_c_x);

or conversely,

  auto composition = x.compose(Y, SO2::_, J_c_y);

A note on Jacobians

While the manif package differentiates Jacobians wrt a perturbation on the tangent space, many non-linear solvers (e.g. Ceres) expect them to be differentiated wrt the representation vector of the manifold element (e.g. wrt to quaternion vector in ).
For this reason manif is Ceres auto-differentiation compliant and support ceres::Jet type.

Documentation and Tutorials

@todo

Contributing

@todo
These are the contribution guidelines.

  • master branch is for release only.
  • devel is the target for PR adding new features etc.

About

A small c++11 header-only library for Lie theory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 94.7%
  • CMake 3.9%
  • Other 1.4%