61#include "pcl/registration/registration.h"
62#include "unsupported/Eigen/NonLinearOptimization"
69namespace localization {
72template <
typename Po
intSource,
typename Po
intTarget>
91 typedef pcl::search::KdTree<PointTarget>
KdTree;
92 typedef typename pcl::search::KdTree<PointTarget>::Ptr
KdTreePtr;
96 typedef boost::shared_ptr<
99 typedef boost::shared_ptr<
115 if (cell_leaf.empty()) {
116 AWARN <<
"Input leaf is empty.";
119 if (cloud->points.empty()) {
120 AWARN <<
"Input target is empty.";
132 if (cloud->points.empty()) {
133 AWARN <<
"Input source is empty.";
200 Eigen::Affine3f *trans) {
201 *trans = Eigen::Translation<float, 3>(
static_cast<float>(x(0)),
202 static_cast<float>(x(1)),
203 static_cast<float>(x(2))) *
204 Eigen::AngleAxis<float>(
static_cast<float>(x(3)),
205 Eigen::Vector3f::UnitX()) *
206 Eigen::AngleAxis<float>(
static_cast<float>(x(4)),
207 Eigen::Vector3f::UnitY()) *
208 Eigen::AngleAxis<float>(
static_cast<float>(x(5)),
209 Eigen::Vector3f::UnitZ());
214 Eigen::Matrix4f *trans) {
215 Eigen::Affine3f _affine;
217 *trans = _affine.matrix();
247 const Eigen::Matrix4f &guess);
252 Eigen::Matrix<double, 6, 6> *hessian,
254 Eigen::Matrix<double, 6, 1> *p,
260 Eigen::Matrix<double, 6, 6> *hessian,
261 const Eigen::Vector3d &x_trans,
262 const Eigen::Matrix3d &c_inv,
277 Eigen::Matrix<double, 6, 1> *p);
282 const Eigen::Vector3d &x_trans,
283 const Eigen::Matrix3d &c_inv);
288 Eigen::Matrix<double, 6, 1> *step_dir,
289 double step_init,
double step_max,
double step_min,
291 Eigen::Matrix<double, 6, 1> *score_gradient,
292 Eigen::Matrix<double, 6, 6> *hessian,
297 double *f_u,
double *g_u,
double a_t,
double f_t,
302 double f_u,
double g_u,
double a_t,
double f_t,
308 double g_0,
double mu = 1.e-4) {
309 return (f_a - f_0 - mu * g_0 * a);
316 return (g_a - mu * g_0);
374 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
381#include "modules/localization/ndt/ndt_locator/ndt_solver.hpp"
A searchable voxel structure containing the mean and covariance of the data.
void SetMapLeftTopCorner(const Eigen::Vector3d &left_top_corner)
void SetInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
void SetVoxelGridResolution(float lx, float ly, float lz)
void filter(const std::vector< Leaf > &cell_leaf, bool searchable=true)
Initializes voxel structure.
void GetDisplayCloud(pcl::PointCloud< pcl::PointXYZ > *cell_cloud)
Simple structure to hold a centroid, covarince and the number of points in a leaf.