Moderator

On my last flight today (quadcopter with APM2 running v2.9), at one point quite close to me I saw my quad do an uncommanded yaw, climb and start flying toward me. Looking at the tlog later I see it went into RTL but I was in Stabilize at the time and did not switch to RTL!

My Rx is set to go to ~920ms for failsafe but the logs show CH3/THR as normal so no failsafe?

I have 6 modes setup on my Tx via 2 switches, mode 6 is RTL (1877ms), mode 1 & 2 are Stabilize (1074ms & 1274ms), when I realised something was amiss I switched from STB2 to STB1 and it switched out of RTL and back into Stabilize as shown on the attached kmz file, then it flew normally and I landed with no problem.

So why on earth did it do an uncommanded switch to RTL?

Did it detect some kind of failsafe error? If so what?

2013-01-27 08-36-52.tlog

2013-01-27 11-53 28.log

2013-01-27 11-53 28.kmz

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

Join diydrones

Email me when people reply –

Replies

  • where would i delete the failsafe ch 3 function. i have ardurover and wen i turn off receiver output 3 throttle turns on and stays on. im jusy wondering where i wd change that in the code?
  • Damn I should have looked at this thread earlier...

    expensive mistake.

  • Yesterday I tested RTL on my Hex (APM2, 2.9). I've posted a short video clip on YouTube at https://www.youtube.com/watch?v=Y3HT64dc7bk  titled A Sane and Safe First Test Flight of RTL on a Hexacopter . Maybe it and in particular the written description will help some folks here who have more experience at the bench and on the computer than in the air.

  • Developer

    Ok, I've found the issue and fixed it in the 2.9 branch and I will be pushing out a 2.9.1 release as soon as we can get it through testing.

     

    The problem is in arducopter.pde's read_radio function.  The value passed back from APM_RC.get_last_update() is the time the last radio frame arrived.  It's possible for that frame to arrive right in the middle of when the line below is being executed and if we're really unlucky it's possible for us to be just crossing the boundary of one millisecond to the next.  In this case the result of the millis() call can be one less than the result from the APM_RC.get_last_update() call.  This makes the result a small number - big number = -ve number.  Because time is an unsigned int, it overflows to a very big number.  So the APM ends up thinking it hasn't received a radio packet in 49 days.

    // turn on throttle failsafe if no update from ppm encoder for 2 seconds
    if ((millis() - APM_RC.get_last_update() >= RADIO_FS_TIMEOUT_MS) && g.failsafe_throttle && motors.armed() && !ap.failsafe) {
            Log_Write_Error(ERROR_SUBSYSTEM_RADIO, ERROR_CODE_RADIO_LATE_FRAME);
            set_failsafe(true);
    }

     

    It's just bad luck if these things all happen at the same time.  I don't think you can protect against it.

    Sorry for the troubles and anxiety over this.

  • Developer

    Graham,

         If you look in your dataflash logs, at line 64965 you had a short lived ppm encoder failure it seems.  That means that the APM believes that it did not receive an update from the ppm encoder for 2 seconds.  Did you notice any loss of control just before it switched into RTL?

        I notice that you have a lot of logging turned on (both RAW and MOTOR messages in particular).  Turning on this much logging does cause performance issues in fact, it's very clear from the PM (performance monitoring) message that 25% of the main loops are running over their alloted time of 10ms.  I strongly suspect with all that logging on your main loop is running well below 100hz.  I don't have any reason to believe this would cause the apparently ppm encoder failure but I strongly recommend you reduce the logging unless you're actively investigating an issue with the motors or gyros/accels.

  • Same happen to me twice. The attached tlog happened on about 95 % , I flew to around 30 meter height with position hold(but on screen show unknown) mode, it changed to RTL by itself(the ch5-in was still at posisition mode) and climbed up to 180 m , it scared me so I changed it to stabilized mode and descended to ground. My RF receiver is Frysky with telemetry , my Frsky TX LCD panel showed rssi normally.

     

     

    2013-01-27 16-30-37.tlog

    https://storage.ning.com/topology/rest/1.0/file/get/3692603404?profile=original
  • Same happened to me today.

    Here is my tlog (accidentally I hited the clear logs button so I only have telemetry file).

    I was trimming channels 1 and 2 so I could then use save trim on channel 7 after landing.

    While hovering, RTL went on without my command and quad started to go away (notice that I only armed quad after 3d fix).

    I only was able to bring quad back because I switched channel 5 to alt hold and regained control.

    After looking for mission planner I noticed that I didn't set home location and the quad was actually going in the direction of the default home location (Gulf of Guinea - Africa). It acted like na RTH (Return To Home), not an RTL (Return To Launch).

    Hope we find some answers here.

    Regards,

    Miguel

     

    2013-01-26 15-59-42.tlog

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @DanielChiaJH: @a1k0n @diyrobocars @circuitlaunch And here's the final showdown! Video courtesy of @chr1sa I think I was a little faste…
1 hour ago
DIY Robocars via Twitter
RT @DanielChiaJH: @a1k0n @armand_dpl @SmallpixelCar @diyrobocars @circuitlaunch I use @foxglovedev Foxglove Studio for my visualization nee…
1 hour ago
DIY Robocars via Twitter
1 hour ago
DIY Robocars via Twitter
RT @a1k0n: @DanielChiaJH @diyrobocars @circuitlaunch Here's my car's view of that race. About 8.4 second lap times for laps 2 and 3... both…
Monday
DIY Robocars via Twitter
RT @DanielChiaJH: Great racing against @a1k0n today at @diyrobocars! Pretty cool to both break sun-9s at the track today I think I got very…
Sunday
DIY Robocars via Twitter
Broadcasting the @circuitlaunch race live now at https://m.twitch.tv/diyrobocars Races begin around 2:00pm PT
Saturday
DIY Robocars via Twitter
RT @a1k0n: ran a huge number of hyperparameter tuning experiments yesterday; now I can train a new policy, far with better quality, in 15 m…
Saturday
DIY Robocars via Twitter
RT @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Sep 26
DIY Robocars via Twitter
Sep 24
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…
Sep 24
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…
Sep 24
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…
Sep 23
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…
Sep 22
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
More…