Skip to content
Snippets Groups Projects
Commit 1ccfdecb authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Remove redundant code

parent 7ef323a4
No related branches found
No related tags found
1 merge request!41Draft: Resolve "New branch laser 3d"
......@@ -60,17 +60,9 @@ inline void pairAlign(const pcl::PointCloud<pcl::PointXYZ>::Ptr _cloud_ref,
auto start = std::chrono::high_resolution_clock::now();
// DURATION --------------------------------------------------------
// Internal PointCloud pointers (boost::shared_ptr)
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_ref = pcl::make_shared<pcl::PointCloud<pcl::PointXYZ>>();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_other = pcl::make_shared<pcl::PointCloud<pcl::PointXYZ>>();
// Point clouds are considered already downsampled
*cloud_ref = *_cloud_ref;
*cloud_other = *_cloud_other;
// Set input clouds
_registration_solver->setInputSource(cloud_ref);
_registration_solver->setInputTarget(cloud_other);
_registration_solver->setInputSource(_cloud_ref);
_registration_solver->setInputTarget(_cloud_other);
// Declare variables
Eigen::Matrix4f transform_pcl;
......@@ -79,7 +71,8 @@ inline void pairAlign(const pcl::PointCloud<pcl::PointXYZ>::Ptr _cloud_ref,
Eigen::Matrix4f transform_guess = _transform_guess.matrix().cast<float>();
// Alignment
_registration_solver->align(*cloud_ref, transform_guess);
pcl::PointCloud<pcl::PointXYZ>cloud_out;
_registration_solver->align(cloud_out, transform_guess);
transform_pcl = _registration_solver->getFinalTransformation();
// Output the transformation as Isometry of double(s)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment