Skip to content

Commit

Permalink
Merge pull request #339 from hdiethelm/hasconverged_fix
Browse files Browse the repository at this point in the history
Fix hasConverged() for pcl::SampleConsensusInitialAlignment
  • Loading branch information
jspricke committed Oct 28, 2013
2 parents 121498d + ea84a6d commit 8e5cab2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions registration/include/pcl/registration/ia_ransac.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace pcl
using Registration<PointSource, PointTarget>::max_iterations_;
using Registration<PointSource, PointTarget>::tree_;
using Registration<PointSource, PointTarget>::transformation_estimation_;
using Registration<PointSource, PointTarget>::converged_;
using Registration<PointSource, PointTarget>::getClassName;

typedef typename Registration<PointSource, PointTarget>::PointCloudSource PointCloudSource;
Expand Down
2 changes: 2 additions & 0 deletions registration/include/pcl/registration/impl/ia_ransac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ pcl::SampleConsensusInitialAlignment<PointSource, PointTarget, FeatureT>::comput

final_transformation_ = guess;
int i_iter = 0;
converged_ = false;
if (!guess.isApprox (Eigen::Matrix4f::Identity (), 0.01f))
{
// If guess is not the Identity matrix we check it.
Expand Down Expand Up @@ -243,6 +244,7 @@ pcl::SampleConsensusInitialAlignment<PointSource, PointTarget, FeatureT>::comput
{
lowest_error = error;
final_transformation_ = transformation_;
converged_=true;
}
}

Expand Down

0 comments on commit 8e5cab2

Please sign in to comment.