Ask Your Question

‘TopicQuery’ is not a member of ‘rosbag’

asked 2012-04-24 04:47:49 -0600

niosus gravatar image

updated 2014-01-28 17:12:04 -0600

ngrennan gravatar image

Hi all!

When I try to build my package via rosmake I get an error

error: ‘TopicQuery’ is not a member of ‘rosbag’

The line that generates an error:

rosbag::View view(bag, rosbag::TopicQuery(topics));

The bag file and topics are initialized as follows:

rosbag::Bag bag;"test.bag", rosbag::bagmode::Read);
std::vector<std::string> topics;

I am new to ROS, so maybe someone could suggest what seems to be the problem? P.S. I followed this tutorial

edit retag flag offensive close merge delete


Please paste your entire program (or the smallest snippet that reproduces the problem).

Mac gravatar image Mac  ( 2012-04-24 11:23:17 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2012-04-25 01:29:35 -0600

niosus gravatar image

updated 2012-04-25 01:30:29 -0600

I realized that I just forgot the

#include "rosbag/view.h"

So now it works, sorry for inconvenience.

I don't have enough karma to close my own question, so please feel free to do it.

edit flag offensive delete link more


I'll vote you up instead; after all, this is the right answer (no matter who found it).

Mac gravatar image Mac  ( 2012-04-25 04:24:16 -0600 )edit

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


Asked: 2012-04-24 04:47:49 -0600

Seen: 369 times

Last updated: Apr 25 '12