Skip to content

Commit 06cc895

Browse files
authored
Merge pull request #232 from rpng/develop_v2.6
Develop v2.6 - Dynamic Initialization and Async Publishing
2 parents ed7fe55 + 4fa753c commit 06cc895

File tree

201 files changed

+700445
-303436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+700445
-303436
lines changed

.github/workflows/build.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ROS Free Workflow
22

33
on:
44
push:
5-
branches: [ master]
5+
branches: [ master ]
66
pull_request:
77

88
jobs:
@@ -12,9 +12,25 @@ jobs:
1212
steps:
1313
- name: Code Checkout
1414
uses: actions/checkout@v2
15+
- name: Installing Ceres Solver
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
19+
# cd ..
20+
# git clone https://ceres-solver.googlesource.com/ceres-solver
21+
# cd ceres-solver
22+
# git checkout tags/2.0.0
23+
# mkdir build
24+
# cd build
25+
# cmake ..
26+
# sudo make install
27+
# cd ../../
1528
- name: Configure and Build
1629
run: |
17-
sudo apt-get update && sudo apt-get install -y libeigen3-dev libopencv-dev libboost-all-dev &&
18-
mkdir build && cd build &&
19-
cmake ../ov_msckf/ && make
30+
sudo apt-get update
31+
sudo apt-get install -y libeigen3-dev libopencv-dev libboost-all-dev
32+
mkdir build
33+
cd build
34+
cmake ../ov_msckf/
35+
make
2036

Dockerfile_ros1_16_04

+15-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,22 @@ FROM osrf/ros:kinetic-desktop-full
1616
RUN apt-get update && apt-get install -y libeigen3-dev nano git
1717
RUN sudo apt-get install -y python-catkin-tools
1818

19+
# Ceres solver install and setup
20+
# NOTE: need to use an older version as eigen is very outdated here!!!
21+
# NOTE: https://github.com/ceres-solver/ceres-solver/issues/541
22+
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
23+
# ENV CERES_VERSION="2.0.0"
24+
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
25+
# cd ceres-solver && \
26+
# git checkout tags/${CERES_VERSION} && \
27+
# git reset --hard e51e9b46f6 && \
28+
# mkdir build && cd build && \
29+
# cmake .. && \
30+
# make -j$(nproc) install && \
31+
# rm -rf ../../ceres-solver
32+
1933
# Seems this has Python 2.7 installed on it...
20-
RUN sudo apt-get install -y python2.7-dev python-matplotlib python-numpy python-psutil python-tk
34+
RUN apt-get update && apt-get install -y python2.7-dev python-matplotlib python-numpy python-psutil python-tk
2135

2236
# Install deps needed for clion remote debugging
2337
# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/

Dockerfile_ros1_18_04

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@ FROM osrf/ros:melodic-desktop-full
1616
RUN apt-get update && apt-get install -y libeigen3-dev nano git
1717
RUN sudo apt-get install -y python-catkin-tools
1818

19+
# Ceres solver install and setup
20+
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
21+
# ENV CERES_VERSION="2.0.0"
22+
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
23+
# cd ceres-solver && \
24+
# git checkout tags/${CERES_VERSION} && \
25+
# mkdir build && cd build && \
26+
# cmake .. && \
27+
# make -j$(nproc) install && \
28+
# rm -rf ../../ceres-solver
29+
1930
# Seems this has Python 3.6 installed on it...
20-
RUN sudo apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
31+
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
2132

2233
# Install deps needed for clion remote debugging
2334
# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/

Dockerfile_ros1_20_04

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@ FROM osrf/ros:noetic-desktop-full
1616
RUN apt-get update && apt-get install -y libeigen3-dev nano git
1717
RUN sudo apt-get install -y python3-catkin-tools python3-osrf-pycommon
1818

19+
# Ceres solver install and setup
20+
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
21+
# ENV CERES_VERSION="2.0.0"
22+
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
23+
# cd ceres-solver && \
24+
# git checkout tags/${CERES_VERSION} && \
25+
# mkdir build && cd build && \
26+
# cmake .. && \
27+
# make -j$(nproc) install && \
28+
# rm -rf ../../ceres-solver
29+
1930
# Seems this has Python 3.8 installed on it...
20-
RUN sudo apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
31+
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
2132

2233
# Install deps needed for clion remote debugging
2334
# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/

Dockerfile_ros2_18_04

+12-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ FROM osrf/ros:dashing-desktop
1515
# Also some helper utilities for fast in terminal edits (nano etc)
1616
RUN apt-get update && apt-get install -y libeigen3-dev nano git
1717

18+
# Ceres solver install and setup
19+
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
20+
# ENV CERES_VERSION="2.0.0"
21+
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
22+
# cd ceres-solver && \
23+
# git checkout tags/${CERES_VERSION} && \
24+
# mkdir build && cd build && \
25+
# cmake .. && \
26+
# make -j$(nproc) install && \
27+
# rm -rf ../../ceres-solver
28+
1829
# Seems this has Python 3.6 installed on it...
19-
RUN sudo apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
30+
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
2031

2132
# Install deps needed for clion remote debugging
2233
# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/

Dockerfile_ros2_20_04

+12-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ FROM osrf/ros:galactic-desktop
1515
# Also some helper utilities for fast in terminal edits (nano etc)
1616
RUN apt-get update && apt-get install -y libeigen3-dev nano git
1717

18+
# Ceres solver install and setup
19+
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
20+
# ENV CERES_VERSION="2.0.0"
21+
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
22+
# cd ceres-solver && \
23+
# git checkout tags/${CERES_VERSION} && \
24+
# mkdir build && cd build && \
25+
# cmake .. && \
26+
# make -j$(nproc) install && \
27+
# rm -rf ../../ceres-solver
28+
1829
# Seems this has Python 3.8 installed on it...
19-
RUN sudo apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
30+
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
2031

2132
# Install deps needed for clion remote debugging
2233
# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/

ReadMe.md

+24-15
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ details on what the system supports.
2121

2222
## News / Events
2323

24+
* **March 14, 2022** - Initial dynamic initialization open sourcing, asynchronous subscription to inertial readings and publishing of odometry, support for lower frequency feature tracking. See v2.6 [PR#232](https://github.com/rpng/open_vins/pull/232) for details.
2425
* **December 13, 2021** - New YAML configuration system, ROS2 support, Docker images, robust static initialization based on disparity, internal logging system to reduce verbosity, image transport publishers, dynamic number of features support, and other small fixes. See
2526
v2.5 [PR#209](https://github.com/rpng/open_vins/pull/209) for details.
2627
* **July 19, 2021** - Camera classes, masking support, alignment utility, and other small fixes. See
@@ -80,24 +81,21 @@ details on what the system supports.
8081
* Visual tracking support
8182
* Monocular camera
8283
* Stereo camera
83-
* Binocular camera
84+
* Binocular (synchronized) cameras
8485
* KLT or descriptor based
8586
* Masked tracking
86-
* Static IMU initialization (sfm will be open sourced later)
87+
* Static and dynamic state initialization
8788
* Zero velocity detection and updates
8889
* Out of the box evaluation on EurocMav, TUM-VI, UZH-FPV, KAIST Urban and VIO datasets
8990
* Extensive evaluation suite (ATE, RPE, NEES, RMSE, etc..)
9091

9192
## Codebase Extensions
9293

93-
* **[ov_secondary](https://github.com/rpng/ov_secondary)** - This is an example secondary thread which provides loop
94-
closure in a loosely coupled manner for [OpenVINS](https://github.com/rpng/open_vins). This is a modification of the
95-
code originally developed by the HKUST aerial robotics group and can be found in
96-
their [VINS-Fusion](https://github.com/HKUST-Aerial-Robotics/VINS-Fusion) repository. Here we stress that this is a
97-
loosely coupled method, thus no information is returned to the estimator to improve the underlying OpenVINS odometry.
98-
This codebase has been modified in a few key areas including: exposing more loop closure parameters, subscribing to
99-
camera intrinsics, simplifying configuration such that only topics need to be supplied, and some tweaks to the loop
100-
closure detection to improve frequency.
94+
* **[vicon2gt](https://github.com/rpng/vicon2gt)** - This utility was created to generate groundtruth trajectories using
95+
a motion capture system (e.g. Vicon or OptiTrack) for use in evaluating visual-inertial estimation systems.
96+
Specifically we calculate the inertial IMU state (full 15 dof) at camera frequency rate and generate a groundtruth
97+
trajectory similar to those provided by the EurocMav datasets. Performs fusion of inertial and motion capture
98+
information and estimates all unknown spacial-temporal calibrations between the two sensors.
10199

102100
* **[ov_maplab](https://github.com/rpng/ov_maplab)** - This codebase contains the interface wrapper for exporting
103101
visual-inertial runs from [OpenVINS](https://github.com/rpng/open_vins) into the ViMap structure taken
@@ -107,11 +105,15 @@ details on what the system supports.
107105
running the data through OpenVINS. Some example have been provided along with a helper script to export trajectories
108106
into the standard groundtruth format.
109107

110-
* **[vicon2gt](https://github.com/rpng/vicon2gt)** - This utility was created to generate groundtruth trajectories using
111-
a motion capture system (e.g. Vicon or OptiTrack) for use in evaluating visual-inertial estimation systems.
112-
Specifically we calculate the inertial IMU state (full 15 dof) at camera frequency rate and generate a groundtruth
113-
trajectory similar to those provided by the EurocMav datasets. Performs fusion of inertial and motion capture
114-
information and estimates all unknown spacial-temporal calibrations between the two sensors.
108+
* **[ov_secondary](https://github.com/rpng/ov_secondary)** - This is an example secondary thread which provides loop
109+
closure in a loosely coupled manner for [OpenVINS](https://github.com/rpng/open_vins). This is a modification of the
110+
code originally developed by the HKUST aerial robotics group and can be found in
111+
their [VINS-Fusion](https://github.com/HKUST-Aerial-Robotics/VINS-Fusion) repository. Here we stress that this is a
112+
loosely coupled method, thus no information is returned to the estimator to improve the underlying OpenVINS odometry.
113+
This codebase has been modified in a few key areas including: exposing more loop closure parameters, subscribing to
114+
camera intrinsics, simplifying configuration such that only topics need to be supplied, and some tweaks to the loop
115+
closure detection to improve frequency.
116+
115117

116118
## Demo Videos
117119

@@ -127,6 +129,9 @@ details on what the system supports.
127129
<a href="http://www.youtube.com/watch?v=MCzTF9ye2zw">
128130
<img src="https://raw.githubusercontent.com/rpng/open_vins/master/docs/youtube/MCzTF9ye2zw.jpg" width="120" height="90"/>
129131
</a>
132+
<a href="http://www.youtube.com/watch?v=eSQLWcNrx_I">
133+
<img src="https://raw.githubusercontent.com/rpng/open_vins/master/docs/youtube/eSQLWcNrx_I.jpg" width="120" height="90" />
134+
</a>
130135
<br/>
131136

132137
<a href="http://www.youtube.com/watch?v=187AXuuGNNw">
@@ -138,6 +143,10 @@ details on what the system supports.
138143
<a href="http://www.youtube.com/watch?v=ExPIGwORm4E">
139144
<img src="https://raw.githubusercontent.com/rpng/open_vins/master/docs/youtube/ExPIGwORm4E.jpg" width="120" height="90" />
140145
</a>
146+
<a href="http://www.youtube.com/watch?v=lXHl-qgLGl">
147+
<img src="https://raw.githubusercontent.com/rpng/open_vins/master/docs/youtube/lXHl-qgLGl.jpg" width="120" height="90" />
148+
</a>
149+
141150

142151

143152
## Credit / Licensing

config/euroc_mav/estimator_config.yaml

+22-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ max_clones: 11 # how many clones in the sliding window
1717
max_slam: 50 # number of features in our state vector
1818
max_slam_in_update: 25 # update can be split into sequential updates of batches, how many in a batch
1919
max_msckf_in_update: 40 # how many MSCKF features to use in the update
20-
dt_slam_delay: 2 # delay before initializing (helps with stability from bad initialization...)
20+
dt_slam_delay: 1 # delay before initializing (helps with stability from bad initialization...)
2121

2222
gravity_mag: 9.81 # magnitude of gravity in this location
2323

@@ -37,10 +37,26 @@ zupt_only_at_beginning: true
3737
# ==================================================================
3838
# ==================================================================
3939

40-
init_window_time: 0.75 # how many seconds to collect initialization information
40+
init_window_time: 2.0 # how many seconds to collect initialization information
4141
init_imu_thresh: 1.5 # threshold for variance of the accelerometer to detect a "jerk" in motion
4242
init_max_disparity: 1.5 # max disparity to consider the platform stationary (dependent on resolution)
43-
init_max_features: 50 # how many features to track during initialization (saves on computation)
43+
init_max_features: 25 # how many features to track during initialization (saves on computation)
44+
45+
init_dyn_mle_opt_calib: false
46+
init_dyn_mle_max_iter: 50
47+
init_dyn_mle_max_time: 0.05
48+
init_dyn_mle_max_threads: 6
49+
init_dyn_num_pose: 6
50+
init_dyn_min_deg: 10.0
51+
52+
init_dyn_inflation_ori: 10
53+
init_dyn_inflation_vel: 100
54+
init_dyn_inflation_bg: 10
55+
init_dyn_inflation_ba: 100
56+
init_dyn_min_rec_cond: 1e-12
57+
58+
init_dyn_bias_g: [0.0, 0.0, 0.0]
59+
init_dyn_bias_a: [0.0, 0.0, 0.0]
4460

4561
# ==================================================================
4662
# ==================================================================
@@ -61,12 +77,13 @@ filepath_gt: "/tmp/ov_groundtruth.txt"
6177
# our front-end feature tracking parameters
6278
# we have a KLT and descriptor based (KLT is better implemented...)
6379
use_klt: true
64-
num_pts: 250
65-
fast_threshold: 15
80+
num_pts: 200
81+
fast_threshold: 20
6682
grid_x: 20
6783
grid_y: 20
6884
min_px_dist: 15
6985
knn_ratio: 0.70
86+
track_frequency: 21.0
7087
downsample_cameras: false # will downsample image in half if true
7188
multi_threading: true # if should enable opencv multi threading
7289
histogram_method: "HISTOGRAM" # NONE, HISTOGRAM, CLAHE

config/kaist/estimator_config.yaml

+36-17
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ calib_cam_extrinsics: false
1313
calib_cam_intrinsics: true
1414
calib_cam_timeoffset: true
1515

16-
max_clones: 25
17-
max_slam: 10
16+
max_clones: 12
17+
max_slam: 50
1818
max_slam_in_update: 25
19-
max_msckf_in_update: 100
19+
max_msckf_in_update: 50
2020
dt_slam_delay: 1
2121

22-
gravity_mag: 9.79858
22+
#gravity_mag: 9.79858
23+
gravity_mag: 9.81
2324

2425
feat_rep_msckf: "ANCHORED_MSCKF_INVERSE_DEPTH"
2526
feat_rep_slam: "ANCHORED_MSCKF_INVERSE_DEPTH"
@@ -28,19 +29,36 @@ feat_rep_aruco: "ANCHORED_MSCKF_INVERSE_DEPTH"
2829
# zero velocity update parameters we can use
2930
# we support either IMU-based or disparity detection.
3031
try_zupt: true
31-
zupt_chi2_multipler: 0 # set to 0 for only disp-based
32+
zupt_chi2_multipler: 1 # set to 0 for only disp-based
3233
zupt_max_velocity: 0.1
33-
zupt_noise_multiplier: 1
34-
zupt_max_disparity: 0.3 # set to 0 for only imu-based
34+
zupt_noise_multiplier: 5
35+
zupt_max_disparity: 0.4 # set to 0 for only imu-based
3536
zupt_only_at_beginning: false
3637

3738
# ==================================================================
3839
# ==================================================================
3940

40-
init_window_time: 1.0
41-
init_imu_thresh: 0.5
41+
init_window_time: 2.0
42+
init_imu_thresh: 0.5 #0.5
4243
init_max_disparity: 1.5
43-
init_max_features: 50
44+
init_max_features: 25
45+
46+
init_dyn_mle_opt_calib: false
47+
init_dyn_mle_max_iter: 50
48+
init_dyn_mle_max_time: 0.05
49+
init_dyn_mle_max_threads: 6
50+
init_dyn_num_pose: 6
51+
init_dyn_min_deg: 0.0 # traj is mostly straight line motion
52+
53+
init_dyn_inflation_ori: 10
54+
init_dyn_inflation_vel: 100
55+
init_dyn_inflation_bg: 10
56+
init_dyn_inflation_ba: 100
57+
init_dyn_min_rec_cond: 1e-20 # traj is mostly straight line motion
58+
59+
init_dyn_bias_g: [0.0, 0.0, 0.0]
60+
init_dyn_bias_a: [0.0, 0.0, 0.0]
61+
4462

4563
# ==================================================================
4664
# ==================================================================
@@ -59,18 +77,19 @@ filepath_gt: "/tmp/ov_groundtruth.txt"
5977
# our front-end feature tracking parameters
6078
# we have a KLT and descriptor based (KLT is better implemented...)
6179
use_klt: true
62-
num_pts: 300
63-
fast_threshold: 10
80+
num_pts: 200
81+
fast_threshold: 50
6482
grid_x: 20
65-
grid_y: 20
66-
min_px_dist: 20
83+
grid_y: 15
84+
min_px_dist: 30
6785
knn_ratio: 0.65
86+
track_frequency: 21.0
6887
downsample_cameras: false
6988
multi_threading: true
70-
histogram_method: "CLAHE" # NONE, HISTOGRAM, CLAHE
89+
histogram_method: "HISTOGRAM" # NONE, HISTOGRAM, CLAHE
7190

72-
fi_max_dist: 150
73-
fi_max_baseline: 200
91+
fi_max_dist: 500
92+
fi_max_baseline: 800
7493
fi_max_cond_number: 20000
7594
fi_triangulate_1d: false
7695

config/kaist/kalibr_imucam_chain.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ cam1:
2121
- [0.0, 0.0, 0.0, 1.0]
2222
cam_overlaps: [0]
2323
camera_model: pinhole
24-
distortion_coeffs: [0.0034003170790442797, 0.001766278153469831, -0.00266312569781606, 0.0003299517423931039]
24+
distortion_coeffs: [-5.4921981799999998e-02,1.4243657430000001e-01,7.5412299999999996e-05,-6.7560530000000001e-04]
2525
distortion_model: radtan
26-
intrinsics: [190.44236969414825, 190.4344384721956, 252.59949716835982, 254.91723064636983]
26+
intrinsics: [8.1378205539589999e+02,8.0852165574269998e+02,6.1386419539320002e+02,2.4941049348650000e+02]
2727
resolution: [1280, 560]
2828
rostopic: /stereo/right/image_raw

0 commit comments

Comments
 (0)