No matching constructor for rosbag::View
Hi guys,
I am trying to follow the rosbag API guideline to create a rosbag viewer as follows:
rosbag::View view(myBag, rosbag::TopicQuery("velodyne_points"));
but I am getting a "No matching constructor" error message. Could you please help me to sort this problem?
Thank you!
It seems like
myBag
might be the wrong type. It would be helpful if you could edit your question to include the full error message and the full code that you're trying to compile (or a link to the sample if you're trying to compile some sample code).I am following line by line instructions from here http://wiki.ros.org/rosbag/Code%20API . myBag is rosbag::Bag type, it shouldnt be a problem. I am having no compile time error even though my CLion IDE gives underlying redline with "No matching constructor" error message. It fails during runtime
C++ is a statically typed language; errors like
No Matching Constructor
cannot happen at runtime, so it just sounds like your IDE is confused. There's probably a different error when you try to run your program; can you include that in your question?