Loiter Not Work

Hey folks,

I have an APM2.5 running on a SK450 with whatever the latest version of arducopter firmware is. Using a ublox gps and 900mhz radio telemetry modules with 2.4 for rc control.

In stabilize mode the quad works great. I fly up to about 5m altitude switch on loiter and then it behaves erratically, flies sideways, down tips and crashes. Done this twice.

I though loiter was meant to 'lock' the quad in position and only move with inputs from me.

Anyone got any ideas - i think the hardware - escs, motors, all the acceloromters, gyros, gps etc seem to be working fine in stabliize - so it must be something else?

Thanks so much for any help.

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

Join diydrones

Email me when people reply –


      • Ok so here goes what i have found out:

        The hdop is 1.7 - which is meant to be fine.

        The GPS says it has 9 satellites. 

        The altitude when i am on the ground says -800 or other random values.

        I looked through those setup videos and have done everything except compassmot, but unless the compass makes it flip upside down and crash i doubt its that. I have logged the vibrations and they seem close the the targets but sometimes they go over - for example +3 for the X,Y sometimes goes up to +5. The big spikes in the log every few minutes is probably me landing the quad then taking off again.

        To me, the GPS seems totally not working - the altitude is always so wrong and when the quad is just sitting on the ground the altitude just changes randomly by hundreds of meters.


        • Finnius, yes, you are JUST within the limits of what is considered acceptable, but without the logs no one else can check for you.

          which tag are you looking at? There are:

          CTUN: BarAlt - the altitude from the barometer

          GPS: Alt - the altitude from the GPS, i am pretty sure this is unused by arducopter

          GPS: RelAlt - THIS is the altitude which your copter is using to navigate

          If you're flipping sideways, its going to be the gyros you care about, not the accelerometers. 

          • I thought i just posted the log of my x,y,z for others to look at. Is that right? In terms of the different altitude readings - where are those altitudes logged - in the IMU log?

            Also the altitude i am saying that changes massively is the altitude displayed by default on the flight data screen in mission planner.

            Thanks for your help.

      • Try with my blog

        My first quadcopter

        take a look at II/ Vibration Damping for xtPilot

      • Hi Finnius,

        you should check your GPS, watch how many sattellite it received?

        You also try to make quad work well in altitude hold. in my case, altitude hold can work well as about 1m @@ lolz, very well,huh?

        I also tested loiter mode too. it worked perfect in the strong wind although my stabilize doesn't work very well, slugging so much!

        Look at your GPS, make sure GPS fix. and one more problem, vibration is the most important one that you need to eliminate it. make sure that your vibration is between -3 and 3 for AccX, AccY and -5 and -15 for AccZ. below is my measure (my case is -1 and  -> it's damn good):



  • Can you post a picture of your rig?

  • I read up on vibration interference. However wouldn't too many vibrations also affect stabilize? Because stabilize is perfect, i can get it hovering without going anywhere.

    Also i cant do anything else really to limit vibrations, as when i built the quad to limit vibrations the APM is mounted on foam tape corners, then on foam rubber block then in foam tape corners again. If vibrations are getting through i cant think of a way to stop them.

    • as far as i understand it, stabilize is only attempting to maintain the stick input you are giving. thrust is maintained based on throttle. pitch / yaw / roll are based on stick position (no input keeps copter flat). changing those stick inputs results in movement, but really the copter is just tilting and changing which way the force from the props is pointed.

      In any automatically controlled mode, such as loiter, the controller and its internal measurement unit are trying to actively maintain roll, pitch, yaw, and altitude. altitude is calculated first via accelerometers, and compensated via barometer and gps. excess vibrations make the copter 'see' movement that isn't happening, and its attempt at compensating leads to wonky behavior. 

      in order to get the whole picture, i think you'll need to enable IMU logging. http://copter.ardupilot.com/wiki/downloading-and-analyzing-data-log...

      as far as minimizing vibration, i dunno. i've just got my apm sitting on sticky foam, and i definitely have some loiter drift.

This reply was deleted.


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
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…
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…
Nov 25
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