How to use topic message type as an argument of a function?
In the subscriber callback function, I would like to use topic message type as an argument so that I can use for any topic:
void callback(message_type &msg)
{
....
}
....
ros::Subscriber sub = nh.subscribe(topic_name, 1000, callback);
Any suggestion?