0
$\begingroup$

Rosanswers logo

Suppose I have a ROS node in python, representing some robot moving around in the world. I would like to use lookup_transform() to get the transform from my local robot coordinates to world coordinates. In order to do this, I need to pass the "target_frame" parameter as the first parameter to lookup_transform. The problem is that I don't know what the name of this frame is. For example, suppose I have written some code that listens to a rosbag file that I play using rosbag play. That bag is sending out various messages, like tf2 messages, and there are various frames embedded in these messages. One of these frames is the world coordinate system, and it has some unknown name that the bag writer has given it. How can I find that name? Or is there some other way to specify whatever "world" frame the robot moves around in?


Originally posted by westofpluto on ROS Answers with karma: 16 on 2017-04-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There are some command line tools in the tf package that are useful in this sort of situation.

http://wiki.ros.org/tf#Command-line_Tools

You can use the view_frames tool to generate a PDF that displays the tree of your frames. That will tell you which frame is the root.

You can also use rviz. Open rviz, add a TF visualisation, and play the data from your bag file. The frames will be displayed in the visualisation (make sure to choose a fixed frame in the global options), and you can also view the tree in the TF options on the left.


Originally posted by Geoff with karma: 4203 on 2017-04-19

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.