This data was obtained in 4 meter mode … it does not happen all the time. I tried the same test with other objects it works okay with them … but with the wall, it is behaving in this way. Anyways I will recheck and let you know.
I understand that part; if I am pointing at an object not far from 3.5m, the values provided by ToF are good. But if I mount this ToF on a mobile robot, I have no control over where to point, and since it gives false values beyond 3.5 meters … the robot thinks that the obstacle is nearby and the robot goes crazy. If possible, how can we filter out those false values?
You can add two sentences below on the code to filter out those false values. If the false values can not be filtered throughly, you should increse the value 30, ie. 40(you need to debug on your side).