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

Revision history [back]

Subscribing a topic from a bag file is the same as subscribing to a ROS topic.

In one terminal, please play your bag file as shown below:

rosbag play file.bag

Please see the wiki page for more info on the rosbag play command. Next, in another terminal, please subscribe to your recorded topic. Again, please see the wiki page on how to write a subscriber.


By the way, are you trying to extract messages from a bag file? If yes, I recommend you look at the rosbag/Code API page.

Subscribing a topic from a bag file is the same as subscribing to a ROS topic.

In one terminal, please play your bag file as shown below:

rosbag play file.bag

Please see the wiki page for more info on the rosbag play play command. Next, in another terminal, please subscribe to your recorded topic. Again, please see the wiki page on how to write a subscriber.


By the way, are you trying to extract messages from a bag file? If yes, I recommend you look at the rosbag/Code API page.