About tf header names [closed]

asked 2014-09-04 09:23:01 -0500

choog gravatar image

updated 2014-09-08 21:05:29 -0500

Hello,

I am using a foreign relay to pass a /tf topic over to another machine on the same network as such:

rosrun foreign_relay foreign_relay adv http://ip_address:11311 /tf /leader/tf

I am able to receive the information fine, I used rostopic echo to make sure everything is passed through correctly and it is, so this is not a communication error.

However, I want to take this /leader/tf topic and read the "/leader/base_link" topic as such. I get an ROS_ERROR saying that the frame with id "/leader/base_link" does not exists, then from analyzing /leader/tf topic with rostopic echo. I can see that the frame headers have not been renamed to /leader/tf_frame, with tf_frame being any tf_frame such as "base_link", "odom", "map", ... etcetera.

This is the basic code that I am using to get the tf transform and this is where I get the ROS_ERROR.

try {
    listener.waitForTransform("base_link", "leader/base_link", ros::Time(0), ros::Duration(10.0));
    listener.lookupTransform("base_link", "leader/base_link", ros::Time(0), transform);
        }
        catch (tf::TransformException &ex) {
            ROS_ERROR("%s",ex.what());
        }

If anyone knows how to rename the /leader/tf topic so that I can read the "leader/base_link" frame as such I would greatly appreciate it. Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2020-02-04 16:15:33.322276