How to record transformation

asked 2019-09-30 08:23:08 -0500

lolito gravatar image

updated 2019-10-10 11:03:17 -0500

mjcarroll gravatar image

Hi guys, I'm newbie to the ROS world and I want to understand more than what I've understood until now. Is there any command that let me record what the command:

rosrun tf tf_echo /target_fr /reference_fr

print in the terminal window? So to collect for each frame the tranformation between the two frames??

edit retag flag offensive close merge delete



You can do something like rosrun tf tf_echo /target_fr /reference_fr >> tf.txt . This is a linux feature though. If you can tell what you intend to do with it maybe people can help you in that specific regard.

Choco93 gravatar image Choco93  ( 2019-09-30 09:03:02 -0500 )edit

Thanks Choco93, in LeGO-LOAM i want to understand each one of the reference frame of the system to build up a scheme. In particular i want to save the transformations as a bag file in order to process it with matlab

lolito gravatar image lolito  ( 2019-09-30 09:50:24 -0500 )edit

Would recording the /tf and /tf_static topics into a bag file be sufficient for what you are trying to do?

jarvisschultz gravatar image jarvisschultz  ( 2019-09-30 09:54:26 -0500 )edit

jarvisschultz why do i have to collect /tf_static? I mean using echo for that topic nothing is shown in the shell. I can try to collect all message from /tf. Then i can process them into Matlab??

lolito gravatar image lolito  ( 2019-09-30 10:01:45 -0500 )edit

If you have any static transform publishers, they publish on the /tf_static topic. If you'd like to be able to reconstruct your whole tf tree in MATLAB from a bag file, and you have static transforms, then you would need to record both the /tf and the /tf_static topics.

jarvisschultz gravatar image jarvisschultz  ( 2019-09-30 10:17:48 -0500 )edit