ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

[SOLVED] pcl_ros: how to find cloud frame

asked 2014-08-21 10:54:56 -0500

madmage gravatar image

updated 2014-08-22 09:21:55 -0500

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::PointCloud<pcl::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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2014-08-21 11:34:51 -0500

paulbovbel gravatar image

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

edit flag offensive delete link more

Comments

thanks, I was thinking I had a pcl::PointCloud<pcl::pointxyzrgb> from the PCL library, not a message from ROS (with a header) with the same classname

madmage gravatar image madmage  ( 2014-08-22 05:34:04 -0500 )edit
2

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.

paulbovbel gravatar image paulbovbel  ( 2014-08-22 08:08:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-21 10:54:56 -0500

Seen: 2,240 times

Last updated: Aug 22 '14