Society of Robots - Robot Forum

Software => Software => Topic started by: cooldog on November 12, 2007, 06:07:30 PM

Title: wall avoidance
Post by: cooldog on November 12, 2007, 06:07:30 PM
does anyone know a algorithm for a single sharp Ir wall avoidance or a tutorial
Title: Re: wall avoidance
Post by: Steve Joblin on November 12, 2007, 06:32:17 PM
I would mount the unit on a servo that rotates the sensor to the left side, takes a reading, rotates the sensor to the middle, takes a reading, rotates the sensor to the right side, takes a reading, then determines what action to take based on the data it just collected from the three readings.  Then continuously repeat the process.
Title: Re: wall avoidance
Post by: cooldog on November 12, 2007, 06:37:39 PM
OK but where can i get a algorithm for that ( i don't know how to program )
Title: Re: wall avoidance
Post by: airman00 on November 12, 2007, 06:52:49 PM
you should do tutorials on programming and learn other stuff, not just take other people's work


if you're doing that and not learning , whats the point of making a robot?

you do want to learn right???
Title: Re: wall avoidance
Post by: Steve Joblin on November 12, 2007, 08:31:51 PM
the programming is pretty straight forward for the approach I suggested... what microcontroller are you using?
Title: Re: wall avoidance
Post by: cooldog on November 12, 2007, 08:49:19 PM
AT MEGA 8 form the $50 robot
Title: Re: wall avoidance
Post by: Half Shell on November 13, 2007, 12:45:35 PM
A simple if statement like this:

if( irRange > 120){
  turn
}

Works. I am using that for my object avoidance bot right now using the Sharp IR sensor until I turn it into a mapping bot.