0
$\begingroup$

Rosanswers logo

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.

Originally posted by jrvanwhy on ROS Answers with karma: 11 on 2012-12-23

Post score: 0


Original comments

Comment by jrvanwhy on 2012-12-24:
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).

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Lorenz with karma: 22731 on 2012-12-23

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.