Skip to content

Commit

Permalink
Merge pull request #23 from wangxiaomeng030/main
Browse files Browse the repository at this point in the history
Refractor interface of XRSLAM. The new interface can support both CE&EE version.
  • Loading branch information
wangnancpp authored Feb 28, 2023
2 parents 9b56351 + 4c4cd60 commit dbf7077
Show file tree
Hide file tree
Showing 86 changed files with 5,840 additions and 1,626 deletions.
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ repos:
hooks:
- id: clang-format
- repo: https://github.com/PyCQA/flake8.git
rev: 3.8.3
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.1.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
Expand Down
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

formats: all

python:
version: 3.7
install:
- requirements: requirements/docs.txt
- requirements: requirements/readthedocs.txt
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ option(XRSLAM_TEST "..." OFF)
if(IOS)
set(XRSLAM_IOS ON)
set(XRSLAM_ENABLE_THREADING ON)
set(XRSLAM_ENABLE_DEBUG_INSPECTION OFF CACHE BOOL "..." FORCE)
#set(XRSLAM_ENABLE_DEBUG_INSPECTION OFF CACHE BOOL "..." FORCE)
endif()


Expand All @@ -32,6 +32,8 @@ endif()

add_subdirectory(xrslam)
add_subdirectory(xrslam-extra)
add_subdirectory(xrslam-interface)
add_subdirectory(xrslam-localization)

if(XRSLAM_PC)
add_subdirectory(xrslam-pc)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ RUN git clone https://github.com/openxrlab/xrprimer.git -b xrslam-opencv3.4.7 \
&& cmake --build build --target install -j4

RUN git clone https://github.com/openxrlab/xrslam.git \
&& cd xrslam && cmake -B build && cmake --build build -j4
&& cd xrslam && cmake -B build -DXRSLAM_PC_HEADLESS_ONLY=ON && cmake --build build -j4
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<div align="center">
<img src="resources/XRSLAM.png" width="600"/>
</div>

<br/>

<div align="left">
<div align="left">

[![actions](https://github.com/openxrlab/xrslam/workflows/build/badge.svg)](https://github.com/openxrlab/xrslam/actions)
[![LICENSE](https://img.shields.io/github/license/openxrlab/xrslam)](https://github.com/openxrlab/xrslam/blob/main/LICENSE)

[![Documentation](https://readthedocs.org/projects/xrslam/badge/?version=latest)](https://xrslam.readthedocs.io/en/latest/)[![actions](https://github.com/openxrlab/xrslam/workflows/build/badge.svg)](https://github.com/openxrlab/xrslam/actions)[![LICENSE](https://img.shields.io/github/license/openxrlab/xrslam)](https://github.com/openxrlab/xrslam/blob/main/LICENSE)

</div>

Expand Down
1 change: 1 addition & 0 deletions cmake/external/yaml-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if(NOT TARGET depends::yaml-cpp)
FetchContent_Populate(depends-yaml-cpp)
message(STATUS "Fetching yaml-cpp sources - done")
endif()
add_compile_options(-fPIC)
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "" FORCE)
Expand Down
67 changes: 0 additions & 67 deletions configs/euroc.yaml

This file was deleted.

53 changes: 53 additions & 0 deletions configs/euroc_sensor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%YAML:1.0
imu:
# inertial sensor noise model parameters (static)
gyroscope_noise_density: 0.01 # [ rad / s / sqrt(Hz) ]
gyroscope_random_walk: 0.0001 # [ rad / s^2 / sqrt(Hz) ]
accelerometer_noise_density: 0.1 # [ m / s^2 / sqrt(Hz) ]
accelerometer_random_walk: 0.001 # [ m / s^3 / sqrt(Hz) ]
accelerometer_bias: [0.0, 0.0, 0.0] # acc bias prior
gyroscope_bias: [0.0, 0.0, 0.0] # gyro bias prior
extrinsic:
q_bi: [ 0.0, 0.0, 0.0, 1.0 ] # x y z w
p_bi: [ 0.0, 0.0, 0.0 ] # x y z [m]
noise:
cov_g: [
2.8791302399999997e-08, 0.0, 0.0,
0.0, 2.8791302399999997e-08, 0.0,
0.0, 0.0, 2.8791302399999997e-08]
cov_a: [
4.0e-6, 0.0, 0.0,
0.0, 4.0e-6, 0.0,
0.0, 0.0, 4.0e-6]
cov_bg: [
3.7608844899999997e-10, 0.0, 0.0,
0.0, 3.7608844899999997e-10, 0.0,
0.0, 0.0, 3.7608844899999997e-10]
cov_ba: [
9.0e-6, 0.0, 0.0,
0.0, 9.0e-6, 0.0,
0.0, 0.0, 9.0e-6]

cam0:
# camera0 wrt. body frame
T_BS:
cols: 4
rows: 4
data: [0.0148655429818, -0.999880929698, 0.00414029679422, -0.0216401454975,
0.999557249008, 0.0149672133247, 0.025715529948, -0.064676986768,
-0.0257744366974, 0.00375618835797, 0.999660727178, 0.00981073058949,
0.0, 0.0, 0.0, 1.0]
resolution: [752, 480] # resolution of camera
camera_model: pinhole # camera model
distortion_model: radtan # distortion model
intrinsics: [458.654, 457.296, 367.215, 248.375] # fu, fv, cu, cv
camera_distortion_flag: 1 # use distortion model or not
distortion: [-0.28340811, 0.07395907, 0.00019359, 1.76187114e-05] # k1, k2, p1, p2, xi
camera_readout_time: 0.0 # camera readout time
time_offset: 0.0 # camera time delay wrt. IMU
extrinsic:
q_bc: [ -7.7071797555374275e-03, 1.0499323370587278e-02, 7.0175280029197162e-01, 7.1230146066895372e-01 ] # x y z w
p_bc: [ -0.0216401454975, -0.064676986768, 0.00981073058949 ] # x y z [m]
noise: [
0.5, 0.0,
0.0, 0.5] # [pixel^2]
28 changes: 28 additions & 0 deletions configs/euroc_slam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
%YAML:1.0
output:
q_bo: [ 0.0, 0.0, 0.0, 1.0 ] # x y z w
p_bo: [ 0.0, 0.0, 0.0 ] # x y z [m]

sliding_window:
size: 10
force_keyframe_landmarks: 35

feature_tracker:
min_keypoint_distance: 10.0 # [px]
max_keypoint_detection: 1000
max_init_frames: 60
max_frames: 20
predict_keypoints: true

initializer:
keyframe_num: 8
keyframe_gap: 5
min_matches: 50
min_parallax: 10.0
min_triangulation: 20
min_landmarks: 30
refine_imu: true

solver:
iteration_limit: 30
time_limit: 1.0e6 # [s]
Loading

0 comments on commit dbf7077

Please sign in to comment.