ROS offline bag view with message_filter synchronizer callbacks

asked 2015-02-13 22:36:35 -0500

EEngineer gravatar image

I have a stereo camera node that takes in images and camera infos set up with an approximate sync policy:

    typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo, sensor_msgs::CameraInfo> ApproximatePolicy;
    typedef message_filters::Synchronizer<ApproximatePolicy> ApproximateSync;

    approximate_sync.registerCallback(boost::bind(&Node::image_callback, this, _1, _2, _3, _4));

I want to run an offline executable that will open up ros::Views on several rosbags in C++. How can I use the existing callbacks and time synchronizers by iterating through rosbag::MessageInstance?

Thanks!

edit retag flag offensive close merge delete