rpng / open_vins

An open source platform for visual-inertial navigation research.
https://docs.openvins.com
GNU General Public License v3.0
2.18k stars 642 forks source link

Dynamic Initializer Failed #243

Closed xhglz closed 2 years ago

xhglz commented 2 years ago

It works well on PC, failed when I try to run it on my ARM board (1.43GHz) , how can I solve it.

Rosbag: MH_01_easy.bag

estimator_config.yaml

try_zupt: false
zupt_chi2_multipler: 0 # set to 0 for only disp-based
zupt_max_velocity: 0.1
zupt_noise_multiplier: 50
zupt_max_disparity: 1.5 # set to 0 for only imu-based
zupt_only_at_beginning: true

init_window_time: 2.0 # how many seconds to collect initialization information
init_imu_thresh: 1.5 # threshold for variance of the accelerometer to detect a "jerk" in motion
init_max_disparity: 1.5 # max disparity to consider the platform stationary (dependent on resolution)
init_max_features: 25 # how many features to track during initialization (saves on computation)

init_dyn_mle_opt_calib: false
init_dyn_mle_max_iter: 50
init_dyn_mle_max_time: 0.05
init_dyn_mle_max_threads: 6
init_dyn_num_pose: 6
init_dyn_min_deg: 10.0

init_dyn_inflation_ori: 10
init_dyn_inflation_vel: 100
init_dyn_inflation_bg: 10
init_dyn_inflation_ba: 100
init_dyn_min_rec_cond: 1e-12

init_dyn_bias_g: [0.0, 0.0, 0.0]
init_dyn_bias_a: [0.0, 0.0, 0.0]

Error

DynamicInitializer.cpp:854 [init-d]: opt failed: Maximum solver time reached. Total solver time: 5.406238e-02 >= 5.000000e-02.!
Vio.cpp:131 [TIME]: 0.0289 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0290 seconds total (34.4 hz)
Vio.cpp:562 [init]: failed initialization in 0.3418 seconds
Vio.cpp:131 [TIME]: 0.0254 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0264 seconds total (37.9 hz)
InertialInitializer.cpp:61 [init]: disparity of the platform is 51.6230 (1.5000 threshold)
InertialInitializer.cpp:70 [init]: USING DYNAMIC INITIALIZER METHOD!
DynamicInitializer.cpp:159 [init-d]: |theta_I| = 25.1216 deg and |accel| = 9.7952
Vio.cpp:131 [TIME]: 0.0121 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0122 seconds total (81.9 hz)
Vio.cpp:131 [TIME]: 0.0158 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0159 seconds total (63.1 hz)
DynamicInitializer.cpp:276 [init-d]: system of 882 measurement x 258 states created (84 features, stereo)
Vio.cpp:131 [TIME]: 0.0197 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0198 seconds total (50.4 hz)
Vio.cpp:131 [TIME]: 0.0183 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0185 seconds total (54.1 hz)
Vio.cpp:131 [TIME]: 0.0274 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0275 seconds total (36.4 hz)
Vio.cpp:131 [TIME]: 0.0283 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0285 seconds total (35.1 hz)
DynamicInitializer.cpp:388 [init-d]: CM cond = 340904.249 | rank = 6 of 6 (1.332e-15 thresh)
DynamicInitializer.cpp:432 [init-d]: smallest real eigenvalue = 0.05984 (cost of 0.000000)
Vio.cpp:131 [TIME]: 0.0180 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0182 seconds total (55.1 hz)
Vio.cpp:131 [TIME]: 0.0300 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0301 seconds total (33.2 hz)
DynamicInitializer.cpp:445 [init-d]: velocity in I0 was -0.232,-0.272,-0.440 and |v| = 0.5666
DynamicInitializer.cpp:455 [init-d]: gravity in I0 was 9.093,0.961,-3.554 and |g| = 9.8100
Vio.cpp:131 [TIME]: 0.0194 seconds for tracking
ROS1VIO.cpp:333 [TIME]: 0.0196 seconds total (51.1 hz)
DynamicInitializer.cpp:846 [init-d]: 5 iterations | 7 states, 80 feats (80 valid) | 382 param and 994 res | cost 2.2132e+03 => 8.9974e+02
goldbattle commented 2 years ago

You likely need to increase the allowed optimization time init_dyn_mle_max_time. You can also try to reduce the number of threads with init_dyn_mle_max_threads if your ARM board has less cores / big little arch.