I have used sonar in the past on quads to help maintain altitude during auto flights, loiter, and land mode. Some colleagues of mine want to try to use sonar not for altitude corrections but rather obstacle avoidance like the functionality of the optical flow sensor. I believe that the code in ArduCopter V3.0.1 does not support sonar in such an application, and that to do this it would require additions to the ArduCopter V3.0.1 firmware. My question is; is my line of thinking correct, and how involved would such changes to the APM's code would this require?
Thanks in advance,
Can't be done, no room in APM, PIX maybe.
See my other posts for a picture of a sonar set up. The code to pulse the sensors, determine good data from bad, and command the quad, gets long and very involved,
With APM, I had to add another Arduino, but it does work (very well in fact).
Good luck :)
Bump, with Pixhawk here, and with great sensors like LIDAR-Lite, Pixy (CMUcam5) and PX4Flow, Other Maxbotix sonars, etc.. time to kick off a project for sensor integration.. lets call it .... drum roll.... "Project Dodgem" ;)
I searched through your posts to find the info on the sonar setup but was unable to locate it.
I have an APM 2.6 with a quadcopter setup and I am trying to do some basic obstacle avoidance such as turning a pre-planned direction once an obstacle is detected. I have some sonar sensors but am considering using optical flow as well.
I have successfully run 5 sonars on my quadcopter using the NEWPING library on arduinomega 2560 board. Can any body help me how to integrate my arduinomega 2560 with APM 2.8 so that the quadcopter would react accordingly. I think that this can be done using telemetry radio and a PPM encoder but I need the code for integrating the system. I am actually trying to implement obstacle avoidance.
The following code can be used for obstacle avoidance:
|left = analogRead(A0);|
|right = analogRead(A1);|
|front = analogRead(A2);|
|back = analogRead(A3);|
This post, back in late 2013 early 2014, was intended to probe the challenges involved with engineering and designing a quad, that would be flying fully autonomously beyond line of sight in the Swiss Alps, that could see and avoid obstacles that where unknown to the flight planner. Since then my involvement in the project, QuadForge (http://www.quadforge.net/), has declined to a minimum and the project has moved in other directions.
Consequentially, I have not made progress into such endeavors as obstacle avoidance. I am however very interested in terrain following with Lidar (such as seen here: http://diydrones.com/profiles/blogs/terrain-following-missions-usin...) or with sonar for applications within open pit mines and quarries and intend to develop a system for it in the near future for my newest employment and to begin a discussion on this topic as well.