To reply to my own question, here is an example(pointCloud is already an astra::PointFrame):
pcl::PointCloud<pcl::PointXYZ>::Ptr pclCloud(new pcl::PointCloud<pcl::PointXYZ>);
for (int i = 0; i < pointCloud.length(); i++) {
const astra::Vector3f* data = pointCloud.data() + i;
pcl::PointXYZ p = pcl::PointXYZ(data->x / 1000.0f, data->y / 1000.0f, data->z / 1000.0f);
pclCloud->points.push_back(p);
}
For another question, does anyone know why with pointstream we have less points than using openni2 to open the cameras? For instance, with astra sdk, my pointstream is 256.000 total points, with openni2(from pcl), 307.200...