Skip to content

Commit

Permalink
Update laserPosegraphOptimization.cpp
Browse files Browse the repository at this point in the history
error fixed in loopFindNearKeyframesCloud
  • Loading branch information
Giseop Kim authored Sep 23, 2021
1 parent a8b724a commit 7ee4ac9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SC-PGO/src/laserPosegraphOptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ void loopFindNearKeyframesCloud( pcl::PointCloud<PointType>::Ptr& nearKeyframes,
// extract and stacking near keyframes (in global coord)
nearKeyframes->clear();
for (int i = -submap_size; i <= submap_size; ++i) {
int keyNear = root_idx + i;
int keyNear = key + i;
if (keyNear < 0 || keyNear >= int(keyframeLaserClouds.size()) )
continue;

mKF.lock();
*nearKeyframes += * local2global(keyframeLaserClouds[keyNear], keyframePosesUpdated[keyNear]);
*nearKeyframes += * local2global(keyframeLaserClouds[keyNear], keyframePosesUpdated[root_idx]);
mKF.unlock();
}

Expand Down Expand Up @@ -828,4 +828,4 @@ int main(int argc, char **argv)
ros::spin();

return 0;
}
}

0 comments on commit 7ee4ac9

Please sign in to comment.