Ask Your Question

record rosrun tf tf_echo /map /base_link

asked 2014-08-07 09:34:25 -0500

Orso gravatar image

I run tf tf_echo /map /base_link and compute exact data needed:

At time 1407419581.729
- Translation: [-8.999, -22.000, 0.000]
- Rotation: in Quaternion [-0.000, 0.000, 0.850. 0.526]
                 in RPY [0.000. -0.000, 2.034]

Is there a way to record this streaming data with rosbag record?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-07 09:46:24 -0500

lucaluca gravatar image

I don't know if this is the best approach, but it should work. I would write a node that publishes the transformations between /map and /base_link. In order to get the transformation you should use "lookupTransform" as you can see here:

As you can see, the transformation can be published to a topic of your choice. Whatever it is, you can then use this command in order to record it:

rosbag record -O subset /chosentopic
edit flag offensive delete link more


Thanks, I thought this may be the case. Though, I hoped I may already record this data since it is already streaming in when I run: tf tf_echo /map /base_link

Orso gravatar image Orso  ( 2014-08-07 09:57:01 -0500 )edit

@Orso since the help file of rosbag record says "Record a bag file with the contents of specified topics" and it seems there's not a topic with your data, I'm assuming this cannot be done directly. You can wait to see if some other user knows a direct approach :)

lucaluca gravatar image lucaluca  ( 2014-08-07 10:08:23 -0500 )edit

A tf listener is required to record a transformation of a coordinate frame from tf to a bag file. No way around it that I could find. Thanks for the direction lucaluca.

Orso gravatar image Orso  ( 2014-08-07 20:47:41 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2014-08-07 09:34:25 -0500

Seen: 1,292 times

Last updated: Aug 07 '14