Skip to content

Commit

Permalink
Merge pull request openxrlab#3 from openxrlab/ios-configs
Browse files Browse the repository at this point in the history
update ios configs, docs and UI
  • Loading branch information
panxkun authored Sep 6, 2022
2 parents 978e526 + dee43a3 commit 6590f3f
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 68 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0
&& tar -zxvf cmake-3.19.0.tar.gz && rm -rf cmake-3.19.0.tar.gz \
&& cd cmake-3.19.0 && ./bootstrap && make -j4 && make install

RUN git clone git@github.com:openxrlab/xrprimer.git -b xrslam-opencv3.4.7 \
&& cd xrprimer && cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release \
RUN git clone https://github.com/openxrlab/xrprimer.git -b xrslam-opencv3.4.7 \
&& cd xrprimer && cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_PRECOMPILED_HEADERS=OFF \
&& cmake --build build --target install -j4

RUN git clone git@github.com:openxrlab/xrslam.git \
RUN git clone https://github.com/openxrlab/xrslam.git \
&& cd xrslam && cmake -B build && cmake --build build -j4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ https://user-images.githubusercontent.com/44204704/187863786-efbc3804-a4d8-4727-

## Installation

We provide detailed [installation tutorial](./docs/en/installation.md) for XRSLAM, users can install from scratch or use provided [dockerfile](./docker/Dockerfile).
We provide detailed [installation tutorial](./docs/en/installation.md) for XRSLAM, users can install from scratch or use provided [Dockerfile](./Dockerfile).

## Getting Started

Expand Down
22 changes: 8 additions & 14 deletions docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,22 @@ Please refer to [data_preparation.md](./dataset_preparation.md) for data prepara

## Installation

### Project Structure
### Requirements

It is recommended to set the XRPrimer root to ``$PROJECT``. If your folder structure is different, need to change the XRPrimer path.
* C++17
* GCC9/Clang13
* CMake 3.15+
* [XRPrimer](https://github.com/openxrlab/xrprimer)

```
xrprimer
├──
...
xrslam
├── xrslam
├── xrslam-pc
├── xrslam-ios
...
```
Clone XRPrimer to keep the same root directory as XRSLAM.

### Build and Run

Firstly, switch XRPrimer to the branch of the specified OpenCV version `git checkout xrslam-opencv3.4.7`

#### Linux/Mac

- In XRPrimer, run `cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build --target install -j8` to configure some common dependencies.
- In XRPrimer, run `cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_PRECOMPILED_HEADERS=OFF && cmake --build build --target install -j8` to configure some common dependencies.
- In XRSLAM, run `cmake -B build && cmake --build build -j8` to generate the project using cmake.
- Start the XRSLAM pc palyer with command `./build/xrslam-pc/player/xrslam-pc-player -c configs/euroc.yaml --tum trajectory.tum euroc:///data/EuRoC/MH_01_easy/mav0`

Expand All @@ -43,7 +37,7 @@ For more information on installation, please refer to [installation.md](./instal

## Evaluation

Please refer to [euroc_evaluation.md](./tutorials/euroc_evaluation.md) for data preparation.
Please refer to [euroc_evaluation.md](./tutorials/euroc_evaluation.md) for evaluation.

## More information

Expand Down
68 changes: 60 additions & 8 deletions docs/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,43 @@

We provide some tips for XRSLAM installation in this file.

## Requirements
## Build from Source

+ C++17
+ GCC9/Clang13
+ CMake 3.15+
+ [XRPrimer](https://github.com/openxrlab/xrprimer)
### Requirements

## Prepare environment
* C++17
* GCC9/Clang13
* CMake 3.15+
* [XRPrimer](https://github.com/openxrlab/xrprimer)

Clone XRPrimer to keep the same root directory as XRSLAM, then switch the branch to the specified OpenCV version.

```bash
git clone https://github.com/openxrlab/xrprimer.git
cd xrprimer
git checkout xrslam-opencv3.4.7
```

If your project folder structure is different, need to change the XRPrimer path.

```
xrprimer
├──
...
xrslam
├── xrslam
├── xrslam-pc
├── xrslam-ios
...
```

Firstly, switch XRPrimer to the branch of the specified OpenCV version `git checkout xrslam-opencv3.4.7`

### Linux/Mac

- In XRPrimer, run

```bash
cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build --target install -j8
cmake -S. -Bbuild -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_PRECOMPILED_HEADERS=OFF && cmake --build build --target install -j8
```

to configure some common dependencies.
Expand Down Expand Up @@ -49,3 +69,35 @@ Firstly, switch XRPrimer to the branch of the specified OpenCV version `git chec
- The target `xrslam-ios-visulaizer` is what you need to download to the iPhone, and an APP named `XRSLAM` will start automatically.
+ Be sure that your iPhone is supported by checking the [supported devices list](./supported_devices.md)
+ If the project failed to build in Xcode, try to clean the build folder using `cmd+shift+k`

## Docker image

### Build an Image

We provide a [Dockerfile](../../Dockerfile) to build an image.

```bash
docker build -t xrslam .
```

### Create a Container

Create a container with command:

```bash
docker run -it xrslam /bin/bash
```

### Copy Dataset into Container

```bash
# b1e0d3f809f6 is container id, using 'docker ps -a' to find id
docker cp data/EuRoC/MH_01_easy b1e0d3f809f6:MH_01_easy
```

### Run in Container without Visualization

```
cd xrslam
`./build/xrslam-pc/player/xrslam-pc-player -H -c configs/euroc.yaml --tum trajectory.tum euroc:///MH_01_easy/mav0`
```
6 changes: 3 additions & 3 deletions docs/en/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake -B build -D XRSLAM_TEST=ON && cmake --build build -j8
## Run

```bash
./build/xrslam-test/test/test_version
./build/xrslam-test/test/test_se3_cost_function
./build/xrslam-test/test/test_feature_track
./build/bin/test_version
./build/bin/test_se3_cost_function
./build/bin/test_feature_track
```
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 11 Pro Max.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 11 Pro Max

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [481.0881664190002, 480.4710792467649, 320.2416345895888, 229.6982006177264] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.008186069081733506, 0.05197677884867596, 0.01508072339704177]
p_bo: [0.008186069081733506, 0.05197677884867596, 0.01508072339704177]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 11 Pro.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 11 Pro

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [481.413753612, 480.912030316, 319.436583539, 232.480172072] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.00218339193373, 0.0570288900691, -0.00283706920085]
p_bo: [0.00218339193373, 0.0570288900691, -0.00283706920085]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 11.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 11

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [483.527130641, 483.162188656, 317.906683089, 229.805889167] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0098023128033, 0.0942390213267, 0.00624109495822]
p_bo: [0.0098023128033, 0.0942390213267, 0.00624109495822]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 12 Mini.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 12 mini

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [476.465100638, 477.282230536, 316.222405685, 230.516688655] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0154312244201, 0.0135759108866, -0.0142463023927]
p_bo: [0.0154312244201, 0.0135759108866, -0.0142463023927]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 12 Pro Max.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 12 Pro Max

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [490.44594435582246, 491.19931738118839, 320.36597511962873, 237.91757515577376] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.030357133865694889, 0.0089743003907246603, -0.0074080328213569331]
p_bo: [0.030357133865694889, 0.0089743003907246603, -0.0074080328213569331]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 12 Pro.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 12 Pro

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [475.718439315, 476.682666991, 317.023523238, 231.984642714] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0236924070003, 0.0306503133762, -0.00907115099061]
p_bo: [0.0236924070003, 0.0306503133762, -0.00907115099061]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 12.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 12

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [477.89396911927014, 478.93641880878255, 320.806586299477, 231.07172384113187] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.033366085092802436, 0.009419070514053628, -0.006188374507046947]
p_bo: [0.033366085092802436, 0.009419070514053628, -0.006188374507046947]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 13 Mini.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 13 mini

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [484.78541249857631, 485.50275998106952, 328.37382189007457, 242.62088466893189] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0086991239933890945, -0.016880126167925964, 0.0098148487458858576]
p_bo: [0.0086991239933890945, -0.016880126167925964, 0.0098148487458858576]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 13 Pro Max.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 13 Pro Max

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [487.63910146299173, 488.43945947572024, 321.06439580806989, 237.35670903126817] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.032504350636473806, -0.026039847287655928, -0.005131895302319044]
p_bo: [0.032504350636473806, -0.026039847287655928, -0.005131895302319044]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 13 Pro.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 13 Pro

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [489.67542871535045, 490.79240297876072, 323.85872342899847, 241.6239251836401]

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.053617261855615515, -0.0016905232538204646, -0.0075510493739824724]
p_bo: [0.053617261855615515, -0.0016905232538204646, -0.0075510493739824724]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone 13.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone 13

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [483.22335482885603, 483.75821365178473, 320.49073218201124, 238.06214765085522] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0017504484096228939, -0.022064045707162229, 0.013062295349886925]
p_bo: [0.0017504484096228939, -0.022064045707162229, 0.013062295349886925]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone XS Max.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone XS Max

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [483.5317345478957, 484.6903836596454, 319.3868181060467, 236.3964709922874] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.0002617191809000106, 0.06166235902652958, -0.001864498673761416]
p_bo: [0.0002617191809000106, 0.06166235902652958, -0.001864498673761416]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
6 changes: 3 additions & 3 deletions xrslam-ios/visualizer/configs/iPhone XS.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# iPhone XS

intrinsic: [524.742906796, 524.638736552, 322.496951979, 235.249899518] # fx fy cx cy
intrinsic: [483.302341374, 483.554273195, 314.618580309, 228.142471726] # fx fy cx cy

q_bi: [0, 0, 0, 1] # x y z w
q_bc: [-0.7071068, 0.7071068, 0, 0 ]
q_bo: [-0.7071068, 0.7071068, 0, 0 ]

p_bc: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bo: [0.0229970087959, 0.0754115110747, -0.0024726172229]
p_bc: [0.00280865568868, 0.0613231596705, -0.00507329799056]
p_bo: [0.00280865568868, 0.0613231596705, -0.00507329799056]
p_bi: [0, 0, 0]

sigma_u: 0.5
Expand Down
Loading

0 comments on commit 6590f3f

Please sign in to comment.