Why not allow switch from LOITER mode to FLIP mode?

I've checked the code (AC 3.3.2) and found it is only supported that switch to FLIP mode when in ACRO, STABILIZE and ALT_HOLD mode before, 

because of this "if" statement in bool flip_init(bool) function in file control_flip.cpp:

if (control_mode != ACRO && control_mode != STABILIZE && control_mode != ALT_HOLD) {
return false;
}

I want to test switch from LOITER to FLIP and then restore back to LOITER, before I test, can somebody tell me the risks in it?

Thanks!

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

Join diydrones

Email me when people reply –

Replies

  • Unless you change the code it won't do anything.

    I set up a friends tri-copter to use flip mode, and it has to be done from alt-hold (he only had alt hold, pos hold and pos hold with super simple mode) as trying it from pos hold resulted in nothing at all happening.

    I suspect the same result if you try it from any mode other than acro, stabilize or alt hold.

    • Yes. I tried it from LOITER, which seems flip better with nothing worse happened.

  • The modes listed are ones that do NOT use GPS data. Trying to "flip" in loiter can be bad as it will cause EKF issues and positioning issues which will likely cause your craft to head back to china or worse.

    It would be like the worst GPS glitch in history I imagine.

    • Thank you!

      But the "bad" thing you describe will never happen, because the craft is always in China with me.

      • That's one of the funniest replies I've seen on this forum. :)

        I would guess that the devs put that check in there for a reason. Given the big altitude change, it might be an issue with the barometer along with what Craig mentioned.

        If you do try this, please post back with results.

        • I'm always in the mood to watch a good crash video. But in this case I'd feel sorry for him as I am pretty sure a crash would be the result. 

          • I changed the code to allow the mode switch from LOITER to FLIP, and test it outdoors. It seems like the copter flips better than the original version.

  • I could be wrong, but it might be a safety feature that's preventing you switching from Loiter to FLIP mode. However, it should work from another mode such as Stabilize...

This reply was deleted.

Activity

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
yesterday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Thursday
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…