How to interpret and use the values of the message type 'sensor_msgs/LaserScan'?
Hi,
I am using the following package: stage_ros
and the node stageros. I want to understand the topic published 'base_scan' that has a message type of 'sensor_msgs/LaserScan'
http://docs.ros.org/api/sensor_msgs/h...
That message has a field 'float32[] ranges' but it doesn't specify the length of the array. I found the following pdf
http://www.cim.mcgill.ca/~yiannis/417...
which demostrates how to iterate the array, calculating the following indexes:
unsigned int minIndex = ceil((MIN_SCAN_ANGLE_RAD - msg->angle_min) / msg->angle_increment);
unsigned int maxIndex = ceil((MAX_SCAN_ANGLE_RAD - msg->angle_min) / msg->angle_increment);
They are using the angle_min and the angle_increment to calculate the indexes that later they will use to iterate over the array. I don't understand what those operations are doing but the final values are: minIndex = 501 and maxIndex = 580 which I think are the values that are in front of the robot.
Can someone explain this to me please?
Best,