Servers by jDrones

Dynamic keep out fence implementation

I understand from the wiki here that keep out polygons are defined and stored in a similar way to waypoint missions.

Has anyone delved into the code?

In a scenario where you have two copters flying at once I am wondering if it is possible to dynamically update the keep out zone such that copter B is sent keep out zones that relate to the location of copter A and visa versa. Neither aircraft will therefore fly into the space occupied by the other.

The generation of these polygons could be done on the ground and then uploaded at 2-3hz giving a reasonable safety bubble to prevent collision of the two copters.

My question is not “can such code be written” but more, will the arducopter code cope with regular updating of keep out polygons during flight and behave in a logical way?

I would be looking at getting this to work in Auto or Guided modes.

Has anyone tried this?

There is a message to send distance measurements to the autopilot: DISTANCE_SENSOR
By sending this message from a companion computer to the autopilot you can implement a pseudo rangefinder.
You can implement some algorithm to get other vehicles positions and movements and estimate if they are at the course that vehicle flying through.
If they are potentially hazard to the vehicle, you can send distance message to the autopilot.
I could not be able to estimate the performance of this kind of system (because the avoidance algorithm is for stationary obstacles) but it is worth trying.
I will work on something like that when I have some spare time.
https://ardupilot.org/dev/docs/code-overview-object-avoidance.html#providing-distance-sensor-messages-to-ardupilot
https://ardupilot.org/dev/docs/code-overview-object-avoidance.html#providing-distance-sensor-messages-to-ardupilot
I don’t know if whether the avoidance function is supported or not modes other than LOITER and GUIDED.

You’re probably after the ADSB_VEHICLE-based avoidance code instead.

1 Like

Thanks, I will have a look at that code too!

Servers by jDrones