How can I get hokuyo published information?
I need help. When I run hokuyo_node I suppose that it publish information about laser data, like intensity or range. I need to get that information in another node to do object detection but I dont know how to do. I tryed this:
ros::Subscriber hokuyoSubscriber = n_2.subscribe("scan", 1, scanValues);
void scanValues(const sensor_msgs::LaserScan laser)
{
ROS_INFO("size[%d]: ", laser.intensities.size());
for (unsigned int i=0; i<laser.intensities.size();i++)
{
intensities[i] = laser.intensities[i];
ROS_INFO("intens[%f]: ", intensities[i]);
}
}
But receives nothing...