Primitive obstacle avoidance for Auto mode

primitive system of evasion of obstacles for autonomous mode for copter.
I have always wondered why there is not a consensual way for an obstacle evasion system in automatic mode.
There are some solutions to this problem in the market but,
I find it curious to explain a simple way to do it with a routine of evasion of obstacles.

The drone when it is navigating in automatic mode, and detects an obstacle, must change from mode to loiter, and manage its direction conveniently in this case backward by 45 degrees, until the obstacle is within a reasonable distance, after this change for the previous mode of flight in which it was found either auto or rtl.
In a different position the drone will try to go back to its waypoint, but when reaching a minimum distance with the obstacle, the routine starts again …
this with the purpose of going bordering safely the object in question …

IMG_8357

This model presents some limitations of course, but given its simplicity, it is a cheap thing to implement.

For those who analyze this geometrically find that if the line of union between the front drone and the waypoint forms an angle greater than 45 degrees, the drone will enter an infinite loop, but nothing bad will happen because the failsafe would enter battery. . :slight_smile:

However I think I can say that for the largest part of the cases this would work correctly
and with a 95% positive chance of avoiding a tree in the middle of a field where a rectangular road is being made for fumigation or fertilization with drones.

even activating the normal mode of RTL if it is with a building should be able of bordering it without problems …

When the opportunity is given I will test this in the flight field and we will see the video … until now the evasion of obstacles in automatic mode will have to wait with more sophisticated solutions

What is your opinion?

i did something similar to this but more basic a few time ago, modificating the YMFC_AL of joop brokking drone code… you can see more or less the concept worked but only in stabilice mode :slight_smile:
https://www.youtube.com/watch?v=aceS76Kifbk

2 Likes

How can i implement this method in mission planer. I just want to stop quadcopter when detects obstacle in auto mode. My controller is amp 2.8.

Obstacle avoidance is not supported in Auto mode currently in Arducopter and it’s not actively being worked on as of FEB19

hello, a very simple solution is to put an arduino between the rc receiver and the signal input of the apm, intervening the signal of channel 5, when the adrduino detects an obstacle the pwm signal is modified by overwriting the output value of arduino to a value of channel 5 that is interpreted as Loiter for example

receiver ch(MODE FLIGT)—> ARDUINO—> APM

 UTRASONIC SENSOR ------->|

Or maybe when scripting functionality is implemented it could be done on the FC. But not on an old APM.

@autodidacta have you seen this blog ?

to be honest with you no, but the truth is that this is great

1 Like

I think @Ferrosan is still active on this forum

1 Like

i just chek that, ad its was very well explained by him, if you are interesed , i have another thin
similar to this: