Over my years of Robotics and software development I’ve come to a couple rules when it comes to dealing with and interpreting things going on in the real world. They are, if you will, the Three Laws of Real World Development:
1) Sense what information you want directly as opposed to trying to develop an algorithm to infer it. The latter is usually more error prone than you and the computer would like. If you want depth information, for instance, use a sensing system that can measure depth directly, rather than say using stereo images or even a single camera where you have to interpret from the data depth information. Same goes for position information, or timing, or altitude, or weather conditions, and on and on.
2) Whatever you can sense directly, try to leverage its data as much as possible. Not everything you want to determine about the real world is sensible. Sometimes you have no choice but to try to extrapolate what’s going on. This may be because there isn’t a sensor that can sense the information you want or possibly even if there is it’s not practical to use if there is. So whenever there is something you can sense directly, try to exploit this information as much as possible. If it scales well–that is is useful in many ways–you’ll have a winner.
3) When you do have to interpret information about the world, reduce the range and keep things simple. What do I mean here? Try to find the bounds of what you can reliably sense and stick within this range. Sometimes people will tell you things are impossible, and more often than not they are right–particularly about the general case. But in specific cases they are wrong and some approach will work. Try to find what that input range is and what approach works well within it. Complex solutions do have their place, but often in very narrow areas and more often than not a simple solution will suffice over a smaller range.