ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.08k stars 17.64k forks source link

ADSB/Avoidance Issues: Plane enable, incorrect nomenclature #12750

Open Hwurzburg opened 5 years ago

Hwurzburg commented 5 years ago

@peterbarker @tridge @rmackay9 ...I am trying to understand a few ADSB/Object Avoidance things in order to better document, as well as make sure there are desireable user controls on its enabling by RC option switches...I have spoken to Tridge and Randy some, but am afraid that I may be still confused

my current understanding: -there are basically two types of avoidance triggers: ADSB and Rangefinder -once triggered, until the threat is passed, the current flight mode is changed (change allowed only with limitations) to "AVOID_ADSB", a guided one (other actions possible in this mode) to avoid, then returned to previous mode after threat is passed

The enabling params are: ADSB_ENABLE param: enables collection of targets via adsb receiver AVD_ENABLE param: enables/disables entry into the avoidance mode (I think currently mis-labeled as AVOID_ADSB in modes, since I believe it forces the avoidance actions for ADSB or Object, ie Rangefinders), and is incorrectly described in flight mode params

vehicle.adsb.enable() returns ADSB_ENABLE param value vehicle.avoidance.enable() returns value of AVD_ENABLE param vehicle.avoidance_adsb.enable() /.disable() enables/disables entry into "AVOID_ADSB" modes from ADSB triggers vehicle.proximity_avoidance.enable (bool) is used for enabling/disabling entry for rangefinders triggers.

if my understanding is correct, I need to do the following:

  1. correctly describe the AVOID_ADSB mode in the wiki for the vehicles and I understand we can't correct the name without screwing up something (is this correct?)
  2. change the name of the Copter RC option to ADSB Avoidance enable/disable (PR issued)
  3. Add a mavlink mesage to RC option change to say ADSB or Proximity Avoidance Enabled, Disabled, or "No avoidance mode has been set" with switch changes for each RC option, for user notification like some other RC option switches have...I think its important the user knows he disabled or enabled such a significant behavior changer..
  4. Add an ADSB Avoidance enable/disable to Plane for an RC option, since none exists currently...

if the above is correct, I will create the PRs in code and wiki, otherwise, please educate me....thanks

Platform [x ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

peterbarker commented 5 years ago

On Sat, 2 Nov 2019, Henry Wurzburg wrote:

my current understanding: -there are basically two types of avoidance triggers: ADSB and Rangefinder

Actually, there are essentially two entirely separate avoidance schemes used in ArduPilot, traditionally "macro" and "micro".

ADSB is the only real trigger for macro avoidance, 'though you can also trigger based on mavlink vehicle position messages IIRC. We'll probably also add AIS in for this. Rangefinders are unused in "macro" avoidance mode.

Micro avoidance takes data from a lot of places - Proximity sensors, fences, rangefinders, ....

Plane only does "macro" avoidance at this point. Copter, Rover and Sub can all do micro-avoidance too. Tracker does neither :-)

-once triggered, until the threat is passed, the current flight mode is changed (change allowed only with limitations) to a guided one to avoid, then returned to previous mode after threat is passed

This is true of the "macro" avoidance stuff. "micro" avoidance just tries to steer around things in the current mode.

The enabling params are: ADSB_ENABLE param: enables collection of targets via adsb receiver AVD_ENABLE param: enables/disables entry into the avoidance mode (I think currently mis-labeled as AVOID_ADSB in modes, since I believe it forces the guided avoidance mode for ADSB or Object, ie Rangefinders), and is incorrectly described in flight mode params

AvoidADSB is a mode used by Copter to handle the macro avoidance. Plane may get one eventually, how it's been restructired.

if the above is correct, I will create the PRs in code and wiki, otherwise, please educate me....thanks

I think we might need to clear up the distinction between the two avoidance regimes before we attach your other issues in here. Additionally, I'm not sure if we've now added code into the micro-avoidance stuff for ADSB vehicles (via the OA Database stuff). @MagicRub?

Hwurzburg commented 5 years ago

I think Plane already has the AVOID_ADSB mode....

IamPete1 commented 3 years ago

@Hwurzburg is this resolved?

peterbarker commented 4 days ago

Ping @Hwurzburg - NeedAnswer