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

How do I parse rostopics from a ros bag in C++?

asked 2016-12-10 16:32:57 -0600

Joy16 gravatar image

updated 2016-12-10 17:49:45 -0600

I want to write a node that would parse a ros topic given as the input argument and display the message published by it. Can you please give me leads to point to existing examples that I could look into?

edit retag flag offensive close merge delete

Comments

I'm not sure I understand you completely, but perhaps the topic_tools::ShapeShifter can be of help.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-11 03:21:02 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-12-11 04:04:11 -0600

rbbg gravatar image

If I understand your question, you want to read a rosbag and display the messages from a particular topic? If that's the case; the Rosbag Cookbook contains a C++ example on how to do so.

The C++ API is also helpful and contains another example on how to read from a rosbag in C++.

edit flag offensive delete link more
0

answered 2016-12-11 04:29:57 -0600

NEngelhard gravatar image

You are somehow trying to reimplement rostopic echo, so a good starting point would be the original implementation

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-10 16:32:57 -0600

Seen: 1,199 times

Last updated: Dec 11 '16