ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

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

kkrasnosky gravatar image

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

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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 263 times

Last updated: May 30 '19