# Arduino Forum

## Topics => Robotics => Topic started by: Maria88 on Aug 06, 2014, 02:46 pm

Title: I need a help and guide in this case
Post by: Maria88 on Aug 06, 2014, 02:46 pm
Hello all ,
I've been working on my two-wheeled mobile robot  I've been trying  to perfect my obstacle avoidance algorithm which is Artificial Potential Field method . Also i use Arduino Uno kit . The basic concept of the potential field approach is to compute a artificial potential field in which the robot is attracted to the target and repulsed from the obstacles . The artificial potential field is used due to its computational simplicity  .  the mobile robot applies a force generated by the artificial potential field as the control input to its driving system . the Artificial Potential Field method in its computations depends on the distance between robot and goal or target and the distance between robot and obstacles that effected the robot (which could easily get for ultrasonic senors)

I applied the Artificial potential field  method in Matlab environment / simulation and it is done successfully  , really what I need in the simulation is to get the current position of mobile robot and position of goal as x , y coordinates (to compute the distance between robot and goal) and the obstacles positions ,

The output of the Artificial potential field is the desired angle to avoid obstacle and reach to the goal , the method give the robot the angle the pointed to the goal then the robot goes toward that angle and if the robot face an obstacle in his way ( got from sensor reading) the Artificial potential field will update the angle to avoid the obstacle and then re-give the robot the angle that pointed to the goal and so on.

The question is how could I apply the Artificial potential field  method in real would ?  what should I get ? is it easy to do that or it is impossible ?

I had Rover 5  with two normal DC motors and two encoders (incremental rotary encoder) per each wheel  .

Any Help or suggestion on the topic will be highly appreciated please.
Title: Re: I need a help and guide in this case
Post by: PaulS on Aug 06, 2014, 04:28 pm
Quote
The question is how could I apply the Artificial potential field  method in real would ?  what should I get ? is it easy to do that or it is impossible ?

I think you have a long way to go before you get to the point where this question matters. By the time you get there, I think you'll know the answer.

For instance:
Quote
what I need in the simulation is to get the current position of mobile robot

Relative to what? And, how do you intend to get that information?

Quote
and position of goal as x , y coordinates

Same questions.

Quote
The output of the Artificial potential field is the desired angle

What does "45 degrees" mean to you? An angle without a reference is useless.

Assuming that the PC knows the current heading of the robot (something I'm not willing to do), and it is able to tell the robot "Turn +30 degrees" (assuming that + and - mean clockwise and counter-clockwise), how will you make the robot do that? Specifically, how will it know that it has turned 30 degrees?

Title: Re: I need a help and guide in this case
Post by: JimboZA on Aug 06, 2014, 04:45 pm
Seems to me here, that the issue is one of discriminating between an obstacle and a target. There are many ways of measuring distance to something (ultrasound, eg), but knowing that something's a target (attract) or an obstacle (repel) is another question.

Then, you need to be able to detect a target even if there's an obstacle in the way.

So, you need to investigate what sensors are available that are a) able to discriminate between friends and foes and b) be visible behind each other.

Infrared beaconing comes to mind, although I have no knowledge of it. How about RFID?- although I don't know what range that works over. I think electronic toll tags are RFID, not sure.

How does aircraft IFF (Identify Friend of Foe) work? Maybe look into that?

Title: Re: I need a help and guide in this case
Post by: Maria88 on Aug 06, 2014, 09:19 pm

Dear Mr PaulS   many thanks to you ,
Dear Mr JimboZA many thanks to you
I really  appreciated that for you

Dear the case is very simple , but first , there is something to know that I constrained with some limitations that I couldn't overstep them , one of them is that the real world should be exactly as simulation for example in the simulation I consisted that robot started with (0,0) on coordinates  x , y axis and I should put the goal point for example (10,20)  and feed this point in the Artificial potential field method and then compute distance between  robot and goal (so I don't need any technique to determine the position of goal) and I don't know if I could applied that.
the second constrain is that I should use the encoders of wheels to determine the current position of mobile robot and its orientation depending on a calculation formula (something like this http://rossum.sourceforge.net/papers/DiffSteer/ (http://rossum.sourceforge.net/papers/DiffSteer/)) even if that will be inaccurate .
I had a Rover 5 with two normal DC motors and two encoders (incremental rotary encoder) per each wheel  , each encoder has four wires I don't know how to deal with them yet, and how could I translate the pulses of encoders or how to work out the x.y position of your robot based on the shaft encoder data..
I am still searching for ….

thanks a lot .
Title: Re: I need a help and guide in this case
Post by: JimboZA on Aug 07, 2014, 08:17 am
Ok well I can't help further I'm afraid because I've never used a rotary encoder. I theory I guess it's possible to keep track of your position based on the rotation of the wheel, but I have no personal knowledge of that.

Starting point is to try to understand your encoders: seems you don't yet know how they work. Someone here will probably have experience with them, especially if you know their make and model, and perhaps link to a datasheet.

http://en.wikipedia.org/wiki/Rotary_encoder