Hi guys, im using this type of sensor. Thankfully i able to work using my ardupilot mega(apm). I be able to find out which pin can be used for this sensors. I need to adds on my project.
I would like to know how to move the motor. So that when the my quadcopter is the air, the sensor enable help the quadcopter for obstacle avoidance. When one of the sensor is near to avoidance, one of the motor will move the higher speed so that is move away from avoidance or wall.
Is there code for this programe? Or any code like move the motor?
You might be able to tack in a short segment that will modify the angle setpoint for the attitude PID whenever the sensor goes high.
But as far as getting the quad to remember the obstical is there, that's a little more into the AI realm of programming.
In stead of moving the motor directly, you should probably adjust the roll or pitch appropriately. Then let the attitude control take care of firing the motors appropriately to achieve the required roll or pitch.
Jose did this originally a long long time ago on his mini quads using the same sensor (I think) as you're using. I then integrated the code into arducopterNG but it's not in ACM but will likely be addedback at some point in the future.
im using the code of range finder. i forget where i upload it cause its long time ago. im trying to edit it so that i get wat i wan for my project to work.
I wan to know is it that not all code in range finder are used for obstacle avoidance? Only certain part of the code are used for avoidance am i right?
Can u guys help me to go through this project? I wan to make sure it able to work.
Thank u guys
In the AP_RangeFinder class you will find that it only provides a distance. The code for obstacle avoidance should be in the main code. There's a couple of other people who wanted to implement obstacle avoidance so maybe you could team up with one of them?
Here is on of those blog posts.
i already reply but still no one help me
mayb u can help me? pls....
hmm...well...I can try and talk you through it but I hope you have some programming experience and spend some time trying to understand the ACM code.
First thing you should do is try and get the AP_RangeFinder example sketch working for the sharp distance sensor.
If you've downloaded the code correctly from git and set-up your arduino preferences correctly you should see the example sketch in the arduino ide under file, examples, AP_RangeFinder, AP_RangeFinder_test.
you can see line 18 needs to be uncommented (and line 19 should be commented out) to start using the sharp sensor.
where can i get the ap_rangefinder sketch?
cause now im using thequadmini 1 29 rangefinder. im not using all the code in there. im just some codes tat need to use for my ir sensor.
i just using the filter functions, position control. is there any other thing need to upload to improve my code. i wan the motor interact wif the ir sensor. like the obstacle avoidance
i dont intend to use tat kind of huge code. im now using the code from this websites
Im just using the ir distance code for my sensor to work.
now im going add on some code from rangefinder to my original code. so that the motor from the quadcopter will move when one of the sensor is the near the obstacles. im trying to find out how to make the motor move and also make the motor more power than the other motor so tat is does not crash on the wall.
like te one in the video
do u still there?
i was waiting this few days for ur help. u didnt answer. i really hope u get to help me in this project
I won't be able to help you with that version of the code I'm afraid. It's a very old version and any investment of time I made in it would not contribute to the main code base which everyone else is working on.
Sorry, I can't be of more help.
is there anyone else able to help me?
i really need to sove my problems