diff --git a/examples/SolverComparer.cpp b/examples/SolverComparer.cpp index 19281ce0f..2ee464dda 100644 --- a/examples/SolverComparer.cpp +++ b/examples/SolverComparer.cpp @@ -276,7 +276,7 @@ void runIncremental() } } } else { - if(!newVariables.exists(measurement->key1())) { // Only need to check newVariables since loop closures come after odometry + if(!newVariables.exists(measurement->key2())) { // Only need to check newVariables since loop closures come after odometry if(step == 1) newVariables.insert(measurement->key2(), measurement->measured()); else {