Dear all,
I am trying to use the TimeSequencer filter of the message_filters library to introduce a delay to a certain topic. I have created a simple example following the documentation on http://wiki.ros.org/message_filters
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "geometry_msgs/PoseStamped.h"
#include <message_filters/subscriber.h>
#include <message_filters/time_sequencer.h>
void chatterCallback(const geometry_msgs::PoseStamped::ConstPtr& msg)
{
ROS_INFO("Msg received");
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "subscriber");
ros::NodeHandle n;
message_filters::Subscriber<geometry_msgs::PoseStamped> sub(n, "chatter", 1);
message_filters::TimeSequencer<geometry_msgs::PoseStamped> seq(sub, ros::Duration(0.1), ros::Duration(0.01), 10);
seq.registerCallback(chatterCallback);
ros::spin();
return 0;
}
However, I get a compilation error stating " undefined reference to `message_filters::Connection::disconnect()' ". Here is the whole compilation error message:
CMakeFiles/Subscriber.dir/src/Subscriber.cpp.o: In function `message_filters::TimeSequencer<geometry_msgs::PoseStamped_<std::allocator<void> > >::~TimeSequencer()':
Subscriber.cpp:(.text._ZN15message_filters13TimeSequencerIN13geometry_msgs12PoseStamped_ISaIvEEEED2Ev[_ZN15message_filters13TimeSequencerIN13geometry_msgs12PoseStamped_ISaIvEEEED5Ev]+0x2d): undefined reference to `message_filters::Connection::disconnect()'
Does anyone know where the error comes from? I have searched for more documentation but I haven't found a solution. Any help would be very much appreciated.
I am running ROS Kinetic on Ubuntu 16.04.
Thanks in advance,
Ignacio
Originally posted by iabadia on ROS Answers with karma: 55 on 2019-05-14
Post score: 0