# Problem in synchronization with message_filters [closed]

Hello everybody. I am trying writing a code that projects rectangles (let's say ROI) in an image which is synchronized in this way:

sync = new message_filters::Synchronizer<MySyncPolicy> (MySyncPolicy(10), img_rec_sub, img_be_sub);


The rectangles that I would like to project are from a LaserScan (actually the message is customized but however they are basically points with and Header). In order to show the rectangles in the synchronized image I tried to modify the code like that

  sync = new message_filters::Synchronizer<MySyncPolicy> (MySyncPolicy(10), img_rec_sub, img_be_sub, stx_points_sub);


Where stxCallback is the callback that acquires the points to be reprojected. Such points are drown inside the dataCallback callback which publishes the images. Well by doing this however no image is published in rviz. If I do not try to synchronize the points, and if I use a simple subscriber for the points, the images with the rectangles are visible but I am sure they are not synchronized. For sure I miss something stupid but cannot realize what. If you have any suggestion for me I will appreciate. Regards

here the stxcallback

void icarsStixelGenerator::stxCallback(const icars_laser_roi::stx_points::ConstPtr& points){

points_x = points->points_x;
points_y = points->points_y;
points_ranges = points->points_ranges;

}


Moreover , my console shows the following warning :

[ WARN] [1457354314.860322713]: MessageFilter [target=map ]: Dropped 100,00% of messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to DEBUG for more information.

edit retag reopen merge delete

### Closed for the following reason question is not relevant or outdated by jappoz close date 2016-03-08 08:08:43.205930

Can this due to the fact that the timestamp of the points message is very different from the one of the two images? If yes, how could I fix this?

( 2016-03-07 07:01:15 -0500 )edit