Society of Robots - Robot Forum
Software => Software => Topic started by: pomprocker on April 08, 2008, 03:20:15 PM
-
I have built the $50 robot with the photosensors and programmed it to be a photovore.
Then I upgraded it with the Sharp IR and programmed it to scan.
Now it does'nt utilize the photosensors anymore.
So I am trying to figure out a good algorithm in some pseudo-code that I can implement.
I want object avoidance, with light sensing to help tell if its too bright for the scanner to work efficiently
or if a scan finds nothing to resort to being a photovore while still scanning
something like that, I guess i'm going through ways in my head to make these two senses work together.
Robot gets closer and closer to object
Is the object very bright?
It could be a white wall!
Avoid the wall!
Robot can not find any object with scanner
Check light sensors
Is robot in direct sunlight?
Move to darker area so scanner works better.
-
well it is quite simple actually to do obstacle avoidance and simultaneosly follow use the sharp ir ,
have u seen any sumo bot competition , ull see that the bots will normally avoid the white boundary linw ans also seek out the other robot, now how u do that??
when the sharp ir is scanning and getting data, call for another adc conversion for the ir leds. now do a decision according to the data found , suppose any of the ir sensors get a data which means that u have to avoid something then stop all other functions of the robot and keep turning the robot away from the obstacle for 3 or 4 secs which will be sufficient for obstacle avoidance, aafter obstacle has been avoided continue with ur scanning session and do whatever ur robot is meant to do..