0
$\begingroup$

Rosanswers logo

Dear all, I am using pcl_ros package, with pcl 1.6 and ROS groovy. I am subscribing to a PointCloud2 topic, using a callback like this:

void MainWindow::xtionCloudCallback(const pcl::PointCloudpcl::PointXYZRGB::ConstPtr& cloud)

is it possible to get the cloud frame? if I transform the cloud using a TransformListener tf, e.g.:

pcl_ros::transformPointCloud("/map", *cloud, *tcloud, tf);

this function is able to retrieve the cloud frame in some way, how do I get it?


Originally posted by madmage on ROS Answers with karma: 293 on 2014-08-21

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Any stamped (i.e. containing timing/transform info) message will have a header (e.g. PointCloud) that contains the relevant timestamp and frame id.

cloud->header.frame_id


Originally posted by paulbovbel with karma: 4518 on 2014-08-21

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by madmage on 2014-08-22:
thanks, I was thinking I had a pcl::PointCloudpcl::PointXYZRGB from the PCL library, not a message from ROS (with a header) with the same classname

Comment by paulbovbel on 2014-08-22:
pcl::PointCloud<> has a header with stamp and frame_id as well, however those are not compatible the ROS message format, so you have to use the converter utilities in pcl_ros.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.