Geofence file cannot be saved

Hello,

I am unable to save geofence from mission planner. I have attached the error notification as an image. Can someone help to fix it or suggest a workaround?

Thank you.

Those are mission waypoints, not fence items. Take a look at here.

Thanks Mustafa for your reply.
My geofence does not work too. Also, do you have any idea why my config page is empty?


I think there is a bug with saving fences. I can’t try to replicate it right now, but I recall having some trouble not long ago and ended up doing some manual text editing to get the files to behave.

Your config screen is empty because there’s nothing to configure. There’s no autopilot connected.

Thanks Yuri. I see.
Would you be able to send me an example of your .fen file, so that I can manually replicate it?

Ideally I would need to set

  1. FENCE_POLYGON_VERTEX_INCLUSION
  2. FENCE_POLYGON_VERTEX_EXCLUSION
  3. FENCE_CIRCLE_EXCLUSION
  4. FENCE_RETURN_POINT

Much appreciated.

I can’t replicate the bug you’re experiencing, but I did create the attached FENCE file for you as a reference.

fence_test.txt (850 Bytes)

Rather, the bug I encounter is that the saved file always contains a home waypoint, which, when read back to Mission Planner, results in an UNKNOWN fence point at the beginning of the series. To avoid it, you must remove the home waypoint from the saved file and then renumber starting with 0. @Michael_Oborne, this behavior is repeatable and has been present for several months, at a minimum.

Hi Yuri,

Isn’t this a waypoint file and not a fence file?

They are the same format.

The config page is empty because you are not connected to a vehicle.

change to “fence” mode before loading the file

The behavior I described above occurs in FENCE mode.

I just reproduced it again. The two exclusion fences were the only waypoints when the file was saved. When loaded back into Mission Planner (in FENCE mode), an UNKNOWN waypoint with the home waypoint coordinates populates the first fence position.

are you using MP beta?

Yes, I am. In fact, I just did another beta update to be 100% sure, and the behavior is identical (Windows 64 bit). Steps to reproduce:

  1. Open Mission Planner
  2. Navigate to the PLAN screen
  3. Select “FENCE” mode
  4. Create any number of fence waypoints
  5. Click “Save File” and save the resulting file
  6. Right click the map and select “Clear Mission”
  7. Click “Load File” and select the previously saved file

To use my suggested workaround:

  1. Open the saved file in a text editor
  2. Delete waypoint 0 (line 2)
  3. Renumber all subsequent waypoints in order starting with a zero index (left-most field in each line)
  4. Load the edited file as before

An easier workaround is to load the file, click on the x at the first unknown line to delete it and then write it to the vehicle.
But I just created PR which fix this. Hope it will be merged soon.

1 Like