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/html/msg/LaserScan.html
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/2011/COMP-417Fall2011Assignment1.pdf
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,
Originally posted by andrestoga on ROS Answers with karma: 188 on 2015-04-01
Post score: 0