I set up a geofence with zero minimum altitude and 60 meters max altitude. I fly in manual mode and when I break the fence, the ground station (mission planner) says something like “Geofence breach”. But the plane continues to fly under my control well past the geofence boundary.
I was expecting the Pixhawk to take full control of the plane and fly it back in to legal territory to the geofence return point that I had set.
I have set the channel 6 switch such that it is sending PWM 1900 (above the 1750 threshold) to enable the fence
Also when I power on the pixhawk on the ground right in the middle of the geofence boundary, the mission planner says I have a geofence breach even though i am clearly within the boundary. This tends to go away after takeoff. in general, as I fly in and out of the fence boundary, it sometimes takes ten seconds to clear the big red letters “Geo Fence Breach” (on mission planner) after I get back into legal territory.
I did more testing today. I have confirmed that when the geofench is breached, the plane goes into guided mode. It does, in fact, head back to the "geofence return location if you neutralize the transmitter sticks. What is confusing me is that the primary flight functions (aileron and elevator) continue to work from the transmitter in this guided mode. I expected them to be inoperative. Does anyone know if this is by design? It seems like if the intent is to guarantee the plane returns to within the legal boundary, the APM should take complete control of everything.
I personally would consider it a huge problem for the controller to remove my ability to fly the plane in manual mode under any circumstances. It would be fine in an automated mode but not manual. You should be able to switch to manual to overcome firmware bugs etc.
Agreed. But the documentation says that geo-fencing can be combined with any mode including manual. Here’s the quote:
"Geo-fencing can be combined with any APM flight mode. So for a raw beginner, you would combine it with one of the stabilised flight modes (such as STABILIZE or FBWA). Once the pilot has gained some confidence you could combine it with MANUAL mode, which gives direct control of the plane and allows for the most interesting aerobatic manoeuvres. When used in this way the APM stays out of your way completely, just passing the controls to the servos directly, and only takes control if you go outside the fenced area or outside the defined altitude range.
I’m going to test some of the autonomous modes later today - starting with FBWA. I’ll post the results of my testing.
Here’s what I have learned. When the geofence is breached, the plane goes into GUIDED mode. You can see this on the ground station (mission planner). But in guided mode, the sticks will still work, so if you want, you can still force the plane outside the geofence boundary. This is not what I expected, but this behavior is working OK. I may experiment with parameter “STICK_MIXING 0”. I’m not certain at all, but the documentation on this parameter indicates that setting to zero may totally disable the sticks when in the auto modes.