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.

[800 byte] By [Dalo_daniel] at [2008-3-7]
# 1

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.

Smile

Dalo_daniel at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Community...
# 2

There was a discussion about this in the Simulation forum. When 1.5 is released the simulated LRF should return max range instead of zero when there is no hit. This is the way that a real LRF works.

Trevor

TrevorTaylor at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Community...

Microsoft Robotics Studio

Site Classified