ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When I run the subscriber, it just doesn't stop. It keeps on running.

That is the normal (and desired) behaviour of subscribers, yes.

I want only a single value of the scan i.e. the ranges[] array.

Easiest is probably to use ros::topic::waitForMessage(..) for that.