ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Finding buffered frames in tf2_ros::Buffer (c++)

asked 2019-05-30 10:31:02 -0600

kkrasnosky gravatar image

updated 2019-05-30 18:57:11 -0600

I am creating a post-processing utility where I read all the transforms from a .bag file into a tf2_ros::Buffer.

I would like to be able to ask the Buffer for all the frames it has cached. I don't see any public member functions in the doccumentation that allow you to view cached frames.

What is the best way to access cached all the frames in a tf2_ros::Buffer?

edit retag flag offensive close merge delete

Comments

I don't believe there is any support for that, but let's see if someone proves me wrong.


Edit: appears there are BufferCore::allFramesAsYAML() and BufferCore::_getFrameStrings(..). Would those suffice for what you are doing?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-30 13:57:04 -0600 )edit

BufferCore::allFramesAsYAML() will probably do the trick. I will report my findings after I do some more testing.

kkrasnosky gravatar image kkrasnosky  ( 2019-05-30 18:58:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-30 17:25:22 -0600

tfoote gravatar image

There are two methods for introspecting the state of the bufffer.

allFramesAsString() and allFramesAsYaml(double)

edit flag offensive delete link more

Comments

How do you use them practically? Im trying all sorts of things to cout<< but not working!

TGO gravatar image TGO  ( 2022-08-03 06:47:39 -0600 )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

2 followers

Stats

Asked: 2019-05-30 10:31:02 -0600

Seen: 154 times

Last updated: May 30 '19