change vertecses loop from forward into refrance
This commit is contained in:
Executable
+224
@@ -0,0 +1,224 @@
|
||||
[12:03:41.417] New key frame
|
||||
[12:03:41.417] BA loop run
|
||||
[12:03:41.419] init error: 1.701205
|
||||
[12:03:41.420] end error: 1.009137
|
||||
[12:03:42.450] New key frame
|
||||
[12:03:42.450] BA loop run
|
||||
[12:03:42.452] init error: 6.237241
|
||||
[12:03:42.453] end error: 0.489862
|
||||
[12:03:42.648] New key frame
|
||||
[12:03:42.648] BA loop run
|
||||
[12:03:42.650] init error: 18.028230
|
||||
[12:03:42.652] end error: 2.508618
|
||||
[12:03:42.933] New key frame
|
||||
[12:03:42.933] BA loop run
|
||||
[12:03:42.937] init error: 36.102278
|
||||
[12:03:42.942] end error: 4.830597
|
||||
[12:03:43.247] New key frame
|
||||
[12:03:43.247] BA loop run
|
||||
[12:03:43.251] init error: 33.122877
|
||||
[12:03:43.255] end error: 5.928311
|
||||
[12:03:43.601] New key frame
|
||||
[12:03:43.601] BA loop run
|
||||
[12:03:43.607] init error: 39.321419
|
||||
[12:03:43.615] end error: 13.236725
|
||||
[12:03:44.013] New key frame
|
||||
[12:03:44.013] BA loop run
|
||||
[12:03:44.020] init error: 42.204503
|
||||
[12:03:44.027] end error: 12.819218
|
||||
[12:03:44.412] New key frame
|
||||
[12:03:44.412] BA loop run
|
||||
[12:03:44.422] init error: 52.348360
|
||||
[12:03:44.435] end error: 20.717566
|
||||
[12:03:44.859] New key frame
|
||||
[12:03:44.859] BA loop run
|
||||
[12:03:44.869] init error: 72.326163
|
||||
[12:03:44.878] end error: 48.291812
|
||||
[12:03:45.349] New key frame
|
||||
[12:03:45.349] BA loop run
|
||||
[12:03:45.359] init error: 77.093405
|
||||
[12:03:45.371] end error: 45.229245
|
||||
[12:03:45.907] New key frame
|
||||
[12:03:45.907] BA loop run
|
||||
[12:03:45.918] init error: 52.638919
|
||||
[12:03:45.929] end error: 32.273172
|
||||
[12:03:46.446] New key frame
|
||||
[12:03:46.446] BA loop run
|
||||
[12:03:46.459] init error: 89.777557
|
||||
[12:03:46.474] end error: 61.190620
|
||||
[12:03:47.109] New key frame
|
||||
[12:03:47.109] BA loop run
|
||||
[12:03:47.126] init error: 97.152057
|
||||
[12:03:47.143] end error: 69.287463
|
||||
[12:03:47.816] New key frame
|
||||
[12:03:47.816] BA loop run
|
||||
[12:03:47.831] init error: 99.116283
|
||||
[12:03:47.845] end error: 66.357638
|
||||
[12:03:48.329] New key frame
|
||||
[12:03:48.329] BA loop run
|
||||
[12:03:48.343] init error: 99.484118
|
||||
[12:03:48.358] end error: 67.706517
|
||||
[12:03:49.068] New key frame
|
||||
[12:03:49.068] BA loop run
|
||||
[12:03:49.084] init error: 119.223442
|
||||
[12:03:49.099] end error: 73.552946
|
||||
[12:03:49.970] New key frame
|
||||
[12:03:49.970] BA loop run
|
||||
[12:03:49.986] init error: 106.027200
|
||||
[12:03:50.001] end error: 68.441734
|
||||
[12:03:51.711] New key frame
|
||||
[12:03:51.711] BA loop run
|
||||
[12:03:51.725] init error: 70.560324
|
||||
[12:03:51.736] end error: 57.569337
|
||||
[12:03:53.093] New key frame
|
||||
[12:03:53.094] BA loop run
|
||||
[12:03:53.116] init error: 103.350472
|
||||
[12:03:53.134] end error: 51.536080
|
||||
[12:03:54.627] New key frame
|
||||
[12:03:54.627] BA loop run
|
||||
[12:03:54.647] init error: 125.083965
|
||||
[12:03:54.665] end error: 64.421823
|
||||
[12:03:56.359] New key frame
|
||||
[12:03:56.359] BA loop run
|
||||
[12:03:56.380] init error: 130.588163
|
||||
[12:03:56.400] end error: 72.136725
|
||||
[12:03:58.040] New key frame
|
||||
[12:03:58.040] BA loop run
|
||||
[12:03:58.063] init error: 174.737917
|
||||
[12:03:58.084] end error: 92.886043
|
||||
[12:03:59.575] New key frame
|
||||
[12:03:59.575] BA loop run
|
||||
[12:03:59.597] init error: 143.136133
|
||||
[12:03:59.615] end error: 97.968820
|
||||
[12:04:01.123] New key frame
|
||||
[12:04:01.123] BA loop run
|
||||
[12:04:01.144] init error: 151.510506
|
||||
[12:04:01.166] end error: 102.378463
|
||||
[12:04:03.072] New key frame
|
||||
[12:04:03.072] BA loop run
|
||||
[12:04:03.095] init error: 155.979793
|
||||
[12:04:03.120] end error: 113.121948
|
||||
[12:04:04.754] New key frame
|
||||
[12:04:04.754] BA loop run
|
||||
[12:04:04.779] init error: 181.844751
|
||||
[12:04:04.801] end error: 133.088599
|
||||
[12:04:06.496] New key frame
|
||||
[12:04:06.496] BA loop run
|
||||
[12:04:06.528] init error: 202.141490
|
||||
[12:04:06.558] end error: 165.511598
|
||||
[12:04:08.474] New key frame
|
||||
[12:04:08.474] BA loop run
|
||||
[12:04:08.498] init error: 259.418164
|
||||
[12:04:08.520] end error: 206.366686
|
||||
[12:04:10.145] New key frame
|
||||
[12:04:10.146] BA loop run
|
||||
[12:04:10.169] init error: 259.091854
|
||||
[12:04:10.188] end error: 207.428913
|
||||
[12:04:12.348] New key frame
|
||||
[12:04:12.348] BA loop run
|
||||
[12:04:12.370] init error: 181.705955
|
||||
[12:04:12.386] end error: 166.767867
|
||||
[12:04:14.020] New key frame
|
||||
[12:04:14.020] BA loop run
|
||||
[12:04:14.044] init error: 214.785175
|
||||
[12:04:14.061] end error: 182.617615
|
||||
[12:04:19.641] New key frame
|
||||
[12:04:19.641] BA loop run
|
||||
[12:04:19.671] init error: 771.169429
|
||||
[12:04:19.686] end error: 395.558168
|
||||
[12:04:22.579] New key frame
|
||||
[12:04:22.579] BA loop run
|
||||
[12:04:22.609] init error: 1169.384753
|
||||
[12:04:22.628] end error: 404.458621
|
||||
[12:04:29.656] New key frame
|
||||
[12:04:29.656] BA loop run
|
||||
[12:04:29.684] init error: 591.965362
|
||||
[12:04:29.697] end error: 315.026841
|
||||
[12:04:32.758] New key frame
|
||||
[12:04:32.758] BA loop run
|
||||
[12:04:32.789] init error: 480.827370
|
||||
[12:04:32.804] end error: 366.377149
|
||||
[12:04:34.911] New key frame
|
||||
[12:04:34.911] BA loop run
|
||||
[12:04:34.946] init error: 549.858008
|
||||
[12:04:34.966] end error: 413.140415
|
||||
[12:04:36.688] New key frame
|
||||
[12:04:36.688] BA loop run
|
||||
[12:04:36.719] init error: 659.142107
|
||||
[12:04:36.736] end error: 458.711528
|
||||
[12:04:39.397] New key frame
|
||||
[12:04:39.397] BA loop run
|
||||
[12:04:39.427] init error: 671.995324
|
||||
[12:04:39.444] end error: 574.540631
|
||||
[12:04:41.789] New key frame
|
||||
[12:04:41.789] BA loop run
|
||||
[12:04:41.814] init error: 776.453923
|
||||
[12:04:41.828] end error: 768.396840
|
||||
[12:04:44.200] New key frame
|
||||
[12:04:44.200] BA loop run
|
||||
[12:04:44.223] init error: 626.692321
|
||||
[12:04:44.235] end error: 552.409475
|
||||
[12:04:46.599] New key frame
|
||||
[12:04:46.599] BA loop run
|
||||
[12:04:46.619] init error: 521.987400
|
||||
[12:04:46.630] end error: 466.837199
|
||||
[12:04:47.958] New key frame
|
||||
[12:04:47.958] BA loop run
|
||||
[12:04:47.980] init error: 455.683188
|
||||
[12:04:47.991] end error: 364.066169
|
||||
[12:04:49.604] New key frame
|
||||
[12:04:49.604] BA loop run
|
||||
[12:04:49.623] init error: 485.524351
|
||||
[12:04:49.632] end error: 411.181207
|
||||
[12:04:51.534] New key frame
|
||||
[12:04:51.535] BA loop run
|
||||
[12:04:51.549] init error: 228.858900
|
||||
[12:04:51.555] end error: 146.154664
|
||||
[12:04:53.142] New key frame
|
||||
[12:04:53.142] BA loop run
|
||||
[12:04:53.160] init error: 350.238517
|
||||
[12:04:53.168] end error: 267.636461
|
||||
[12:04:54.386] New key frame
|
||||
[12:04:54.386] BA loop run
|
||||
[12:04:54.405] init error: 457.128205
|
||||
[12:04:54.416] end error: 340.386048
|
||||
[12:05:05.589] New key frame
|
||||
[12:05:05.589] BA loop run
|
||||
[12:05:05.596] init error: 25.690490
|
||||
[12:05:05.597] end error: 9.485745
|
||||
[12:05:05.779] New key frame
|
||||
[12:05:05.779] BA loop run
|
||||
[12:05:05.785] init error: 87.741382
|
||||
[12:05:05.786] end error: 11.538819
|
||||
[12:05:05.973] New key frame
|
||||
[12:05:05.973] BA loop run
|
||||
[12:05:05.979] init error: 28.194039
|
||||
[12:05:05.979] end error: 2.489291
|
||||
[12:05:06.142] New key frame
|
||||
[12:05:06.142] BA loop run
|
||||
[12:05:06.147] init error: 9.138186
|
||||
[12:05:06.147] end error: 2.698424
|
||||
[12:05:06.312] New key frame
|
||||
[12:05:06.312] BA loop run
|
||||
[12:05:06.318] init error: 2.996002
|
||||
[12:05:06.319] end error: 2.624229
|
||||
[12:05:06.447] New key frame
|
||||
[12:05:06.447] BA loop run
|
||||
[12:05:06.453] init error: 13.122931
|
||||
[12:05:06.454] end error: 9.273583
|
||||
[12:05:06.575] New key frame
|
||||
[12:05:06.575] BA loop run
|
||||
[12:05:06.581] init error: 11.353129
|
||||
[12:05:06.582] end error: 9.504530
|
||||
[12:05:06.848] New key frame
|
||||
[12:05:06.848] BA loop run
|
||||
[12:05:06.853] init error: 3.687899
|
||||
[12:05:06.853] end error: 3.702094
|
||||
[12:05:07.103] New key frame
|
||||
[12:05:07.103] BA loop run
|
||||
[12:05:07.108] init error: 3.702785
|
||||
[12:05:07.108] end error: 3.702846
|
||||
[12:05:12.138] New key frame
|
||||
[12:05:12.138] BA loop run
|
||||
[12:05:12.143] init error: 6.161187
|
||||
[12:05:12.143] end error: 3.664383
|
||||
Executable
+1551
File diff suppressed because it is too large
Load Diff
@@ -86,7 +86,7 @@ namespace vio {
|
||||
{
|
||||
// New Keyframe Vertex
|
||||
(*it_kf)->v_kf_ = createG2oFrameSE3(*it_kf);
|
||||
for(auto&& it_ftr:(*it_kf)->fts_)
|
||||
for(auto& it_ftr:(*it_kf)->fts_)
|
||||
{
|
||||
if(it_ftr->point==NULL)continue;
|
||||
if(it_ftr->point->type_ != vio::Point::TYPE_GOOD)continue;
|
||||
@@ -119,36 +119,29 @@ namespace vio {
|
||||
g2o::CameraParameters* cam_params = new g2o::CameraParameters(1.0, Vector2d(0.,0.), 0.);
|
||||
cam_params->setId(0);
|
||||
if (!optimizer.addParameter(cam_params)) {
|
||||
assert(false);
|
||||
assert(false && "Camera initialization in BA");
|
||||
}
|
||||
// init g2o
|
||||
list< pair<FramePtr,std::shared_ptr<Feature>> > incorrect_edges;
|
||||
g2o::OptimizableGraph::VertexContainer points;
|
||||
auto end=map_.keyframes_.end();
|
||||
auto end_1=end--;
|
||||
for(auto it=map_.keyframes_.begin(); it!=map_.keyframes_.end();++it){
|
||||
optimizer.addVertex((*it)->v_kf_);
|
||||
for(auto&& p:(*it)->fts_){
|
||||
for(auto& p:(*it)->fts_){
|
||||
if(p->point == NULL)continue;
|
||||
if(p->point->v_pt_.first == NULL)continue;
|
||||
if(!p->point->v_pt_.second.empty()){
|
||||
if(p->point->v_pt_.second.size()>1){
|
||||
optimizer.addVertex(p->point->v_pt_.first);///TODO
|
||||
if(p->point->v_pt_.first->dimension() == 3)points.push_back(p->point->v_pt_.first);
|
||||
for(auto&& e:p->point->v_pt_.second)optimizer.addEdge(e);
|
||||
p->point->v_pt_.second.clear();
|
||||
}
|
||||
if(p->point->v_pt_.first == NULL || p->point->v_pt_.second.empty())continue;
|
||||
if(p->point->v_pt_.second.size()>1){
|
||||
optimizer.addVertex(p->point->v_pt_.first);///TODO
|
||||
points.push_back(p->point->v_pt_.first);
|
||||
for(auto&& e:p->point->v_pt_.second)optimizer.addEdge(e);
|
||||
p->point->v_pt_.second.clear();
|
||||
}
|
||||
}
|
||||
if(!(*it)->v_kf_->edges().empty()){
|
||||
if((*it)->v_kf_->edges().size()>1 && (*it)->v_kf_->dimension()==3)points.push_back((*it)->v_kf_);
|
||||
if(it == end_1-- || it ==end || it==map_.keyframes_.end()) (*it)->v_kf_->setFixed(false);
|
||||
}else{
|
||||
optimizer.removeVertex((*it)->v_kf_);
|
||||
}
|
||||
if(it == end_1-- || it ==end || it==map_.keyframes_.end()) (*it)->v_kf_->setFixed(false);
|
||||
if((*it)->v_kf_->dimension()==3)points.push_back((*it)->v_kf_);
|
||||
}
|
||||
// Optimization
|
||||
if(points.empty()){
|
||||
if(points.empty() || optimizer.vertices().empty()){
|
||||
optimizer.clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user