Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion io/include/pcl/io/impl/vtk_lib_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pcl::io::vtkPolyDataToPointCloud (vtkPolyData* const polydata, pcl::PointCloud<P
{
for (std::size_t i = 0; i < cloud.size (); ++i)
{
float normal[3];
float normal[3] = {0.0f, 0.0f, 0.0f};
normals->GetTupleValue (i, normal);
pcl::setFieldValue<PointT, float> (cloud[i], normal_x_idx, normal[0]);
pcl::setFieldValue<PointT, float> (cloud[i], normal_y_idx, normal[1]);
Expand Down
3 changes: 2 additions & 1 deletion recognition/src/ransac_based/obj_rec_ransac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ pcl::recognition::ObjRecRANSAC::groupHypotheses(std::list<HypothesisBase>& hypot
#endif

// Compute the bounds for the positional discretization
float b[6]; scene_octree_.getBounds (b);
float b[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
scene_octree_.getBounds (b);
float enlr = scene_bounds_enlargement_factor_*std::max (std::max (b[1]-b[0], b[3]-b[2]), b[5]-b[4]);
b[0] -= enlr; b[1] += enlr;
b[2] -= enlr; b[3] += enlr;
Expand Down
9 changes: 9 additions & 0 deletions registration/include/pcl/registration/impl/ndt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ NormalDistributionsTransform<PointSource, PointTarget, Scalar>::computeTransform
// 2009]
Eigen::JacobiSVD<Eigen::Matrix<double, 6, 6>> sv(
hessian, Eigen::ComputeFullU | Eigen::ComputeFullV);
#if EIGEN_VERSION_AT_LEAST(3, 4, 0)
if (sv.info() != Eigen::ComputationInfo::Success) {
trans_likelihood_ = score / static_cast<double>(input_->size());
converged_ = 0;
PCL_ERROR("[%s::computeTransformation] JacobiSVD on hessian failed!\n",
getClassName().c_str());
return;
}
#endif
// Negative for maximization as opposed to minimization
Eigen::Matrix<double, 6, 1> delta = sv.solve(-score_gradient);

Expand Down