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

Revision history [back]

click to hide/show revision 1
initial version

For the question, First you need to transform from one source frame to target frame using the available functions. For example if you are working with pointcloud data then the function would be something like below:

tf::StampedTransform transform;
try{
        transform_listener.lookupTransform(target frame as a string, source frame as a string, ros::Time(0), transform);
    }
    catch (tf::TransformException ex){
        ROS_ERROR("%s",ex.what());
    } 

pcl_ros::transformPointCloud(message_without_transformed, final_transformed_message, transform);

The you need to change the frame if of the transformed message which is final_transformed_message.header.frame_id = "your required name"

Hope that helps and I am not too late!!