no matching function for call to message_filters::sync_policies::ApproximateTime
Hi All I am using ROS to subscribe some camera topics in two different ways. Fist subscribe Topic from published messages and second subscribe them directly from bag file without playing bag the file , just read it directly.
in this program i have two different constructor one for published message and the other for reading file in each of the there are functions which do these tasks.
I have this error :
**/opt/ros/fuerte/include/message_filters/synchronizer.h:152: error: no matching function for call to 'message_filters::sync_policies::ApproximateTime<sensor_msgs::CameraInfo_<std::allocator<void> >, sensor_msgs::Image_<std::allocator<void> >, sensor_msgs::Image_<std::allocator<void> > >::ApproximateTime()'**
these are my constructors :
//for reading bag file
FOVISODOMETRY::FOVISODOMETRY(vector<string> cameraTopices,
const string bagFileName, const char* visual_odom_frame_name)
{
/// some implementations
}
////for subscribing from published massages
FOVISODOMETRY::FOVISODOMETRY(const char* image_topic,
const char* depth_image_topic, const char* camera_info_topic,
const char* visual_odom_frame_name) :
initialized_(false), fovis_initialized_(false), depth_image_(NULL), depth_data_(
NULL), grayscale_data_(NULL), rect_(NULL), odom_(NULL), node_(
""), private_node_("~"), camera_info_sub_(node_,
camera_info_topic, 100), rgb_image_sub_(node_, image_topic,
100), depth_image_sub_(node_, depth_image_topic, 100),image_sync_(
ApproximateTimeCustomPolicy(10), camera_info_sub_,
rgb_image_sub_, depth_image_sub_), odom_broadcaster_()
{
/// some implementations
}
and these are the massage filter Synchronizer :
typedef message_filters::sync_policies::ApproximateTime<
sensor_msgs::CameraInfo, sensor_msgs::Image, sensor_msgs::Image> ApproximateTimeCustomPolicy;
message_filters::Synchronizer<ApproximateTimeCustomPolicy> image_sync_;
there is one point : when I omit the file reading constructor its has no error but as soon as I add the second constructor the error appears .
please let me how can I have both of my constructors and also no error
thank you in advance