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 imagegvdhoorn ( 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 imagekkrasnosky ( 2019-05-30 18:58:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Seen: 41 times

Last updated: May 30