Help in Autonomous Rover Navigation using IR sensors

Hi Guys,

This is my first post at Lynxmotion. Its a wonder full source for hobby robotics. I am trying to build a autonomous rover based on Lynxmotion 4WD rover chassis.
I have designed my own motor controller and micro controller board.

My hardware includes

  1. LPC2148 ARM7 as main controller.
  2. L298 for motor control.
  3. Sharp IR sensors to detect obstruction.
  4. HS-422 servo with pan and tilt.
  5. XBee Pro for wireless link.

I have tested individual sensor along with the main controller. Now I am trying to put it all together and implement autonomous behaviour to the robot. I have few questions on how to model autonomous behaviour. Been through so many videos on you tube about rovers with IR sensors.

A rough idea of my logic to control the robot.
I intended to run the motors at 2 speeds slow & fast. Slow speed will be selected whenever there is any obstruction and fast if there is nothing in front.
When the rover is powered on it will scan complete 180deg to detect any obstruction depending on the reading it will decide the direction.

This is where i am getting confused, if there no obstruction within 180deg, rover should go straight. but if there is obstruction in any one direction lets say in front of the rover then how will the rover decide which direction to go right or left?. If there no obstruction in either left or right side then, how to implement direction control in situations like this.

Any pointers from fellow members would help a lot.

Cheers
Tama

Go the opposite direction of the obstruction?

Alan KM6VV

Thanks Alan

I do agree on this.

The sensor would continuously scan for objects and based on that the direction would be decided. In order to decide the direction, Rover will have to remember/track the angle at which the sensor is having less obstruction.

Is this logic right?

That sounds about right. And with multiple readings, you could probably refine the angle of the target. Multiple targets would be handled by developing a map with “clear” corridors for the 'bot.

Alan KM6VV

Thanks Alan,

Here is what I did and it worked…

Make an array to store 6 readings.
Make a sweep, recording readings every 30 degrees.
…now one of several options…

  1. Take highest reading and head in that direction. (Making sure that if highest reading is something really close, then you are in a corner or a bad place, so U-Turn.)
  2. Find the two adjacent readings with the highest average (presumably the most “open” direction), and go there.
  3. Eliminate the three lowest readings and go in the direction most favored by the three remaining.

I liked #2 easiest to code and best results.

Do you also work up a “checkerboard” (map) of the area? That could be useful.

Nice work! How about a video sometime of your 'bot navigating?

Alan KM6VV

Do you also work up a “checkerboard” (map) of the area? That could be useful.

No. Mostly I’ve been using BOE-Bot which is rather short on memory. But I’ve now got a few Arduinos (Duemilanoves and Megas) so this might be a good time to try that.

Nice work! How about a video sometime of your 'bot navigating?

I’m building a Lynxmotion $WD Rover now and documenting it at: www.RichardVannoy.info/rover.php
So there will be videos here and also there soon.