Go Down

Topic: Arducopter + Obstacle avoidance (Read 1 time) previous topic - next topic

stryker

Hi all,

I am a newbie in C++ so i am here to seek some help in my project. I am thinking of building an aeroquad that has the capability to avoid obstacles using sonar sensors. However, i am not sure how to go about doing this. is there any libraries available for this purpose?
Help is greatly appreciated.

Thanks.

PaulS

What do you need a library for? Reading from a sonar sensor is pretty simple. Using the output from the sensor to avoid the obstacle is up to you. What do you want to do if you detect an obstacle? Turn left? Turn right? Stop? (probably not a great idea with a helicopter).

Whatever you want to do when an obstacle is detected, it won't happen by calling
Code: [Select]
::AvoidObstacle();.

stryker

#2
Aug 25, 2010, 02:13 pm Last Edit: Aug 25, 2010, 02:23 pm by strykerxd Reason: 1
Oh im sorry as i have stated im still new to this stuff so please bear with me. Well actually i have decided to follow the aeroquad build list with the addition of sonar sensors. There are some program codes provided on the aeroquad website found here http://code.google.com/p/aeroquad/downloads/list. The situation i am facing now is my inadequate knowledge to edit this program for it to read whatever values from the sonar sensors. Is it possible to enlighten me in this aspect? Thanks

PaulS

There are 7 sketches in the zip file that is 4th on that list. Which one(s) do you need help understanding?

stryker

Well i dont really understand how the whole source code works yet. Everything is still under planning on my side as i havent gotten the hardware in at the moment. My difficulty is if i were to include the sonar sensors, what sort of code do i need to add on in order to read the data coming from the sensors? Oh btw i am hoping to be able to make my quad back away a little from the obstacle after the sensors senses it.

stryker

Oh i guess i found the PING tutorial over at the tutorials section. Should have checked there before asking the question here. Sorry for that. Anyway thanks for the help.

vinceherman

#6
Aug 25, 2010, 07:41 pm Last Edit: Aug 25, 2010, 07:41 pm by vinceherman Reason: 1
Whatever you do, when you actually get to the point where you are writing code, PLEASE name one of your routines AvoidObstacle() just to tweak Paul's nose!

 ;D ;) ;D

PaulS

When you do, though, it needs to be a method in a class (I did show the scope resolution operator)...

Go Up