Pages: [1]   Go Down
Author Topic: Arducopter + Obstacle avoidance  (Read 1391 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
::AvoidObstacle();
.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: August 25, 2010, 07:23:29 am by strykerxd » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink ;D
« Last Edit: August 25, 2010, 12:41:13 pm by vinceherman » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: