Hi guys!!!

I would like to program the APM 2.0 and integrate these 6 sensors for obstacle avoidance. 

Has anybody done that?? Any hints on how to do this??

Views: 2231

Replies to This Discussion

Ok...thanks for that...do you also want to implement obstacle avoidance? How may sensors do you intend to use?

I would love to get this working.

That said, I would really love to get it working using video. Maybe OpenCV? But, I am sure Sonar would work just fine, I'm just personally interested in computer vision and analyzing live video on the fly.

I am currently working on this. First implementation for 4 sensors(front,back,right,left) is done, hardware is set up. I am right now looking for a safe way of testing this (At the moment I am trying to get a simulation working), because I am afraid of testing in RL with my copter...

thats fantastic Chris... did you use another arduino board along with the ardupilot mega for intigrating the sensors?

Is there any chance you could explain how you implemented the four sensors into the code, I am trying to incorporate it with using the mission planner 1.2.36.  We are trying to use sonar sensors as obstacle avoidance, in an actual flying environment, not as a simulation.  We are not afraid to crash our copter if you could help us, we could test it for you.

Thats realy fantastic new Chris!

I was just wondering nothing hear about this new function being done or any new information was out?

It's been done :)

Muahh! very interesting!

Is there possibly a video in action? Is there any detailed information about code and shema.

OK, these are always the standard question. :)


Used another Ardu, commanded via Wifi, using EtherCat protocol, was about 5 months ago, non shared project.


We have since tested other sensor systems, currently flying with SICK TOF Tim5XX prototype, giving us a full 270 deg point cloud, at 15M


Sonic worked, but it was only a first step. This is a private research project, for a very specific need, and so it's up to the client what / when to share.


Just thought I would show it works, you need to develop code to determine good / bad signals, pulse the sensors (they can't run free, too much interference), determine shape, and command a path. This is WAY to much to add to Ardu based APM, so you will need a second system / board, and then command the APM however you want.

(About 4000 lines of code ATM)


We found it easy to just control the APM through the PPM RC signals, that way development can continue in APM without concern about adding your code links.


Current flying with PixHawk,  as well now, via my new Coax frame type

Considering I'm really the only one working on it, it's coming along quickly :)




Hey Dan, we followed the same approach , controlling the drone using sum ppm signals.

Love your sensor array! Do you not find that the sonar's interfere with each other and only one can be ranged at any one time? We automatically range our sonars one after the other and found that at 4m the ping time is about 50ms which can slow down everything quite a lot.

We also found that with all of the propwash and frame noise, the maxbotic sonar sensor rated at 7m is only effective up to about 2m . did you find the same?

You can pulse more then one (we pulsed 4), and prop wash given the above example was no issue.

However the program that managed noise vs true signal, with PWM control, and comm's, went beyond a Arduino. We use a Windows CE board now, because it is easy to program, stupid fast, and I don't need to look at Linux doc's for a week just to do something simple :)

Sonic is a good start, but it has limits. We used TOF camera's now, much like what Intel made public recently, only ours is a real product, not just a demo.

Hello sir, if u kindly send me your codes and design of attaching this sensors coz i am working in such project too.



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service