go_away

### Author Topic: Sharp IR Sensor 2D Scanning Help?  (Read 1167 times)

0 Members and 1 Guest are viewing this topic.

#### spooneythegoon

• Jr. Member
• Posts: 10
##### Sharp IR Sensor 2D Scanning Help?
« on: July 20, 2012, 07:10:55 AM »
Hi everyone.

I don't really know where this should be, so if it is in the wrong place could a moderator move it or something?

Anyway, my problem is this:

I am building a small robot for my GCSE systems project. At first, I was going to use 2 sharp IR sensors and an ultrasound module for object detection, but I later realised that I could replace the 2 IR sensors with just one mounted on a servo. Upon reading the sharp IR tutorial, however, I saw that I would need to account for the motion of the robot in my program, and I have no clue as to how this could be done. Could anyone please offer any tips?

I have searched the forum, but not really knowing what keywords to search has stopped me finding anything, so apologies if this has been answered already.

Thanks

Sam.

#### Soeren

• Supreme Robot
• Posts: 4,672
##### Re: Sharp IR Sensor 2D Scanning Help?
« Reply #1 on: July 20, 2012, 05:24:45 PM »
Hi,

I don't really know where this should be, [...]
Yeah, it's tricky (I'd probably place it under software though).

[...] Upon reading the sharp IR tutorial, however, I saw that I would need to account for the motion of the robot in my program, and I have no clue as to how this could be done. Could anyone please offer any tips?
The easy way is to stop, scan and continue, but assuming you are at point x when starting a scan and you're moving straight forward, your base line will be a slanted line, which can be incorporated from the angle of scan and the number of clicks from wheel odometry (encoder).
Assuming you're turning even a small bit when scanning, it becomes more complicated (not impossible though) to calculate the position of obstacles.

One possible strategy would be to scan relatively coarse while moving and when something turns up and getting within a certain range, stop and make a finer resolution scan from a standstill. Whether this will work for you, depends on your overall strategy for movement of course.
Regards,
SÃ¸ren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Engineering is based on numbers - not adjectives

• Jr. Member
• Posts: 10