DistanceMeasurements are 0
I tried to use a conditional code to check if laserData.DistanceMeasurements is null. But now, the problem is that all the measurements given are 0.
Do you think using a persistent inspection withtrue is the correct way?
Code Snippet
Arbiter.ReceiveWithIterator<sicklrf.Replace>(true
, _laserNotify, LaserReplaceNotification)In the other hand, witn a non-persistent inspection the array given is null. What could be the reason for the measurements = 0?
Thanks a lot.
Now it's all OK. The problem was some distance measurements are 0. When the FindNearestObstacle method is called, it returned the minimum measurement. And the minimum number was 0.
In the FindNearestObstacle method you have to add some conditional code to ensure that the measurements iqual to 0 are avoided.
