The development of robotics is always closely related to mathematics. However, pure mathematical expressions can sometimes be boring and difficult to understand. This project aims to show the magic of mathematics through interesting robotics demonstrations.
We aim to select widely used and practical algorithms. For each algorithm, we strive to:
- Provide a readable Python implementation.
- Show a detailed mathematical proof.
- Minimize the use of third-party libraries to reveal the underlying mathematics.
- Install
libsuitesparse-dev
if you want to use the sparse solver.
sudo apt-get install -y libsuitesparse-dev
- Install
mathR
(this repository):
git clone https://github.com/scomup/MathematicalRobotics.git
cd MathematicalRobotics
pip3 install -e .
Alternatively, install mathR
directly from the git URL:
pip install -e git+https://github.com/scomup/MathematicalRobotics.git#egg=mathR
The Gauss-Newton method is a numerical optimization technique that is especially effective for solving non-linear least squares problems. We have implemented a pure Python library for this method.
Documentation Links:
We also provide some demos on Lie-group-based point matching using our library.
Lie Group Documentation Links:
python3 -m mathR.gauss_newton_method.demo_2d
python3 -m mathR.gauss_newton_method.demo_3d
python3 -m mathR.gauss_newton_method.demo_line
We have developed a graph optimization library implemented in pure Python. Compared to well-known graph optimization libraries like g2o, gtsam, or ceres, our implementation is highly readable and ideal for studying purposes.
This demo solves a 2D point matching problem using the Gauss-Newton method.
python3 -m mathR.graph_optimization.demo_g2o_se2
Dataset: sphere2500.g2o 1
This demo showcases the application of Gauss-Newton in 3D point matching problems.
python3 -m mathR.graph_optimization.demo_g2o_se3
Dataset: manhattanOlson3500.g2o 1
This demo illustrates how the Gauss-Newton method can be applied to solve a simple linear regression problem
python3 -m mathR.gauss_newton_method.demo_line
Filtering techniques, such as the Extended Kalman Filter (EKF) and Particle Filter (PF), are essential tools in robotics for state estimation in the presence of noise and uncertainty.
Documentation Links:
This demo illustrates how the EKF can be used for GPS and odometry fuse problem.
python3 -m mathR.filter.demo_ekf
This demo illustrates how the PF can be used for GPS and odometry fuse problem.
python3 -m mathR.filter.demo_pf
python3 -m mathR.slam.demo_bundle_adjustment
Dataset: Venice: problem-427-310384-pre 2
python3 -m mathR.robot_geometry.demo_p2line_matching
python3 -m mathR.robot_geometry.demo_p2plane_matching
python3 -m mathR.robot_geometry.demo_plane_cross_cube
Footnotes
-
Datasets are available in the open-source package Vertigo. ↩ ↩2
-
The datasets used in the demo are available in the project Bundle Adjustment in the Large. ↩