Skip to content

Commit

Permalink
Merge pull request #5969 from mvieth/ndt_gettargetcells
Browse files Browse the repository at this point in the history
NDT: allow access to target cloud distribution
  • Loading branch information
mvieth committed Feb 27, 2024
2 parents 18fe557 + 24e244f commit cd17380
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions registration/include/pcl/registration/ndt.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@ class NormalDistributionsTransform
return nr_iterations_;
}

/** \brief Get access to the `VoxelGridCovariance` generated from target cloud
* containing point means and covariances. Set the input target cloud before calling
* this. Useful for debugging, e.g.
* \code
* pcl::PointCloud<PointXYZ> visualize_cloud;
* ndt.getTargetCells().getDisplayCloud(visualize_cloud);
* \endcode
*/
inline const TargetGrid&
getTargetCells() const
{
return target_cells_;
}

/** \brief Convert 6 element transformation vector to affine transformation.
* \param[in] x transformation vector of the form [x, y, z, roll, pitch, yaw]
* \param[out] trans affine transform corresponding to given transformation
Expand Down Expand Up @@ -292,6 +306,10 @@ class NormalDistributionsTransform
target_cells_.setInputCloud(target_);
// Initiate voxel structure.
target_cells_.filter(true);
PCL_DEBUG("[pcl::%s::init] Computed voxel structure, got %zu voxels with valid "
"normal distributions.\n",
getClassName().c_str(),
target_cells_.getCentroids()->size());
}

/** \brief Compute derivatives of likelihood function w.r.t. the
Expand Down

0 comments on commit cd17380

Please sign in to comment.