Commit ea067a5 1 parent 1236fa7 commit ea067a5 Copy full SHA for ea067a5
File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -746,6 +746,12 @@ -(void)process
746
746
if (vins.Headers [i] == vins.front_pose .header )
747
747
{
748
748
KeyFrame* cur_kf = keyframe_database.getKeyframe (vins.front_pose .cur_index );
749
+ if (abs (vins.front_pose .relative_yaw ) > 30.0 || vins.front_pose .relative_t .norm () > 10.0 )
750
+ {
751
+ printf (" Wrong loop\n " );
752
+ cur_kf->removeLoop ();
753
+ break ;
754
+ }
749
755
cur_kf->updateLoopConnection (vins.front_pose .relative_t ,
750
756
vins.front_pose .relative_q ,
751
757
vins.front_pose .relative_yaw );
Original file line number Diff line number Diff line change @@ -359,6 +359,11 @@ void KeyFrame::detectLoop(int index)
359
359
loop_index = index ;
360
360
}
361
361
362
+ void KeyFrame::removeLoop ()
363
+ {
364
+ has_loop = false ;
365
+ }
366
+
362
367
int KeyFrame::HammingDis (const BRIEF::bitset &a, const BRIEF::bitset &b)
363
368
{
364
369
BRIEF::bitset xor_of_bitset = a ^ b;
Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ class KeyFrame
86
86
87
87
void detectLoop (int index);
88
88
89
+ void removeLoop ();
90
+
89
91
int HammingDis (const BRIEF::bitset &a, const BRIEF::bitset &b);
90
92
91
93
// data
You can’t perform that action at this time.
0 commit comments