Ask Your Question

tf listener/broadcaster

asked 2011-11-22 14:12:45 -0500

robjime gravatar image


I'm looking for a way to transform coordinates from one from to another, but without setting up a broadcaster and listener. Is there a way to just call the transform function?

Or if I need the listener/broadcaster:

The tutorial I found in the ros wiki ( has coordinates being returned to the screen every second. I was looking for a way to do this one shot. But I am getting errors. When I set the one shot flag to true:

ros::Timer timer = n.createTimer(ros::Duration(1.0), boost::bind(&transformPoint, boost::ref(listener)),true)

(without a ros spin because I don't want the program to live forever) it returns a warning "Timer destroyed immediately after creation. Did you forget to store the handle?"

When I try calling the function by itself

boost::bind(&transformPoint, boost::ref(listener))

nothing happens.

And when I try to pass the listener

transformPoint(boost::ref(listener)) or transformPoint(listener)

it returns an error saying base_link doesn't exist.

Thanks for the help in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-22 18:50:29 -0500

You can use tf::Transform directly (see tf/Overview/Data Types), it is just a btTransform from the bullet library.

For instance, if you want to transform a single point, you can use the ()-operator:

tf::Point original_point = /*...*/;
tf::Transform transform = /*...*/;
tf::Point transformed_point = transform(original_point);
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-11-22 14:12:45 -0500

Seen: 413 times

Last updated: Nov 22 '11