Skip to content

Commit

Permalink
Fixed clearing of laserCloudOri and coeffSel
Browse files Browse the repository at this point in the history
laserCloudOri and coeffSel, which are used to build the jacobian,
should be cleared at the start of every iteration, not just once per
round of odometry.
  • Loading branch information
haoala committed Aug 13, 2016
1 parent 9c0bdc5 commit 402b42e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/laserOdometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ int main(int argc, char** argv)
continue;
}

laserCloudOri->clear();
coeffSel->clear();

transform[3] -= imuVeloFromStartX * scanPeriod;
transform[4] -= imuVeloFromStartY * scanPeriod;
transform[5] -= imuVeloFromStartZ * scanPeriod;
Expand All @@ -468,6 +465,9 @@ int main(int argc, char** argv)
int cornerPointsSharpNum = cornerPointsSharp->points.size();
int surfPointsFlatNum = surfPointsFlat->points.size();
for (int iterCount = 0; iterCount < 25; iterCount++) {
laserCloudOri->clear();
coeffSel->clear();

for (int i = 0; i < cornerPointsSharpNum; i++) {
TransformToStart(&cornerPointsSharp->points[i], &pointSel);

Expand Down

0 comments on commit 402b42e

Please sign in to comment.