Impossible to setup a Polygon GeoFence with Mission PLanner

Hi,
I was looking to test the new geofence polygon feature but I’m facing some issue. I think the issue is from Mission Planner side. I’m opening this discussion before opening a ticket for resolution.

I followed this explanation plage: http://ardupilot.org/copter/docs/polygon_fence.html

I have the same issue with ArduCopter V3.4 Pixhawk and with SITL 3.5-dev version.
I tried with 3 versions of MP: last beta (help->upgrade beta: 1.3.41.3), 1.3.39 and 1.3.41 (msi install).

If I want to setup the GeoFence, I go to Config tab, GeoFence and I have only Alt/Circle mode available as per image:

The trouble also is that if I have FENCE_MODE = 7 in the copter it will change it to 3 without saying it.

I can set FENCE_MODE = 7 using mavproxy, I can set the GeoFence with the polygone from MP (Upload). Doing that all simulation in SITL works.

Looks like the list of FENCE_MODE used by MP is limited to 0 to 3 as we can see in the description column (Got 7 after refreshing data and mavrpoxy to 7)

Is it a bug or I’m missing a basic step/configuration to do ?

Everything else work very well :wink:

I can do any test needed to investigate. I have even compiled on my machine a MP with visual studio.

1 Like

Some first findings:
ardupilot code (complete list):
libraries/AC_Fence/AC_Fence.cpp: // @Values: 0:None,1:Altitude,2:Circle,3:Altitude and Circle,4:Polygon,5:Altitude and Polygon,6:Circle and Polygon,7:All

mission planner code (limited list as per GUI):
ParameterMetaDataBackup.xml: 0:None,1:Altitude,2:Circle,3:Altitude and Circle

interesting enough no such info in ParameterMetaData.xml

please try

control-f > param gen, wait for it to finish

reload MP.

and check again.

let me know how it goes

You got it !!! Thanks a lot.
Did it in Beta MP with SITL and on 1.3.41 MP with SITL and both are ok now :wink:

.