by stuuk » Sun May 04, 2008 5:32 pm
by stuuk
Sun May 04, 2008 5:32 pm
Hi guys
I'm still very much a robotic newby having only had my RN for a few days but have been playing around with my Sharp IR sensor and have a simple idea for autonomous roaming.
Replace the RN head with any old servo
Mount the sharp IR sensor on the head servo so it is forward facing.
The main program loop will be something like -
Take two steps forward
Check sensor - if no obstruction go back to two steps forward
If obstruction swing head 45 deg right store distance as RIGHT
Swing head to centre then 45 deg left store distance as LEFT
centre head servo
Turn RN right or left depending which variable is greater (RIGHT or LEFT)
Go back to two steps forward
It should give the impression RN is looking around for the best path to take to avoid obstructions
Anyway i'll give it a go and report back, but what do you think of this idea?
Thanks
Stu
Hi guys
I'm still very much a robotic newby having only had my RN for a few days but have been playing around with my Sharp IR sensor and have a simple idea for autonomous roaming.
Replace the RN head with any old servo
Mount the sharp IR sensor on the head servo so it is forward facing.
The main program loop will be something like -
Take two steps forward
Check sensor - if no obstruction go back to two steps forward
If obstruction swing head 45 deg right store distance as RIGHT
Swing head to centre then 45 deg left store distance as LEFT
centre head servo
Turn RN right or left depending which variable is greater (RIGHT or LEFT)
Go back to two steps forward
It should give the impression RN is looking around for the best path to take to avoid obstructions
Anyway i'll give it a go and report back, but what do you think of this idea?
Thanks
Stu