Go Down

Topic: Is it possible to distinguish between wall and other object? (Read 918 times) previous topic - next topic


Hello guys

I am working on a robot project, it is basically simple indoor navigation. two numbers will be given to the robot which are distance and the angle. this will the robot to turn x degree and move y cm or meters.

I am kind of worried how to deal with obstacles. if the robot is supposed to travel 50 meters and it detects an obstacles when it has passed 10 meters. Now it still need to go 40 meters and it needs a solution to avoid the obstacle. Likewise, there may be many different obstacles on its way.

I was thinking to differentiate between the wall and other small obstacles. Or a way to recognize that its target position is behind the wall. then it may able to follow the wall and possibly find the door. I am kind of confused, whether it is possible or not.

p.s. I may use encoder, digital compass, 4 IR sensors and 4 ultrasound sensors, Arduino and wireless communication to PC.

I do appreciate your help.

Thank you very much


If you -really- want to know how to do this, take this course:


The instructor of this course, Professor Sebastian Thrun, is one of the leading authorities on what you are trying to do; as his bio on the course states:

"Sebastian Thrun is a Research Professor of Computer Science at Stanford University, a Google Fellow, a member of the National Academy of Engineering and the German Academy of Sciences. Thrun is best known for his research in robotics and machine learning, specifically his work with self-driving cars."

Seen the Google self-driving car or Stanford's wins in the DARPA Grand Challenges? He's behind that.

What you are essentially trying to do is solve the problem of "SLAM" - Simultaneous Localization and Mapping (http://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping - also, be sure to check out the "SLAM for Dummies" link in that wiki article); note that there isn't yet a complete solution to the problem - it is still a very much researched area of study.

Learning how to do it from Professor Thrun is probably one of the best ways to approach a solution. Note that the course will only get you to a basic level, but it should be enough for you to take the knowledge and implement something workable...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Put bigger treads on the robot and just go over or thru the obstacles ;)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Maybe you could aim your sensors high and low? If the "low" sensor detects something, switch to a "high" sensor (or swivel the "low" sensor up on a servo so it's now a "high" sensor). If the "high" sensor then detects something at the same distance then the object is "tall", if not it's "short".
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0


The instructor of this course, Professor Sebastian Thrun, is one of the leading authorities on what you are trying to do

The fact that there is a well known 'leading authority' on this type of problem should tell you how big a step it is from 'move a distance in that direction' to 'move a distance in that direction, finding your way round/past any obstacles on the way'. If you're serious about solving the problem, I think you'll find that your solution quickly outgrows the capabilities of an Arduino.
I only provide help via the forum - please do not contact me for private consultancy.


Thank you very much, I will have a look at the course. Now, I am going to try Jim's suggestion if I can detect short or tall objects.


Going out on a limb here, but I think the problem you state (get from point a to point b avoiding obstacles) is being made more complex than it needs to be.  A full SLAM implementation does much more than this.  Of course, that may be what you want after all, if the robot is supposed to map it's territory and be able to locate itself on the map.  But just moving from a to b while going around obstacles is a small subset of that problem.

First, why do you have to differentiate between walls and other obstacles?  Either way, the robot has to go around it, doesn't it?  A wall is just an obstacle with a certain shape and size.  When an obstacle is encountered, the robots behavior in response is going to be the same whether or not it is a wall: go around it.

The algorithm for going around an obstacle doesn't have to be complex.  When the robot hits an obstacle, it turns (pick left or right) away from it and tries to go forward.  When it no longer detects the obstacle, recalculate the heading and distance to the target and try again. This depends on having reliable information on the robot position, but if you can trust your encoders (a big if, admittedly) you can keep track of that.

You can add heuristics about what to do in cases where the basic algorithm is not making progress (like corners). If you have sensors set up to do it, you can also use a 'right hand rule' like a maze solver to go around even complex obstacles, like walls with corners and doorways.  The point is that these basic algorithms are probably simple enough to implement on an arduino.

The biggest problem is accuracy.  With just encoders, over time your calculated position will accrue enough error that hitting the target is not going to be anywhere near exact.  Sensor drift is another one of those pernicious problems that robots have to deal with.  That's why more advanced robots use multiple methods and sensors to determine their location.  See Kalman filtering for one approach.

Chris J. Kiick
Robot builder and all around geek.


I implemented an algorithm for my robot that performs this basic task, although
it's probably not 100% accurate. I have a narrow-beam Maxbotix EZ4 sonar mounted
on a panning servo. I sweep the sonar and take a series of distance measurements
with pan angles spaced 10 degrees or so apart.

If you think about it, walls, corners, and objects have characteristic geometries.
You can plot the angles and trigonometry out on a piece of paper. I forget the
exact ratios I used, but basically to detect a wall, I look for adjacent readings to
be within about 15-20% of each other. With a corner, adjacent readings will
fall off much faster, maybe 30% or so. With a size-limited object, there will
be a much larger falloff in distance at the edges of the object.

Code: [Select]


/ \
/   \

__|     |__

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131