# LTSLAM
**Repository Path**: Sytx_1/LTSLAM
## Basic Information
- **Project Name**: LTSLAM
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-10-20
- **Last Updated**: 2025-12-05
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# X-SLAM
# 1 Introduction
I hope you can learn slam step by step, you will can learn online [X-SLAM documents tutorial](https://ltslam-doc.readthedocs.io/en/latest/index.html). What you choose today determines your tomorrow's life path. Diligence will not make up for your indecision.
You can learn slam knowledge by [哔哩哔哩 bilibili ](https://space.bilibili.com/478832908). This video website has a detailed explanation of the code and the corresponding SLAM technology principle. Let's start a happy journey. enjoy....
X-SLAM is an open source C++ demo for learn vision slam and lidar slam. Through open source engineering, we can learn the following knowledge content:
* **C++** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/c%2B%2B/c%2B%2B.html)
* **CMake** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/cmake/cmake.html)
* **Eigen** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/eigen/eigen.html)
* **Math** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/math/math.html)
* **OpenCV** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/opencv/opencv_tutorial.html)
* **Quaternions** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/math/math.html)
* **G2O** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/g2o/g2o_tutorial.html)
* **Pangolin** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/pangolin/pangolin.html)
* **libQGLViewer** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/libQGLViewer/libQGLViewer.html)
* **Ceres Solver** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/tutorial/ceres/ceres_solver_tutorial.html)
* **Kalman Filter** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/kalman_filter/kalman_filter.html)
* **VSLAM** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/vslam/vision_slam.html)
* **VINS Mono( VINS Project)** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/vins/vins.html)
* **MSCKF-VIO( MSCKF Project)** [tutorial](https://ltslam-doc.readthedocs.io/en/latest/msckf/msckf.html)
**开源社区文档**
* **X-SLAM Tutorial Documents** [网站链接](https://ltslam-doc.readthedocs.io/en/latest/index.html)

**哔哩哔哩 bilibili 视频教程**
* **B站视频教程** [网站链接](https://space.bilibili.com/478832908)

## 1.1 Download LTSLAM source:
```bash
git clone https://github.com/quanduyong/LTSLAM.git
```
## 1.2 Project directory:
### xlsam_ros (2D lidar SLAM)
```bash
# step 1 下载 rosbag 数据集
# https://github.com/cartographer-project/cartographer_ros/blob/master/docs/source/data.rst
wget https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2015-05-26-13-15-25.bag
# step 2 run
roslaunch xslam_ros demo_slam2d.launch
# step 3 rosbag play
rosbag play b2-2015-05-26-13-15-25.bag
```

# 2 安装x-slam
## 2.1 推荐:docker方式安装
### 2.1.1 docker安装
```bash
cd docker
./scripts/install_docker.sh
```
### 2.1.2 X-SLAM环境部署和安装
```bash
cd docker
./build_dev.sh standalone.x86_64.dockerfile
```
### 2.1.3 运行X-SLAM的demos案例
X-SLAM的demo有很多,一下简单运行几个demo
```bash
docker run -it xslam/ltslam
```
运行每个模块的demo
* run ceres
```
./xslam.ceres.helloworld_numeric_diff_test
```
* run g2o
```bash
./xslam.g2o.curve_fitting_test
```
* run dbow3
```
./xslam.dbow3.loop_closure_detect_test
```
* run opencv
```
./xslam.opencv.feature_detection.orb_feature_detector_test
```
* run Sophus
```
./xslam.sophus.basic_test
```
## 2.2 源码安装(不推荐)
### 2.2.1 Generate study documents
主要目的实现本地帮助文档doc下,以html网页的格式方便查看
* 安装Sphinx
```shell
pip install -U sphinx
```
* 安装主题
```shell
pip install sphinx_rtd_theme
```
* 安装markdown插件
```shell
pip install recommonmark
pip install myst-parser
pip install sphinx_markdown_tables
```
### 2.2.2 Third party library
(推荐)我已经提供了第三方库源码文件3rdparty目录下,执行以下命令安装,不然会出现版本不匹配问题:
```shell
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
(不推荐)如果你想自己源码安装第三方库请使用以下步骤:
* 安装Eigen
```
git clone https://gitlab.com/libeigen/eigen.git
cd eigen
git checkout 3.3.8
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装Sophus
```shell
git clone https://github.com/strasdat/Sophus.git
cd Sophus
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装abseil
在abseil项目的CMakeLists.txt的project(absl LANGUAGES CXX) 下添加以下命令:
`add_compile_options(-fPIC)`
```shell
git clone https://github.com/abseil/abseil-cpp.git
cd abseil-cpp
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装 DBow3
```
git clone https://github.com/rmsalinas/DBow3.git
cd abseil-cpp
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装googletest
```
git clone https://github.com/google/googletest.git
cd googletest
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装g2o
```
git clone https://github.com/rmsalinas/DBow3.git
cd abseil-cpp
git checkout 9b41a4ea
mkdir build && cd build
cmake ..
make -j6
sudo make install
```
* 安装opencv & opencv_contrib (4.5-x)
```
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
cd opencv
mkdir build && cd build
cmake-gui .. # 选择extra module opencv_contrib
make -j6
sudo make install
```
# 3 工程编译
```shell
cd LTSLAM
mkdir build
cd build
cmake ..
make -j6
```
# 4 如何运行工程demo
在工程的build/bin目录中,你可以看到对应的每个可执行二进制文件

如何运行参考如下:
```bash
[bin] ./xslam.opencv.camera_calibration.perspective_correction_test
```
运行结果如下:

# 5 Contact Me
我们有微信群和QQ群: 710288823 ,你可以加入我们一起成长,所有代码和教学视频免费。

```
email : quandy2020@126.com
```
加入我们吧!!!
# 6 Github贡献者
* 123mrchen
* Ze
* Minghao HU
* onwaying
