I am writing an algorithm for Frontier Based Exploration in c++ using player stage simulation 2.0 and I am stuck on a specific part. From my understanding the laserProxy provides a 180 degree scan of the environment in front of the robot. i have a for loop that iterates through all 180 beams of the robot, and analyzes each one.
for (int i = 0; i < lp->GetCount(); i++) {
lp is a pointer to a LaserProxy. I checked the reference manual for laserProxy and GetCount() is suppose to return the number of points in the scan. I assumed that this will always be 180 since thats how many beams are being projected from the robot but this is not the case, sometimes GetCount() is 0, other times it is 90, and other values. Can anyone explain why this is so?
Thank you