Synchronizing 3 messages: Build Errors
Greetings. I am attempting to use the ApproximateTime policy for synchronizing 3 messages containing the types with names: string type, int32 value. At the call, Synchronize<syncpolicy> sync(syncPolicy(10), alg1_sub, alg2_sub, alg3_sub), with alg 1, 2, 3 _sub the message filters on the nodeHandle, I get the following error:
/opt/ros/fuerte/include/message_filters/sync_policies/approximate_time.h:620:119: error: ‘value’ is not a member of ‘ros::message_traits::TimeStamp<elars::alg3_<std::allocator<void> >, void>’
The messages alg1, alg2, alg3 have been created correctly and the .h files for each are properly found and included in my node. It seems that the message types are not being registered properly using gen_msgs() in the CMakeLists.txt. Any pointers to a solution are greatly appreciated. Attached is the main function code:
int main(int argc, char** argv){
ros::init(argc, argv, "decision_ensemble");
DecisionEnsemble ensemble;
ros::NodeHandle nh;
message_filters::Subscriber<elars::alg1> alg1_sub(nh, "alg1", 1);
message_filters::Subscriber<elars::alg2> alg2_sub(nh, "alg2", 1);
message_filters::Subscriber<elars::alg3> alg3_sub(nh, "alg3", 1);
typedef sync_policies::ApproximateTime<elars::alg1, elars::alg2,
elars::alg3> syncPolicy;
Synchronizer<syncPolicy> sync(syncPolicy(10), alg1_sub, alg2_sub, alg3_sub);
sync.registerCallback(&ensemble.ensembleCallback);
ros::spin();
return 0;
}