Loiter not working

 

Hello,

I finally assembled my second Gaui 330xs with APM and GPS(I broke the GPS on the first one without getting a chance to test it :( ), and I'm having issues with the loiter flight mode. The 330 flies pretty stable in STABLIZE mode except for the occasional wind induced wobble(need to look into the PIDs there), but loiter mode seems to do nothing. I have a good GPS lock and I've checked the GPS values though the CLI and downloaded the logs(attached below). I needed some subtrim to keep things under control and understand that this would keep fighting the GPS hold but the same behavior occurred when I removed subtrim and waited for things to get stable before enabling loiter mode.

 

Any idea what's going on? Does this behavior mean that I need to tweak the NAV_LOITER PIDs? Any recommendations about direction of change for each?

 

 

The board is running the latest code as of a couple of hours ago.

 

 

logs.zip

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

Join diydrones

Email me when people reply –

Replies

  • 1) Did you have to reload the code with Arduino to get the channel 7 rest to work? I looked at the code(2.0.23) and the trim_accel() function is commented out so I assume this is what you did. I just want to make sure before playing around with arduino(for the first time!)

    > Yes, I did what you described. Uncommented the trim_accell(). I think Jason will make this available in the next release without having to recompile.

     

    2)Did you solder in the gyro filters as suggested in the manual and the "Arducopter Drift issue" thread? Is that maybe the reason things are working?

    > Yes, I did, However, my LOITER was taking effect before I did this as well.

    3)What version of the code are you using?

    > Also using 2.0.23.

    4) Do you mind sending me your PID settings file to compare?

    > I am currently default PID from the code with Sonar disabled (Just Baro right now).

     

    Gains
    ----------------------------------------
    Acro:
    roll:
    P: 0.19, I:0.00, D:0.00, IMAX:2000
    pitch:
    P: 0.19, I:0.00, D:0.00, IMAX:2000
    yaw:
    P: 0.13, I:0.00, D:0.00, IMAX:0

    Stabilize:
    roll:
    P: 0.54, I:0.03, D:0.12, IMAX:50
    pitch:
    P: 0.54, I:0.03, D:0.12, IMAX:50
    yaw:
    P: 0.40, I:0.01, D:0.08, IMAX:100
    Nav:
    lat:
    P: 2.50, I:0.08, D:0.03, IMAX:2000
    long:
    P: 2.50, I:0.08, D:0.03, IMAX:2000
    baro throttle:
    P: 0.20, I:0.02, D:0.06, IMAX:30
    sonar throttle:
    P: 0.35, I:0.05, D:0.30, IMAX:30

  • Hi Ihab,

     

    I am also using a 330xs frame, esc and motors.I have very little wobbly with the default PID, but do see a little as you described. Went out flying yesterday and have tried Altitude Hold and LOITER for a bit. Altitude with the Sonar off works ok with a little oscillation, with Sonar on, It does start keep rising eventually when it transitions from Sonar to Baro.

    LOITER works ok too, i definitely see the GPS stabilization kick in. It hovers in a 5m by 5m area (winds where pretty gusty).

     For the trims, after a full reset, I flew it stable in STABILIZE mode using radio trims, then engage Channel 7 for > 2seconds which writes the offsets into the EPROM. After that you can remove the Radio trims. I also started trying AUTO Mode using the GCS. AUTO_TAKEOFF (while very aggressive climbing), LOITER_UNLIMITED works. Today will start with playing the the waypoint Navigation.

     

    Are you sure the flight mode is switching to LOITER ? Try using the HK GCS. it shows the flight mode switching if you have XBEES for telemetry otherwise just try it with a USB cable and telemetry on serial port 0.

     

    Would be interested if you any success on further improving  PID's for the 330xs frame

     

    cheers,

     

    Ollie.

     

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…