Does transforming a pointcloud message from one frame to another result in the change of frame id of the transformed message?
ROS Enthusiasts
While working with transforming different pointcloud data from one frame to another I observed that the frame id of the final transformed message remains the same as that of the parent message. It just fomented my curious as the final frame id should have been changed to the frame id of the transformed frame. Is my understanding correct about the transformations ?
The way I am observing the transformed message is by publishing the new message as a pointcloud data. When we echo the topic, the metadata related to the frame id is still the same.
I think you need to tell us exactly "how" you do the transformation... In general, I'd agree that when transforming data from one frame to the other, the frame_id should be changed.
The way I am doing is listening to the transform with the help of a tf::TransformListener object and then transform the pointcloud using the pcl_ros library. In short the code is given below:
"base_link" is my target frame and "base_radar_link" is the sensor frame. and then
where temp_cloud is the source of the type point cloud and cloud_transformed is the final transformed data of the type point cloud. I will be transforming cloud_transformed message to pointcloud2 sensor data type as that is what I am interested in. Hope it is clear