How to get the separate value from the data of pcl::pointxyz ?
I can get the result (x,y,z) through the at function of pcl::PointCloud<pcl::pointxyz>,but I don't know how to get the separate value of x,y,z since my IDE can't go to the definition and I haven't seen related explanation.
std::cout << "x" << u << std::endl;
std::cout << "y" << v << std::endl;
int pcl_index;
//std::cout << "msg_height = " << point_cloud_msg->height << std::endl;
pcl::PointCloud<pcl::PointXYZ> point_pcl;
pcl::fromROSMsg(*point_cloud_msg, point_pcl);
pcl_index = (v*640) + u;
//std::cout<< "pcl_index" << pcl_index <<std::endl;
std::cout << "(x,y,z) = " << point_pcl.at(pcl_index) << std::endl;
@七小丘人 you closed this question marking it as a right answer was chose, but you didn't mark @Dyson sphere's answer as correct. If it answered your question, can you please mark it as correct?