Merge pull request #1 from benluo/macos-support

add macos support in README. add "dataset/" in .gitignore
This commit is contained in:
liqiang 2022-10-24 12:38:10 +08:00 committed by GitHub
commit 973ec2fccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 5 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@ bin/
lib/
build/
.vscode/
.idea/
.idea/
dataset/

View File

@ -46,7 +46,7 @@ English version: “The authors would like to acknowledge the team of Prof. Xiao
### 1.1 Compilation environment
KF-GINS is managed by CMake and can be complied on both Linux and Windows. We recommend you choose Linux environment first.
KF-GINS is managed by CMake and can be complied on all of Linux, MacOS and Windows. We recommend you choose Linux environment first.
The configuration file is used as a parameter to run KF-GINS after successfully compiling it. To debug the program, it is also required to add the configuration file as a parameter.
@ -101,6 +101,34 @@ Open a PowerShell or CMD terminal in the project directory and run the test data
# .\bin\Release\KF-GINS.exe .\dataset\kf-gins.yaml
```
### 1.5 Compile under MacOS
xcode-select and cmake in MacOS. You should install these tools following the commonds:
```shell
xcode-select --install
brew install cmake
```
After preparing your own compilation environment, you can clone the repository locally and compile KF-GINS as follows:
```shell
# Clone the repository
git clone https://github.com/i2Nav-WHU/KF-GINS.git ~/
# Build KF-GINS
cd ~/KF-GINS
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j8
# Run demo dataset
cd ~/KF-GINS
./bin/KF-GINS ./dataset/kf-gins.yaml
# Wait until the program finish
```
## 2 Use KF-GINS
### 2.1 Prerequisite Knowledge

View File

@ -44,14 +44,14 @@ English version: “The authors would like to acknowledge the team of Prof. Xiao
## 1.程序编译与运行
### 1.1 编译环境
KF-GINS项目使用CMake管理支持在Linux环境和Windows环境下编译。我们建议优先选择Linux环境进行编译。
KF-GINS项目使用CMake管理支持在Linux环境MacOS环境和Windows环境下编译。我们建议优先选择Linux环境进行编译。
KF-GINS编译成功后需要使用配置文件作为参数。程序调试时也需要添加命令行参数。
### 1.2 依赖库
除了基本的C++标准库之外KF-GINS依赖三个库分别为Eigen3abseil-cpp和yaml-cpp. 这三个库已经作为三方库加到工程源代码中,不需要使用者单独安装。
### 1.3 Linux编译
### 1.3 Linux编译
我们建议使用Ubuntu18.04或者Ubuntu20.04系统下g++编译工具进行KF-GINS编译编译前需安装必要的库
```shell
@ -79,7 +79,7 @@ cd ~/KF-GINS
# 等待程序运行结束
```
### 1.4 Windows编译
### 1.4 Windows编译
Windows环境下一般使用MSVC(Microsoft Visual C/C++)编译器我们建议在VSCode软件下进行编译。
@ -99,6 +99,35 @@ Windows下需要通过Visual Studio Installer安装MSVC编译器下载安装V
# .\bin\Release\KF-GINS.exe .\dataset\kf-gins.yaml
```
### 1.5 在 MacOS内编译
在 MacOS 中使用 xcode-select 和 cmake。编译前需安装必要的工具
```shell
xcode-select --install
brew install cmake
```
配置好自己的编译环境之后将仓库克隆到本地后并按照如下操作编译KF-GINS
```shell
# 克隆仓库
git clone https://github.com/i2Nav-WHU/KF-GINS.git ~/
# 编译KF-GINS
cd ~/KF-GINS
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j8
# 运行测试数据集
cd ~/KF-GINS
./bin/KF-GINS ./dataset/kf-gins.yaml
# 等待程序运行结束
```
## 2 KF-GINS使用
### 2.1 基础知识