Change fence_enable during mission

Hello, for a mission with my boats I need to disable or enable the fence during the mission (in order to move from a zone to another)

On the simulator I can do it with the plane but not for the rover, although the command is supposed to be available according to the documentation. The command do_fence_enable is not in the scrolling menu…

Thank you for your help.

Hi @jeanbat,

Thanks for the report. I’ve added an enhancement request for Mission Planner here. It’s not difficult to add but until then it should be possible to use MP’s “UNKNOWN” command.

1 Like

Hi, thank you I will try that.
by the way, is it possible to see where are rally points during the edit of the fences?

I tested a simulation but I don’t understand this bad behavior :

my mission is :
1 - disable fence
2 - reach the first WP
3 - enable fence
4 - delay
5 - disable fence
6 - reach next zone
etc…

but during the test, it worked well until the first delay, and then it switched to rtl mode, and not to the near rally point? why?

Hi @jeanbat,

Re seeing the rally points during editing of the fences, there’s a PR being reviewed here that allows them to be seen at the same time. I’ve put a comment on that PR to show that this has been requested in this thread too.

@jeanbat,

So I guess the question is, when it breached the fence and switch to RTL, why did it then travel home instead of to the nearest rally point?

… or maybe the question is why did it trigger a fence breach when it was inside a fence? By default, being outside any inclusion fence is a breach but maybe you’re expecting that it should only be a breach if the vehicle is outside all inclusion fences. I’m sure we added support for this difference. @peterbarker do you remember this issue?

BTW, our Rally point wiki page is here.

Not only that, it’s not supposed to switch to rtl at this point (after reached wp 2 and during delay)

Looks like it keep the memory of the fence breach even if I manually disable fences before start the mission.

Ok, i tested with plane and the behavior if different : with plane it seems to work like expected, but not with boat.

anyway, after a rtl the vehicle don’t want to switch to auto mode again, so maybe it’s not the good way to do this kind of mission…

Hi @jeanbat,

I’ve added this to our 4.5 issues list so it won’t be forgotten.

I’ve looked into this and only Plane supports multiple separated inclusion fences. There is a WIP change to extend this to Copter and Rover but it is more complex because Copters and Rovers may also stop at the fence meaning changes are required to Avoidance code as well.

So I think this has become an enhancement request so I’ll take it off the 4.5 issues list (e.g. it’s not a bug)