Skip to content

Commit 7ee4ac9

Browse files
author
Giseop Kim
authored
Update laserPosegraphOptimization.cpp
error fixed in loopFindNearKeyframesCloud
1 parent a8b724a commit 7ee4ac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SC-PGO/src/laserPosegraphOptimization.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ void loopFindNearKeyframesCloud( pcl::PointCloud<PointType>::Ptr& nearKeyframes,
404404
// extract and stacking near keyframes (in global coord)
405405
nearKeyframes->clear();
406406
for (int i = -submap_size; i <= submap_size; ++i) {
407-
int keyNear = root_idx + i;
407+
int keyNear = key + i;
408408
if (keyNear < 0 || keyNear >= int(keyframeLaserClouds.size()) )
409409
continue;
410410

411411
mKF.lock();
412-
*nearKeyframes += * local2global(keyframeLaserClouds[keyNear], keyframePosesUpdated[keyNear]);
412+
*nearKeyframes += * local2global(keyframeLaserClouds[keyNear], keyframePosesUpdated[root_idx]);
413413
mKF.unlock();
414414
}
415415

@@ -828,4 +828,4 @@ int main(int argc, char **argv)
828828
ros::spin();
829829

830830
return 0;
831-
}
831+
}

0 commit comments

Comments
 (0)