HKUST-Aerial-Robotics / VINS-Mobile

Monocular Visual-Inertial State Estimator on Mobile Phones
GNU General Public License v3.0
1.27k stars 524 forks source link

Why does Label of VINS-Mobile alway appear "FAIL_COST" "FAIL_SFM" and "FAIL_ALIGN". #100

Open Chenwei-Jheng opened 6 years ago

Chenwei-Jheng commented 6 years ago

I try VINS_Mobile to iPhone 6 Plus, but STA Label appears FAIL_COST, FAIL_SFM and FAIL_ALIGN. The iPhone 6 PLUS params are FOCUS_LENGTH_X = 547.565; FOCUS_LENGTH_Y = 547.998; PX = 239.033; PY = 309.452; SOLVER_TIME = 0.08; FREQ = 3; //extrinsic param TIC_X = 0.0; TIC_Y = 0.065; TIC_Z = 0.0; Is the questoin "FAIL_COST" ,"FAIL_SFM" and "FAIL_ALIGN" about Camera params?

vonzy commented 6 years ago

Maybe not, the optimization doesn't require camera intrinsic parameters of high accuracy (although the result will be worse, but no failure. you should check the quality of the image or the relative rotation between imu and cam.

Chenwei-Jheng commented 6 years ago

In Xcode, I set Edit Scheme -> Run -> Info -> Build Configuration for Release. It is successfully. I set Edit Scheme -> Run -> Info -> Build Configuration for Debug, It appear question about "FAIL_COST" ,"FAIL_SFM" and "FAIL_ALIGN". Do the Eigen or the Ceres Solver cause these question?

kismeter commented 5 years ago

@Chenwei-Jheng Does the issue solved? I also met this kind of issue, always appear "FAIL_PARA" "FAIL_COST" "FAIL_SFM" and "FAIL_ALIGN". when porting to Android

Chenwei-Jheng commented 5 years ago

Maybe the Ceres solver is not accurate in Android. In Xcode, I set "Optimization Level" for "Faster [-O2]", the VINS is successful. You can try to find this Setting in Android Studio or eclipse.

The "Optimization Level" is finded for "Xcode" -> "Build Setting"->"Apple Clang - Code Generation"->"Optimization Level".

kismeter commented 5 years ago

Maybe the Ceres solver is not accurate in Android. In Xcode, I set "Optimization Level" for "Faster [-O2]", the VINS is successful. You can try to find this Setting in Android Studio or eclipse.

The "Optimization Level" is finded for "Xcode" -> "Build Setting"->"Apple Clang - Code Generation"->"Optimization Level".

I explicitly set build type to Release, and change Optimization level for O2, the VINS successful. Thanks

-DCMAKE_BUILD_TYPE=Release