-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
50 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,12 @@ Dependencies from the default Ubuntu repositories: | |
libatlas-base-dev \ | ||
libgtest-dev \ | ||
libgflags-dev \ | ||
libgoogle-glog-dev | ||
libgoogle-glog-dev \ | ||
qtbase5-dev \ | ||
libqt5opengl5-dev \ | ||
libeigen3-dev \ | ||
libceres-dev \ | ||
libopencv-dev | ||
``` | ||
|
||
If the version of CMake is less than 3.16, update it. | ||
|
@@ -34,39 +39,12 @@ cp -r cmake-3.21.0-linux-x86_64 /usr/share/ | |
ln -sf /usr/share/cmake-3.21.0-linux-x86_64/bin/cmake /usr/bin/cmake | ||
``` | ||
|
||
Install [xrprimer](https://github.com/openxrlab/xrprimer) | ||
```shell | ||
git clone [email protected]:openxrlab/xrprimer.git | ||
cd xrprimer | ||
git checkout xrslam-opencv3.4.7 | ||
cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_PRECOMPILED_HEADERS=OFF | ||
cmake --build build --target install -j4 | ||
``` | ||
|
||
Ensure that the root directories of xrsfm and xrprimer remain the same. | ||
|
||
``` | ||
xrprimer | ||
├── | ||
... | ||
xrsfm | ||
├── docs | ||
├── scripts | ||
├── src | ||
... | ||
``` | ||
|
||
Compile xrsfm | ||
```shell | ||
git clone git@github.com:openxrlab/xrsfm.git | ||
git clone https://github.com/openxrlab/xrsfm.git | ||
cd xrsfm && cmake -B build && cmake --build build -j4 | ||
``` | ||
|
||
Note: If you encounter difficulties during the compilation of xrprimer, you can try installing xrsfm without xrprimer. This requires OpenCV and Ceres-Solver. Then you can install xrsfm using the following command: | ||
```shell | ||
cd xrsfm && cmake -B build -DXRPRIMER_ENABLED=OFF && cmake --build build -j4 | ||
``` | ||
|
||
### Dockerfile | ||
|
||
We provide a [Dockerfile](../../Dockerfile) to build an image. Ensure that you are using [docker version](https://docs.docker.com/engine/install/) >=19.03 and `"default-runtime": "nvidia"` in daemon.json. | ||
|
@@ -78,5 +56,12 @@ docker build -t xrsfm . | |
Run it with | ||
|
||
```shell | ||
docker run --gpus all --network=host -it xrsfm | ||
docker run --name xrsfm-container --gpus all --network=host -it xrsfm | ||
``` | ||
``` | ||
Compile xrsfm | ||
```shell | ||
git clone https://github.com/openxrlab/xrsfm.git | ||
cd xrsfm && cmake -B build && cmake --build build -j4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,12 @@ | |
libatlas-base-dev \ | ||
libgtest-dev \ | ||
libgflags-dev \ | ||
libgoogle-glog-dev | ||
libgoogle-glog-dev \ | ||
qtbase5-dev \ | ||
libqt5opengl5-dev \ | ||
libeigen3-dev \ | ||
libceres-dev \ | ||
libopencv-dev | ||
``` | ||
|
||
如果cmake版本小于3.16,按照以下步骤更新 | ||
|
@@ -34,42 +39,15 @@ cp -r cmake-3.21.0-linux-x86_64 /usr/share/ | |
ln -sf /usr/share/cmake-3.21.0-linux-x86_64/bin/cmake /usr/bin/cmake | ||
``` | ||
|
||
安装 [XRPRimer](https://github.com/openxrlab/xrprimer) | ||
```shell | ||
git clone [email protected]:openxrlab/xrprimer.git | ||
cd xrprimer | ||
git checkout xrslam-opencv3.4.7 | ||
cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_PRECOMPILED_HEADERS=OFF | ||
cmake --build build --target install -j4 | ||
``` | ||
|
||
确保xrsfm和xrprimer的根目录保持一致。 | ||
``` | ||
xrprimer | ||
├── | ||
... | ||
xrsfm | ||
├── docs | ||
├── scripts | ||
├── src | ||
... | ||
``` | ||
|
||
|
||
编译 XRSfM | ||
```shell | ||
git clone git@github.com:openxrlab/xrsfm.git | ||
git clone https://github.com/openxrlab/xrsfm.git | ||
cd xrsfm && cmake -B build && cmake --build build -j4 | ||
``` | ||
|
||
注意:如果您在编译xrprimer时遇到困难,可以尝试在没有xrprimer的情况下安装xrsfm。这需要OpenCV和Ceres-Solver。然后,您可以使用以下命令安装xrsfm: | ||
```shell | ||
cd xrsfm && cmake -B build -DXRPRIMER_ENABLED=OFF && cmake --build build -j4 | ||
``` | ||
|
||
### 通过Docker镜像运行 | ||
### Dockerfile | ||
|
||
We provide a [Dockerfile](../../Dockerfile) to build an image. Ensure that you are using [docker version](https://docs.docker.com/engine/install/) >=19.03 and `"default-runtime": "nvidia"` in daemon.json. | ||
我们提供了[Dockerfile](../../Dockerfile)文件来方便环境配置.使用前请确认[docker version](https://docs.docker.com/engine/install/) >=19.03,并且在daemon.json文件中已经设置`"default-runtime": "nvidia"` . | ||
|
||
```shell | ||
docker build -t xrsfm . | ||
|
@@ -78,5 +56,11 @@ docker build -t xrsfm . | |
Run it with | ||
|
||
```shell | ||
docker run --gpus all --network=host -it xrsfm | ||
docker run --name xrsfm-container --gpus all --network=host -it xrsfm | ||
``` | ||
|
||
编译 XRSfM | ||
```shell | ||
git clone https://github.com/openxrlab/xrsfm.git | ||
cd xrsfm && cmake -B build && cmake --build build -j4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters