Ask Your Question
0

ROSBag C++ API -- reading message Header

asked 2012-12-23 07:02:24 -0500

jrvanwhy gravatar image

updated 2014-01-28 17:14:39 -0500

ngrennan gravatar image

I am writing a C++ (*) program that reads in a bagfile, and needs to be able to access a message's header timestamp (not the one rosbag records itself), if it has one.

How can I do this using ROSBag's API?

  • I'm rewriting an existing Python script that's really slow.
edit retag flag offensive close merge delete

Comments

Thank you, Lorenz -- I was afraid that that was the answer. (I couldn't find the button to comment on an answer, so I'm doing it here).

jrvanwhy gravatar imagejrvanwhy ( 2012-12-24 06:17:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-12-23 21:43:00 -0500

Lorenz gravatar image

You can do that only if you know the type of the messages at compilation time. In that case, you can use the instantiate method of the class MessageInstance.

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

1 follower

Stats

Asked: 2012-12-23 07:02:24 -0500

Seen: 747 times

Last updated: Dec 23 '12