Servers by jDrones

New Loiter testing


(brandon macdougall) #24

Ok I think I see what’s going on looks like the compass is not happy. odd that old loiter works fine.

Duration 0:02:10
Vehicletype ArduCopter
Firmware Version V3.6.0-rc1
Firmware Hash d575d5e9
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = FAIL - FAIL: Large compass offset params (X:-22.94, Y:-451.41, Z:-216.07)
FAIL: Large compass offset in MAG data (X:-22.00, Y:-451.00, Z:-216.00)
Large change in mag_field (40.22%)
Max mag field length (633.56) > recommended (550.00)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = GOOD -
Test: IMU Mismatch = GOOD - (Mismatch: 0.39, WARN: 0.75, FAIL: 1.50)
Test: Motor Balance = GOOD - Motor channel averages = [1437, 1420, 1425, 1436]
Average motor output = 1429
Difference between min and max motor averages = 17
Test: NaNs = GOOD -
Test: OpticalFlow = FAIL - FAIL: no optical flow data

Test: Parameters = FAIL - ‘THR_MIN’ not found
Test: PM = GOOD -
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = UNKNOWN - No CURR log data


(Leonard Hall) #25

Yes, the toilet bowling is not an issue with Loiter so we can’t do much about that in this thread. I am not aware of any changes in that area of the code.

Are there any issues with the Loiter control?


(brandon macdougall) #26

No new Loiter moves well under the sticks but it not holding well in position after upgrade. I did a recalibration and will do more tests. Old loiter did hold extremely well. I also noticed the Barometer is giving some odd altitude readings when on the ground not moving in the HUD but I live on a hillside. I will do more hardware tunning to see if I can get a better lock.https://www.dropbox.com/s/xp48p7wssa407n1/GPS-New.mp4?dl=0


(Leonard Hall) #27

Randy and I were just talking and it may be possible that the new loiter is a little more aggressive in it’s external disturbance correction and this may be showing a compass offset more than old loiter.

Maybe you could do two back to back tests one with the old firmware and one with the new. Try to do the same flight profile then land.

Thanks for your help.


(brandon macdougall) #28

Sure happy to. Thanks again for all you guys hard work!


(brandon macdougall) #29

Right last night I did a new Compass calibration and now the craft sticks better Recommend compass calibration with new firmware if people have issues. The craft still has a little movement in lock but way better. I still showing a compass error in the logs in 3.6:

Compass = FAIL - FAIL: Large compass offset params (X:92.38, Y:-491.12, Z:-380.92)
FAIL: Large compass offset in MAG data (X:92.00, Y:-491.00, Z:-380.00)
Large change in mag_field (37.11%)

I do a compare in 3.5 next.

Thanks.
https://www.dropbox.com/s/1poxaphd3izpx0w/New-GPSR001.mp4?dl=0


(Chris Olson) #30

Works fine here with the defaults. Even a piro, swinging the GPS/compass unit in a good 2 foot circle at ~180deg/sec, doesn’t affect it much.


(ppoirier) #31

OMG @Leonardthall The new Loiter with OpticalFlow is soooooo much FUN !!!
Its fast and agile on the sticks, and rock solid when I let it fly no inputs.
Please note that these test are made indoor with no GPS attached, just PX4FLOW and a TFMINI Lidar.

Here is the Y axis of OpticalFlow and PX4Flow IMU and Pixracer IMU
The amplitude is equivalent to the manual alignment tilt&roll test like in the OpticalFlow wiki, but this time it is inflight !!


(Leonard Hall) #32

Great feedback thanks!!

Good to hear that it is working with OpticalFlow too!!!

That has put a smile on my face for the day.


(brandon macdougall) #33

(Leonard Hall) #34

Hey, I just had a thought.

Did you do a proper level where you took off in no wind and made sure your aircraft is properly level?

Do you have a log for the flight in the video?


(brandon macdougall) #35

Yes see link sorry I did not separate the logs. Log link shows chronology the issue in relationship of how I boot up the FC with the last log booting connected via usb then battery to MP showing the normal flight. I can reproduce the issue but I could be a simple hardware issue that ChibOS seems to amplitude. A few of the issues on this build is I using a custom cable to power up the FC and am using a old Pixhawk power sensor. Wondering if I reversed the voltage sensors I did see a voltage reading that was abnormal. I ordered a new FC and power from mRo so I can compare the two soon. Quad was within level I say within 15 degrees or less. I hope this is the place to post this if not feel free to move or delete.

https://www.dropbox.com/preview/BRANDON/Pixhawk/mRo-Chi.rar?role=personal


(Leonard Hall) #36

I don’t think we are talking about the same thing but just in case. When calibrating level you need to be more like 1 degree or less. You can do a flying calibration where you hover in zero wind and get a perfect level.


(brandon macdougall) #37

Sorry I thought you were responding to a something else I am on the wrong thread. Time for glasses soon.

Yes always level. I blast out of the grass tilted at times once landed without issues normally. Note: I happy with loitor way more fun to fly well done.


(ppoirier) #38

@Leonardthall for those who might think that OpticalFlow Outdoor is useless, here is a demo of the agility of of this mode with the new loiter == F-U-N


( .) #39

When Skyviper finally gets these things to market, they’re going to kick all the other cheap toys out with this level of stability in them. Their sensors may not be as good outside (i don’t know their capes), but in terms of indoor stability, they will kick all the other toys out of the room. This OpticalFlow add to the AP code is pretty fantastic to see making it into products. I know OF isn’t exactly “new” but it’ll be new on the shelves at WalMart.

It’s great seeing how it can really augment stability outdoors as well, especially near the ground were GPS multi-pathing might be more likely (with trees and buildings around).

I wonder, I know the EKF takes multiple sources into consideration, but (and this was talked about in another thread), but does (should) it be changing the weighting dynamically based on HDOP and OF sensor performance? Then it would allow it to shift between GPS stability control (up high with goo dHDOP) and OF stability control, down low flying through a forest, automatically.


(Corrado Steri) #40

Hello, just tested new loiter today, like it very much.

I would like to tweak it a bit to make it more to my tastes, is there any documentation avail to each parameter of the new braking part? or maybe i can use regular braking documentation?

Corrado


(rmackay9) #41

Corrado,

Txs for testing. We haven’t updated the Loiter wiki docs yet but I’ve added a to-do item so we don’t forget to.


(Leonard Hall) #42

I would suggest tuning loiter by recording the lean angle at the maximum speed you want loiter to travel.
Set LOIT_ANG_MAX and LOIT_SPEED to those two values.

Then set LOIT_BRK_ACCEL to define how much extra breaking you want to see when you let go of the sticks.

And the LOIT_BRK_DELAY to define how long after you let the sticks go the extra breaking kicks in. This is there so you can fly around slowly without the aircraft constantly trying to break.

If you find that the breaking increases too rapidly when it kicks in (after LOIT_BRK_DELAY) then you can reduce the LOIT_BRK_JERK.

You can also increase or decrease the maximum correction acceleration that the aircraft will use as it removes position errors using LOIT_ACC_MAX. Lower values will make these corrections more subtle but also less aggressive.

I hope this helps.


Indoor position controller tuning
(Corrado Steri) #43

It helps A LOT, thank you, will play with those, thanks again.

Corrado