Issues in object avoidance

Hello all,

While I tested the object avoidance, I noticed that there are two issues. I am not sure whether these are known problems or not. Just in case, I would like to share the issues in here.

  1. if the drone is flying near from a circular fence (exclusion type), the drone keeps denying TYPE_MISSION command.
    You might reproduce this issue as following:
    (0) ./Tools/autotest/sim_vehicle.py -v ArduCopter -f tri --console -w
    (1) param set AVOID_ENABLE 7
    (2) param set AVOID_BEHAVE 0
    (3) param set FENCE_ENABLE 1
    (4) take off
    (5) fly to a place near from the fence
    (6) drone denies the TYPE_MISSION command.


  1. if the drone is flying near from a circular fence (exclusion type), fence is breached though the drone is still outside of the fence.

You might reproduce this issue as following:
(0) ./Tools/autotest/sim_vehicle.py -v ArduCopter -f tri --console -w
(1) param set AVOID_ENABLE 0
(2) param set AVOID_BEHAVE 0
(3) take off
(4) fly to a place near from the fence
(5) param set FENCE_ENABLE 1
(6) drone does not accept TYPE_MISSION
(7) param set FENCE_ENABLE 0
(8) execute TYPE_MISSION command
(9) param set FENCE_ENABLE 1
(10) fence breached
(11) vehicle is in RTL


Test version: 99a0f5a86a
Log: https://drive.google.com/drive/folders/155K-h6CM7uAGwadmYzm5DN8QJHzIFuK6?usp=sharing

@KimHyungSub,

I haven’t checked the logs yet but I guess that you might be providing position targets while in guided mode and these targets are within the exclusion fence. Is this possible?

It looks like from the screen shots above that the mission does cross the circular fence which would explain why it triggers RTL

Sorry if I’m missing something but perhaps explain in more detail what seems unusual?

By the way, I think we may actually represent circular fences as a 6 or 8 point polygon when using Dijkstra’s avoidance but I don’t think this is related to what you’re seeing.

@rmackay9 Thanks for your feedback!
First, the mission did not cross the fence. The drone was passing the circular fence when it was in RTL.
Second, the targets are outside of the exclusion fence.

I am sorry if I misunderstand the fence and object avoidance. But, I feel the following two things as unusual:

  1. At the first screen shoot, when the drone is near from the fence, the drone cannot execute the position target where is in outside of the fence.

  2. At the second screen shoot, the drone triggered fence fail-safe even though the drone was in outside of the fence. Then, the drone was crossing the circular fence.

@KimHyungSub,

I wonder if perhaps you’ve breached not the exclusion circular fence but perhaps the cylindrical fence around home? by default the FENCE_RADIUS is set to 150m.

1 Like

@rmackay9
Ah! I got it. When I assigned 10,000 to FENCE_RADIUS, I could not reproduce the issues! I didn’t know the cylindrical fence around home. Thanks!

1 Like

Ok great that it’s resolved. We’ve got a few enhancement requests for Mission Planner to display the circular fence (https://github.com/ArduPilot/MissionPlanner/issues/456). I know you’re using QGC but…

1 Like

@rmackay9
I have seen the requests on MissionPlanner. Thanks!
It will be nice if MissionPlanner displays the circular fence!

1 Like