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

Revision history [back]

So, this is not actually a bug.

The Transform object that you feed to ::transformPointCloud actually doesn't have any header information attached (not a StampedTransform).

cloud_out is overwritten by cloud_in, header and all, and then the data is transformed. This is a little counter-intuitive and probably warrants a documentation update. However, these types of functions are everywhere in ROS - the _out parameter passed in by reference is pretty much just a placeholder for allocation, and not expected to contain any useful data.

Anyways, the function call you're actually looking for is http://docs.ros.org/indigo/api/pcl_ros/html/namespacepcl__ros.html#aad1ce4ad90ab784aae6158419ad54d5f, where you supply the target frame and a listener. That call will actually chain to the one you're using, and update the header after the transformation is applied.

So, this is not actually a bug.

The Transform object that you feed to ::transformPointCloud actually doesn't have any header information attached (not a StampedTransform).

cloud_out is overwritten by cloud_in, header and all, and then the data is transformed. This is a little counter-intuitive and probably warrants a documentation update. However, these types of functions are everywhere in ROS - the _out parameter passed in by reference is pretty much just a placeholder for allocation, and not expected to contain any useful data.data. These types of functions are everywhere in tf. The Transform object that you feed to ::transformPointCloud actually doesn't have any header information attached (not a StampedTransform), so this function is not expected to be doing anything useful with headers, it simply applies the transform to cloud_in, and overwrites cloud_out.

Anyways, the function call you're actually looking for is http://docs.ros.org/indigo/api/pcl_ros/html/namespacepcl__ros.html#aad1ce4ad90ab784aae6158419ad54d5f, where you supply the target frame and a listener. That call will actually chain to the one you're using, and update the header after the transformation is applied.