ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
So after loosing precious 6 hours. This is how it is solved. Subscriber was added like this:
ros::Subscriber sub4 = nh.subscribe<geometry_msgs::Point>("/y", 1, boost::bind(&a_server::callback2, this, _1));
Callback function was written like this:
void a_server::callback2(const geometry_msgs::Point::ConstPtr& a)
{
....
}
Header file was added with this under Public:
void callback2(const geometry_msgs::Point::ConstPtr& a);