Hi All, I can't for the life of me, figure what is going wrong. Perhaps, I do not know the structure of PointCloud very well yet but I keep getting a segfault at the last line in "reg.align". I would like to fill in the point cloud with a buffer of floats/doubles and then run ICP on the two cloud points. Is this the right way to do it? It seems to work if I use PCD files but not when I manually input data like below. Hope someone can help. // Fill in the model cloud data model.width = modelN; model.height = 1; model.is_dense = false; model.points.resize (model.width * model.height); for (size_t i = 0; i < model.points.size (); i++) { model.points[i].x = (float)modelPointsT[3*i + 0]; model.points[i].y = (float)modelPointsT[3*i + 1]; model.points[i].z = (float)modelPointsT[3*i + 2]; } // Fill in the model cloud data data.width = dataN; data.height = 1; data.is_dense = false; data.points.resize (data.width * data.height); for (size_t i = 0; i < data.points.size (); i++) { data.points[i].x = (float)dataPointsT[3*i + 0] + 5; data.points[i].y = (float)dataPointsT[3*i + 1]; data.points[i].z = (float)dataPointsT[3*i + 2]; } pcl::PointCloud output; pcl::IterativeClosestPointNonLinear reg; reg.setMaxCorrespondenceDistance (0.1); reg.setTransformationEpsilon (1e-6); reg.setMaximumIterations (50); reg.setInputCloud(boost::make_shared > (data)); reg.setInputTarget(boost::make_shared > (model)); Eigen3::Matrix4f transform; //reg.computeTransformation(output); //reg.estimateRigidTransformationLM(data,model,transform); printf("Done\n"); reg.align(output); -- View this message in context: http://ros-users.122217.n3.nabble.com/ICP-PCL-with-foreign-data-tp2066643p2066643.html Sent from the ROS-Users mailing list archive at Nabble.com.