This repository provides a small C++ library implementing Lie group and Lie algebra utilities commonly used in robotics. The library comes with a simple differential drive example demonstrating how the components fit together.
Please feel free to report any bugs and suggest improvements!
- C++17 compatible compiler (e.g.
g++) - Eigen3 (>= 3.4)
- nlohmann/json
- CMake >= 3.10
- Python 3 (optional, for plotting the example results)
On Ubuntu the required packages can be installed with:
sudo apt-get install cmake g++ libeigen3-dev nlohmann-json3-dev python3 python3-pipCreate a build directory and compile the library and example:
mkdir build
cd build
cmake ..
makeThis builds the shared library liblie_lib and the example executable demo_lie_lib.
From the build directory run:
./demo_lie_libThe program reads parameters from diffdrive_example/diffdrive.json and writes a trajectory to diffdrive_example/robot_pos.json.
To plot the resulting path with Python:
python3 ../diffdrive_example/plot.pyEdit the file diffdrive_example/plot.py if your paths differ.
include/lie_lib– Header files for the Lie group utilitiessrc/– Implementation filesdiffdrive_example/– Simple differential drive demo and plotting scriptCMakeLists.txt– Build configuration