ROS fuerte - check subscriber
Hi,
I want to check if a subscriber has subscribe properly to a topic. I read in documentation ( http://docs.ros.org/api/roscpp/html/c... ) that this is made checking nodehandle but compiler sais that cant convert nodehandle to bool.
ros::NodeHandle n;
/* ... */
intruder_sub[i]=n.subscribe(topicname.c_str(), 0,Intruder_StateCallBack);
if(n){
cout << "cant subscribe to " << topicname << endl;
assert(false);
}
What I'm doing wrong? Thanks in advance.