#ifndef FAST_GICP_NDT_CUDA_HPP #define FAST_GICP_NDT_CUDA_HPP #include #include #include #include #include #include #include #include #include namespace fast_gicp { namespace cuda { class NDTCudaCore; } template class NDTCuda : public LsqRegistration { public: using Scalar = float; using Matrix4 = typename pcl::Registration::Matrix4; using PointCloudSource = typename pcl::Registration::PointCloudSource; using PointCloudSourcePtr = typename PointCloudSource::Ptr; using PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr; using PointCloudTarget = typename pcl::Registration::PointCloudTarget; using PointCloudTargetPtr = typename PointCloudTarget::Ptr; using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr; protected: using pcl::Registration::reg_name_; using pcl::Registration::input_; using pcl::Registration::target_; using pcl::Registration::corr_dist_threshold_; public: NDTCuda(); virtual ~NDTCuda() override; void setDistanceMode(NDTDistanceMode mode); void setResolution(double resolution); void setNeighborSearchMethod(NeighborSearchMethod method, double radius = -1.0); virtual void swapSourceAndTarget() override; virtual void clearSource() override; virtual void clearTarget() override; virtual void setInputSource(const PointCloudSourceConstPtr& cloud) override; virtual void setInputTarget(const PointCloudTargetConstPtr& cloud) override; protected: virtual void computeTransformation(PointCloudSource& output, const Matrix4& guess) override; virtual double linearize(const Eigen::Isometry3d& trans, Eigen::Matrix* H, Eigen::Matrix* b) override; virtual double compute_error(const Eigen::Isometry3d& trans) override; protected: std::unique_ptr ndt_cuda_; }; } // namespace fast_gicp #endif