HKUST-Aerial-Robotics / VINS-Mobile

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

Should NULL and loss_function exchange? #94

Closed TakahashiJinxu closed 6 years ago

TakahashiJinxu commented 7 years ago

Hello, I want to ask, should the words "NULL" and "loss_function" exchange? They are in here: KeyFrameDatabase::optimize4DoFLoopPoseGraph. problem.AddResidualBlock(cost_function, loss_function, euler_array[i-j], t_array[i-j], euler_array[i], t_array[i]); problem.AddResidualBlock(cost_function, NULL, euler_array[connected_index], t_array[connected_index], euler_array[i], t_array[i]); The technical report says sequential edges use 2norm-loss while loop edges use huber loss. I tested the code on my own smartphone (after adaptions), and found that after the change the result became better during one test and remained similar during another test.

vonzy commented 7 years ago

In fact, loss_function can make the estimator more robust in theory, but not always, sometimes it has worse performance.