Hi everyone,

I had a geofence problem yesterday that resulted in a flyaway and the loss of an aircraft. I'd be grateful for any help identifying what I did wrong. I just moved across the US, and started my first flying day by creating a new geofence polygon around my new flying area. I added the geofence return point and uploaded to my APM 2.6 running ArduPlane. The polygon turned pink and it looked like everything was configured, but when I switched on the geofence on the ground using my transmitter, Mission Planner immediately indicated a fence breach. To troubleshoot, I tried downloading the geofence from the APM to ensure it matched what I had just uploaded. The new polygon I'd created vanished. I spent the next 20 minutes trying to get the new geofence to upload without success. At one point I scrolled back down to my original state of Alabama, and an old geofence was still showing up. I couldn't figure out how to clear or replace it.

Eventually I gave up on the geofence and decided to fly without it. I just had a short test planned with an AUTO takeoff and a few waypoints, followed by a MANUAL return. Immediately after takeoff, I realized my mistake: I'd forgotten to disable FENCE_AUTOENABLE. The geofence immediately activated, the aircraft detected a fence breach, and it set out on a 2000+ mile journey back to a return point in Alabama. I tried to switch back to MANUAL, but the fence continued to operate and the aircraft wouldn't leave GUIDED mode. I was hoping the aircraft would switch to GLIDE when the radio link was lost and the throttle failsafe activated. However, Mission Planner indicated FAILSAFE for several seconds before I lost the telemetry link, and there was no reduction in throttle. So again, I'm guessing that the geofence handling trumps the throttle failsafe? This was a very confusing experience because I haven't seen a hierarchy of failsafes.

So here are my specific questions:

1) What was I doing wrong trying to upload the geofence? Why wouldn't the new one take?

2) Can anyone help me understand the sequence of events once I launched in AUTO? Am I understanding events correctly?

3) Is there anything I could have done to regain control of the aircraft once the fence breach was indicated?

Many thanks,

Mark

RELEVANT PARAMETERS:

FENCE_ACTION 1
FENCE_AUTOENABLE 1
FENCE_CHANNEL 5
FENCE_MAXALT 122
FENCE_MINALT 0
FENCE_RET_RALLY 0
FENCE_RETALT 50
FENCE_TOTAL 6

FS_LONG_ACTN 2
FS_LONG_TIMEOUT 20
FS_SHORT_ACTN 2
FS_SHORT_TIMEOUT 1.5

Flyaway params.txt

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • For the benefit of anyone who might encounter this thread in the future, I've gained some important insights into the failsafe hierarchy:

    I've been continuing to review my flyaway logs, run bench tests, and review the source code. I have a pretty good idea of what happened. The bottom line is that the geofence response does indeed trump failsafe mode. The failsafe only triggers one time in ArduPlane, changing the flight mode in accordance with user-specified parameters. In my case, the failsafe should have triggered a zero-throttle FBWA. But the goefence check continues to run every 2.5 seconds, even after the fence is breached. If the fence is breached and the aircraft is not in GUIDED mode, ArduPlane switches the mode back to GUIDED. So while there may have been a brief moment when the plane handled the throttle failafe, it was quickly overruled by the geofence handler.

    I still have no idea why I couldn't get my new geofence to load. I can upload and download them with no problems on an alternate APM, so am convinced there was a bug somewhere. I probably should have reinstalled the firmware when I couldn't get the new geofence to upload.

This reply was deleted.

Activity

DIY Robocars via Twitter
yesterday
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
yesterday
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
yesterday
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Friday
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Thursday
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー https://t.co/1Qq2zOeftG
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track https://t.co/RtLb7TcgIJ
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car https://t.co/AEu2hCx89T
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race https://www.youtube.com/watch?v=ZMaf031U8jg
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16
More…