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
15 hours ago
DIY Robocars via Twitter
16 hours ago
DIY Drones via Twitter
yesterday
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
yesterday
DIY Robocars via Twitter
yesterday
David Hori liked Isabella Domi's profile
Wednesday
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Monday
DIY Robocars via Twitter
RT @chr1sa: New car designs coming for our next @DIYRobocars @donkey_car virtual race on the 23rd. Choose any one you want at race time Le…
Monday
DIY Robocars via Twitter
RT @RoboticMasters: Thanks to @EllerbachMaxime and the Sydney Uni Capstone Students the @donkey_car @diyrobocars simulator is getting a ma…
Monday
DIY Robocars via Twitter
Jan 6
DIY Robocars via Twitter
Dec 28, 2020
DIY Robocars via Twitter
An interesting line-following simulator to use with with your robocars: https://github.com/ron-grant/LFS
Dec 23, 2020
DIY Robocars via Twitter
Dec 23, 2020
DIY Robocars via Twitter
An improved version of the @IntelAIResearch OpenBot: https://diyrobocars.com/2020/12/14/an-improved-version-of-the-intel-openbot/
Dec 14, 2020
DIY Drones via Twitter
An improved version of the Intel OpenBot https://ift.tt/2KkHT8Q
Dec 14, 2020
DIY Robocars via Twitter
Dec 10, 2020
More…