sonar concepts

How are you guys using sonar?

I have two pencil beam sonars to mount on my rover, my mind is thinking about all sorts of bizarre positions and servo mounted concepts.

knowing what the best use of sonar for a rover is might help.

I have been also thinking maybe I should mount sonar on my Lynx 6 arm so when it someday becomes autonomous it can know how far objects are away from being picked up.

What kind of logic and setup do you guys employ for sonar?

Neil

Well, I haven’t yet used them, but I’ve some ideas in mind:

On my biped’s car, I’ll be placing 3 equally-spaced sensors on the nose of the bot.
They’ll be pointing left-forewards, forwards, and right-forewards, respectively.
I’ll use the left and right sensors to navigate evenly between obstacles.
I’ll start off with some simple code like:

[code]If DrivingFlag = 1 and TimeToCheckSonarFlag = 1
{
LeftSensor = GetADCleft();
RightSensor = GetADCright();

 If (LeftSensor - RightSensor) > UpperThreshold
 TurnLeft();
 ElseIf (LeftSensor - RightSensor) > UpperThreshold
 TurnRight();
 Else
 KeepDriving();

 TimeToCheckSonarFlag = 0;

}

(The driving flag will be set by the background PWM motor control and the check sonar flag will be set by the overall timer interupt.
I’ve found that a single overall timer interupt set at a low period of time works very well to set necessary flags.
If large times between flag triggers are needed, as they would be here, then I have the flag trigger after multiple timer iterations.)
[/code]

That code won’t always work, especially when navigating down a hallway and coming across an open door on the left or right.
I’ll have to tweak thing when I get to that point, but putting in something simple like this should do well enough:

If BothSensorsAreAtLeast5InchesFromTheWall then
DontBotherCorrecting();

The foreward sensor will be used for less ordinary things as well as to aid in ordinary obstancle avoidance.
I might also use it to aid in chasing down target objects, but that’ll be later on.
I’ll also be eventually using a CMUcam2 and 3 laser pointers to measure distances of traced objects.

When the rover is at rest (driving flag is 0) I’ll have the sensors much more actively polled so that I can detect moving objects crossing the rover’s path.
Since the two sensors side sensors will be at nice 45 degree angles, I’ll have a pretty easy job of calculating the approximate speed and trajectory of the moving object.

For instance, if a ball rolls diagonally in front of the rover from the right side to the left (from the perspective of the rover), the right sensor will be the first to read a largely-changed value.
At that point, a timer will start.
When the next sensor (the middle) detects a large change, it’ll record the time, and restart the timer.
And so on for the last sensor.
The rest is all just basic trig and goeometry to figure out the speed based on the times, angle of the sensors, and sensor readings during the change.

So, to sum it all up, the rover-mounted sensors will be employed mostly for avoidance when moving and the pan/tilt-mounted sensors will be used for chasing.

I am building a decked rover bot with a arm mounted on the higher deck.

I am using one ultrasonic (devantec SRF05) sensor on top of the arm to measure distance to objects.

Combining this with PIR sensor you could detect motion and then move the robot towards the person.

You can also use them for creating a “map” of the environment, although they would be less precise than lasers and have a shorter range…but it is cheaper.

I am currently using IR sensors for obstacle avoidance, but will replace them with the maxbotics EZ-1 ultrasonic sensors.

I am planning on replacing the PIR sensor with a camera to detect motion and various object, but the ultrasonic sensor will still be helpfull to measure distances.

If using several sensors, I would make sure they are not interfering with each other (especially the SRF05).

For my robot, 2 of them are diverging (left/right), 4in from the ground and one is about 2 feet from the ground mounted on the arm with pan/tilt.
[/code]

If they cross beam paths would it be a problem? I am thinking of killing 3 birds with 2 stones :laughing:

\ / \ / \/ / \ / \ S1 S2 ---------------- Rover Front

yes I have a PHd in Ascii art :stuck_out_tongue:

Neil