Skip to content

Commit 8b70a34

Browse files
committed
Added new InputBuffer and FeatureDetector
1 parent 7f0ad74 commit 8b70a34

20 files changed

+429
-538
lines changed

CMakeLists.txt

+3-7
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ else()
2323
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
2424
endif()
2525

26-
# Enable compile optimizations
27-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsee -fomit-frame-pointer -fno-signed-zeros -fno-math-errno -funroll-loops")
28-
2926
# Enable debug flags (if you want to debug in gdb)
30-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall")
27+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g3")
3128

3229
# Find catkin (the ROS build system)
3330
# Add this for finding ros dependencies
@@ -68,9 +65,8 @@ add_library(${PROJECT_NAME} SHARED
6865
src/rvio/Tracker.cc
6966
src/rvio/PreIntegrator.cc
7067
src/rvio/Ransac.cc
71-
src/rvio/ImuBuffer.cc
72-
src/rvio/CornerCluster.cc
73-
src/rvio/CornerDetector.cc
68+
src/rvio/InputBuffer.cc
69+
src/rvio/FeatureDetector.cc
7470
)
7571

7672
target_link_libraries(${PROJECT_NAME}

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# R-VIO
22

3-
R-VIO is an efficient, lightweight, **robocentric visual-inertial odometry** algorithm for consistent 3D motion tracking using only a monocular camera and a single IMU. Different from the standard world-centric algorithms which directly estimate absolute motion of the mobile platform with respect to a fixed, gravity-aligned, global frame of reference, R-VIO i) estimates relative motion of higher accuracy with respect to a moving, local frame (for example, IMU frame), and ii) incrementally updates global pose (orientation and position) through composition. This code is developed with the robocentric sliding-window filtering-based VIO framework that was originally proposed in our *IROS2018* paper and further extended in our recent *IJRR* paper:
3+
R-VIO is an efficient, lightweight, **robocentric** visual-inertial navigation algorithm for consistent 3D motion tracking using only a monocular camera and a single IMU. Different from the standard world-centric algorithms which directly estimate absolute motion of the mobile platform with respect to a fixed, gravity-aligned, global frame of reference, R-VIO i) estimates relative motion of higher accuracy with respect to a moving, local frame (the IMU frame here), and ii) incrementally updates global pose (orientation and position) through a composition step. This code is developed with the robocentric sliding-window filtering-based VIO framework that was originally proposed in our *IROS2018* paper and further extended in our recent *IJRR* paper:
44

55
- Zheng Huai and Guoquan Huang, **Robocentric visual-inertial odometry**, *The International Journal of Robotics Research (IJRR)*, July 2019: [download](https://journals.sagepub.com/doi/10.1177/0278364919853361).
66

77
```
88
@article{huai2019robocentric,
9-
title = {Robocentric visual--inertial odometry},
9+
title = {Robocentric visual-inertial odometry},
1010
author = {Huai, Zheng and Huang, Guoquan},
1111
journal = {The International Journal of Robotics Research},
1212
publisher = {SAGE Publications Sage UK: London, England},
@@ -36,7 +36,7 @@ IJRR video (Our 9.8km **Urban Driving** dataset): [YouTube](https://www.youtube.
3636

3737
## 1. Prerequisites
3838

39-
We have tested the code under Ubuntu **16.04** and ROS **Kinetic**.
39+
We have tested this code under Ubuntu **16.04** and ROS **Kinetic**.
4040

4141
### ROS
4242
Download and install instructions can be found at: http://wiki.ros.org/kinetic/Installation/Ubuntu.
@@ -63,7 +63,10 @@ First, `git clone` the repository and `catkin_make` it. Then, to run `rvio` with
6363
```
6464
Terminal 4: rosbag play --pause V1_01_easy.bag /cam0/image_raw:=/camera/image_raw /imu0:=/imu
6565
```
66-
You can also run R-VIO with your own sensor (data) by creating a config file `rvio_NAME_OF_YOUR_DATA.yaml` in *config* folder and the corresponding launch file `NAME_OF_YOUR_DATA.launch` in *launch* folder referring to the above EuRoC example.
66+
67+
Note that when testing the `Machine Hall` sequences, you should skip the data in the first few seconds (e.g., 40s for `MH_01_easy`) which are used for initializing the map for SLAM-based algorithms.
68+
69+
You can also run R-VIO with your own sensors (data) by creating a config file `rvio_NAME_OF_YOUR_DATA.yaml` in *config* folder and the corresponding launch file `NAME_OF_YOUR_DATA.launch` in *launch* folder, referring to our EuRoC example.
6770

6871
## 3. License
6972

config/rvio_euroc.yaml

+10-9
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# IMU data rate
88
IMU.dps: 200
99

10-
# Threshold of small angle [rad] (<.1deg)
11-
IMU.nSmallAngle: 0.001745329
12-
1310
# IMU sensor noise
1411
IMU.sigma_g: 1.6968e-04
1512
IMU.sigma_wg: 1.9393e-05
@@ -19,6 +16,9 @@ IMU.sigma_wa: 3.0000e-3
1916
# Gravity
2017
IMU.nG: 9.8082
2118

19+
# Threshold of small angle [rad] (<.1deg)
20+
IMU.nSmallAngle: 0.001745329
21+
2222
#--------------------------------------------------------------------------------------------
2323
# Camera Parameters (fixed).
2424
#--------------------------------------------------------------------------------------------
@@ -72,19 +72,20 @@ Camera.nTimeOffset: 0
7272
Tracker.nFeatures: 200
7373

7474
# Max. tracking length
75-
Tracker.nMaxTrackingLength: 15 # 10 # 5
75+
Tracker.nMaxTrackingLength: 15
7676

7777
# Min. tracking length
7878
Tracker.nMinTrackingLength: 3
7979

8080
# Min. distance between features
81-
Tracker.nMinDist: 10
81+
Tracker.nMinDist: 15
8282

8383
# Quality level of features
8484
Tracker.nQualLvl: 0.01
8585

86-
# Size of chess grid
87-
Tracker.nGridSize: 100
86+
# Block size of image chess grid
87+
Tracker.nBlockSizeX: 150
88+
Tracker.nBlockSizeY: 120
8889

8990
# Use histogram equalizer or not
9091
Tracker.EnableEqualizer: 1
@@ -93,14 +94,14 @@ Tracker.EnableEqualizer: 1
9394
Tracker.UseSampson: 1
9495

9596
# Error threshold for inlier (RANSAC)
96-
Tracker.nInlierThrd: 1e-4
97+
Tracker.nInlierThrd: 1e-5
9798

9899
#--------------------------------------------------------------------------------------------
99100
# Initialization Parameters (tunable).
100101
#--------------------------------------------------------------------------------------------
101102

102103
# Thresholds for moving detection [rad,m]
103-
INI.nThresholdAngle: 0.005
104+
INI.nThresholdAngle: 0.005 # 0.01 (for MH_*)
104105
INI.nThresholdDispl: 0.01
105106

106107
# Use gravity alignment or not

src/rvio/CornerCluster.cc

-103
This file was deleted.

src/rvio/CornerCluster.h

-63
This file was deleted.

src/rvio/CornerDetector.cc

-56
This file was deleted.

0 commit comments

Comments
 (0)