Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra smooth

Repository Summary

Description Lie theory for robotics
Checkout URI https://github.com/pettni/smooth.git
VCS Type git
VCS Version master
Last Updated 2024-10-18
Dev Status UNKNOWN
Released UNRELEASED
Tags cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
smooth 0.0.1

README

Lie Theory for Robotics

[![CI Build and Test][ci-shield]][ci-link] [![Code coverage][cov-shield]][cov-link] [![License][license-shield]][license-link]

  • Requirements: C++20, Eigen 3.4
  • [Documentation][doc-link]
  • Compatible with: autodiff, boost::numeric::odeint, Ceres, ROS
  • Written in an extensible functional programming style

In robotics it is often convenient to work in non-Euclidean manifolds. Lie groups are a class of manifolds that are easy to work with due to their symmetries, and that are also good models for many robotic systems. This header-only C++20 library facilitates leveraging Lie theory in robotics software, by enabling:

  • Algebraic manipulation
  • Automatic differentiation
  • Interpolation (right figure shows a B-spline of order 5 on smooth::SO3, see examples/bspline.cpp)
  • Numerical integration (left figure shows the solution of an ODE on , see examples/odeint.cpp)
  • Optimization

The following common Lie groups are implemented:

  • smooth::SO2: two-dimensional rotations with complex number memory representation
  • smooth::SO3: three-dimensional rotations with quaternion memory representation
  • smooth::SE2: two-dimensional rigid motions
  • smooth::SE3: three-dimensional rigid motions
  • smooth::C1: complex numbers (excluding zero) under multiplication
  • smooth::Galilei: the Galilean group. It includes SE_2(3) as a special case.
  • smooth::SE_K_3: generalization of SE3 with multiple translations
  • A smooth::Bundle type to treat Lie group products as a single Lie group. The Bundle type also supports regular Eigen vectors as components
  • Lie group interfaces for Eigen vectors and builtin scalars

Getting started

Download and Build

Clone the repository and install it

git clone https://github.com/pettni/smooth.git
cd smooth
mkdir build && cd build

# Specify a C++20-compatible compiler if your default does not support C++20.
# Build tests and/or examples as desired.
cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF
make -j8
sudo make install

Alternatively, if using ROS or ROS2 just clone smooth into a catkin/colcon workspace source folder and build the workspace with a compiler that supports C++20. Example with colcon:

colcon build --cmake-args -DCMAKE_CXX_COMPILER=/usr/bin/g++-10

Use with cmake

To utilize smooth in your own project, include something along these lines in your CMakeLists.txt

find_package(smooth)

add_executable(my_executable main.cpp)
target_link_libraries(my_executable smooth::smooth)

Explore the API

Check out the [Documentation][doc-link] and the examples.

Using the library

Algebraic Manipulations

```cpp // Also works with other types: SO2d, SE2d, SE3d, Bundle<SO3d, T3d> etc…

using Tangent = typename smooth::SO3d::Tangent;

// construct a random group element and a random tangent element smooth::SO3d g = smooth::SO3d::Random(); Tangent a = Tangent::Random();

// lie group exponential auto exp_a = smooth::SO3d::exp(a);

// lie group logarithm auto g_log = g.log();

// lie algebra hat and vee maps auto a_hat = smooth::SO3d::hat(a); auto a_hat_vee = smooth::SO3d::vee(a_hat);

// group adjoint

File truncated at 100 lines see the full file

Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra
Repo symbol

smooth repository

cpp robotics eigen header-only lie-groups cpp20 lie-algebra