RTL,SmartRTL or Land Not Working When Fence Breached

Copter not doing RTL,smartRTL or Land when we breached range.
ArduCopter version 4.3.2

Copter completed 1 waypoint and after that I change it into loiter mode then I flew copter just outside fence. It shows warning " Fence Breached " , and changes its mode to RTL or smartRTL but it could not able to move from that position, even after change mode to RTL or smartRTL manually.
I added breach point also, still not working.

FENCE_ACTION https://ardupilot.org/copter/docs/parameters.html#fence-action-fence-action: 1

FENCE_ENABLE https://ardupilot.org/copter/docs/parameters.html#fence-parameters: 1

FENCE_TYPEhttps://ardupilot.org/copter/docs/parameters.html#fence-type-fence-type : 7

OA_TYPE https://ardupilot.org/copter/docs/parameters.html#oa-type-object-avoidance-path-planning-algorithm-to-use: 1

AVOID_ENABLE https://ardupilot.org/copter/docs/parameters.html#avoid-enable-avoidance-control-enable-disable: 0

And if we set OA_TYPE to 3 and do same above procedure, then it is showing warning/error message " Dijkstra could not find path " and stuck on current position.

Share a .bin log file from that flight. Might be something else going on.

Also let us know what kind of flight controller you’re using.

You might be able to use Stabilise mode or even AltHold to return to the inside of the Fence.
I dont understand how you ended up outside the Fence though…

When I tested recently I found:
In Loiter mode I could NOT make it do an RTL or breach just by pushing against the fence radius or altitude. I just could not exceed the fence boundary.

In AltHold mode I could breach the fence radius which caused RTL, but could NOT breach Altitude.

In Stabilise mode I could breach altitude and radius, which initiated RTL in each case.

A .bin log would be handy

1 Like

@xfacta @Allister
I am using sitl for simulation.
Here I am sharing simulation video and binary log.

BIN- https://app.box.com/s/531cgu6ktdugqjo181two4tc4sbzmhi2

Recording - https://app.box.com/s/te8ytuegauaiypkw9xm7iugwidv48sci

0:18 - Started guided mode.

0:53 - Triggering loiter mode manually.

1:08 - Fence breached and RTL mode triggered automatically.

1:24 - Copter stuck near fence and throw error " Dijkstra could not found path ".

1:47 - Triggering loiter mode and moved copter inside fence.

2:14 - Triggering RTL mode manually and started successfully.

2:55 - Landed successfully.

It’s like you started from within an Exclusion fence (polygon) then could not get back into that area once you left it.

Yess. I have to do loiter to get back in fence and then RTL.

This section of your log seems to indicate that you properly uploaded an inclusion fence. I think “98” is the flag for that. When I run a similar mission with an exclusion fence, that field changes to “97.”

FNCE, 87470831, 4, 0, 98, -35.3626232, 149.1641152, 4, 0
FNCE, 87470831, 4, 1, 98, -35.3624672, 149.1655441, 4, 0
FNCE, 87470831, 4, 2, 98, -35.3636083, 149.1655926, 4, 0
FNCE, 87470831, 4, 3, 98, -35.3637642, 149.1642427, 4, 0

The behavior you got was definitely indicative of an exclusion fence, however.