gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Avoiding collisions

Thu Sep 10, 2015 11:42 am

Hi! This is my first post in these forums.

Some friends and I are building a robot for a school project. We decided to make one that has to be able to solve som tasks, one of them being to avoid collisions, i.e. it has to be able to turn if it finds a wall. We first thought about using an ultrasonic range finder. If it senses something getting closer the robot has to change course. Then we realized that the wall must be at a right angle for the sensor to give correct meassurements. We thought that a way of solving this was to attach it to a servo so that it could "look around" and then have the wall at a right angle in some position.

Is this a good way of solving the problem? Or should we use another sensor (and maybe method)?

Thanks in advance!

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Avoiding collisions

Fri Sep 11, 2015 8:24 am

gkraft wrote:Hi! This is my first post in these forums.

Some friends and I are building a robot for a school project. We decided to make one that has to be able to solve som tasks, one of them being to avoid collisions, i.e. it has to be able to turn if it finds a wall. We first thought about using an ultrasonic range finder. If it senses something getting closer the robot has to change course. Then we realized that the wall must be at a right angle for the sensor to give correct meassurements. We thought that a way of solving this was to attach it to a servo so that it could "look around" and then have the wall at a right angle in some position.

Is this a good way of solving the problem? Or should we use another sensor (and maybe method)?

Thanks in advance!
Some time ago Joan investigated HC-SR02 ultrasonic sensors with oblique detection angle, it's interesting reading.

Summary: If the wall is at an angle to the sensor the return time is longer. This should still be OK for an anti collision robot (by the time you are close enough to hit the wall you will probably get a return, causing the robot to turn.)
Joan's technique for investigating was to mount the sensor on a lollipop stick and move the stick with a servo, so that approach is definitely achievable.
Doug.
Building Management Systems Engineer.

gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Re: Avoiding collisions

Fri Sep 11, 2015 11:12 am

Thank you for your answer!

We'll probably go with the servo solution, but if we decide to have the sensor stationary it will still work you say?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Avoiding collisions

Fri Sep 11, 2015 11:22 am

gkraft wrote:Thank you for your answer!

We'll probably go with the servo solution, but if we decide to have the sensor stationary it will still work you say?
Unless your angle is so acute that you need to travel a long way to reach the wall (long corridor) the sensor will probably be able to detect the wall before you hit it.

I recommend trial and error: build your robot and try it out for yourself at varying angles and distances from the wall.
Decide if this is sufficient or if a servo mounted sensor is required.
Show your research and conclusions in your project summary.
Doug.
Building Management Systems Engineer.

User avatar
joan
Posts: 14765
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Avoiding collisions

Fri Sep 11, 2015 11:39 am

Strangely enough I have actually tried both solutions - fixed versus servo mounted sensor. They both work. Eventually I decided to just use a fixed sensor.

Partly because the servo mounted sensor was very much move a few inches, stop, point, read, rotate times X, find direction of closest obstacle, move a few inches, repeat. A slow, boring motion. The servo also drained the batteries pretty fast. A fixed sensor was simply more fun to watch as it bounced around the room.

gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Re: Avoiding collisions

Fri Sep 11, 2015 12:01 pm

Those were very fast answers!

Thank you for your help! We'll probably try with the fixed sensor. But say that the robot is moving very close to a wall, but parallell to it and then reaches another wall. If the sensor is fixed it cannot look to the side and see that there is a wall there aswell and the robot may try to turn into the wall.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Avoiding collisions

Fri Sep 11, 2015 12:03 pm

gkraft wrote:Those were very fast answers!

Thank you for your help! We'll probably try with the fixed sensor. But say that the robot is moving very close to a wall, but parallell to it and then reaches another wall. If the sensor is fixed it cannot look to the side and see that there is a wall there aswell and the robot may try to turn into the wall.
Two wheel robots can spin on the spot, set one wheel forwards and one backwards and you have a very small turning circle.
Doug.
Building Management Systems Engineer.

gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Re: Avoiding collisions

Fri Sep 11, 2015 12:10 pm

But if the robot is too wide it will hit the wall while turning, right?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Avoiding collisions

Fri Sep 11, 2015 12:22 pm

gkraft wrote:But if the robot is too wide it will hit the wall while turning, right?
That depends on how close to the wall it has got. The sensor launches sound out in a (nearly) conical pattern so the closer the wall is the more likely the sensor will be picked up.
Doug.
Building Management Systems Engineer.

gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Re: Avoiding collisions

Fri Sep 11, 2015 12:33 pm

Seems that the servo isn't very necessary, so we'll use a fixed sensor and turn the robot. If that doesn't work we can try with the servo.

User avatar
joan
Posts: 14765
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Avoiding collisions

Fri Sep 11, 2015 12:39 pm

I'd be tempted to use three sensors with 45 degrees between each. Simpler than servo and should catch most scenarios. It really depends what brief you have for the project. Must you avoid a collision at all cost or is it more a bit of fun with added learning.

gkraft
Posts: 41
Joined: Thu Sep 10, 2015 11:20 am

Re: Avoiding collisions

Fri Sep 11, 2015 3:25 pm

We can actually do whatever we want for our project. It doesn't even have to be a robot. We could study fish if we want to, but we thought a robot would be fun. We have to come up with something to study and then write a report on it.

The three sensors solution sounds promising. Well probably use that solution. It uses less power which is important since we will be using batteries.

User avatar
Defiant
Posts: 179
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: Avoiding collisions

Sun Sep 13, 2015 6:14 am

Get a RGBD-Camera like Asus Xtion that is able to give you a distance for every pixel in your image.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Avoiding collisions

Mon Sep 14, 2015 7:43 am

gkraft wrote:We can actually do whatever we want for our project. It doesn't even have to be a robot. We could study fish if we want to, but we thought a robot would be fun. We have to come up with something to study and then write a report on it.

The three sensors solution sounds promising. Well probably use that solution. It uses less power which is important since we will be using batteries.
Don't forget to mention in your report that you had considered a single sensor on a servo mount and rejected due to the inherent delays. If the report documents negative events as well as positive it will be more interesting reading and more informative of the process you used in developing your project.
Doug.
Building Management Systems Engineer.

Slackware
Posts: 131
Joined: Mon Jan 18, 2016 3:45 pm

Re: Avoiding collisions

Sun Feb 14, 2016 4:22 pm

the xbox 3d camera will let you take snapshot of robots surrounding.

Return to “Automation, sensing and robotics”