Class send through a CallBack function
I can't figure out how to correctly use boost::bind while sending a class function as a callback Function. I want to callBack function to have on class I made as an argument as well.
Do far my code is like this :
Scribe(ros::NodeHandle ao_nh, std::string topic, Platform& p) : _verbose(false), _topic_name(topic), _timeStamp(ros::Time::now()), _cmd(), _needChecking(false) {
//Scribe mode
_scribe=ao_nh.subscribe<geometry_msgs::Twist>( topic,1000, boost::bind(&Scribe::callBackFunc, _1, &p), this);
//Timer
_bomb=ao_nh.createTimer(ros::Duration(2),&Scribe::bombCallBack, this);
};
and the call back function is like this :
void callBackFunc(const geometry_msgs::Twist::ConstPtr& msg, Platform* plat);
Or, I have a error such that no matching function to call
and I can't figure out how to correctly declare the subscriber.
Any help is appreciated.