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!
Asked by Albtech on 2017-09-04 08:43:33 UTC
Comments
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).Asked by ahendrix on 2017-09-04 15:19:51 UTC
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
Asked by Albtech on 2017-09-05 04:02:02 UTC
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?Asked by ahendrix on 2017-09-05 13:27:29 UTC