multiple messages sync with tf
Hello,
I am trying to write a callback where two topics and tf are synchronized. For example I want to have an image, a pointcloud and tf at the same time.
I inspired from the piece of code below, which deals with one topic and tf. Does anybody know how to extend tf:MessageFilter to two or more topics?
Thanks
tf::TransformListener tf_;
tf::MessageFilter<sensor_msgs::PointCloud2> * tf_filter_;
message_filters::Subscriber<sensor_msgs::PointCloud2> cloud2_sub_;
//initialisation
cloud2_sub_.subscribe(n, "/kinect/rgb/points2", 10);
tf_filter_ = new tf::MessageFilter<sensor_msgs::PointCloud2>(cloud2_sub_, tf_, "/map", 10);
tf_filter_->registerCallback( boost::bind(&PointReader::pointCloudCallback, this, _1) );
//callback
void pointCloudCallback(const sensor_msgs::PointCloud2::ConstPtr& sensor_msg)
{