-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Position Hold and Navigation issue #1402
Comments
I'm glad you mentioned #431, as i's a canonical example of how to diagnose, fix and demonstrate as fixed such problems. In particular:
All the above contributing to a discussion that led to a collaborative and successful analysis as a direct result of rigorous log collection and repeatable test cases facilitating the elimination of false trails before we reached the correct outcome after, iirc, 23 days --- probably the longest continual bug hunt we've had. Bottom line: We need evidence. |
Exact same experience with an Afromini on older firmware 1.3 and ublox 7 - this was a test bed and was perfect for a few weeks when built. After a 4 week layup it started exhibiting this fault again no logs but I will say the movements are quite fast and can be controlled (fast as in quicker than nav speed) I would often test machines by physically dragging out of position hold and the machine would fly back to position much slower than exhibited above so that would indicate to me something more that intermittent gps data, it is certainly not vibration induced for me anyway, |
On the same exact day (20 minutes before) with another battery I had something like >10 minutes continous position hold with a nice breeze and the quad was solid at it's place. |
My best guess without logs is GPS hardware or coverage issue. |
@Redshifft @giacomo892 please record logs of your issues - troubleshooting by video is next to impossible. |
@digitalentity , @giacomo892 asked me to contribute to this issue, we all have the lack of ports issue for logging i'm assuming. The test would be to let it go and see where it stops (if it stops) :) like I say anything more than small position changes need to be filtered in PH - the mystery is why this fault only started happening and never a hint of the problem before, and I test stuff like you would not believe ;) @giacomo892 Did yours just start doing this having been ok previously |
I always had this issue since I'm using INAV. (I started since 1.5.1). I also do a lot of tests. Even tested the GPS alone on the bench leaving it on for many hours and it seemed to work. I tried to leave it alone during the issue and you can see result in the video. At first it seemed like a normal behaviour on WP overshot (I never seen an overshoot before to be clear) but then it started to go around the final WP point at speed. Even worse when I switched back to position hold, at that point it started to fly away at navigation speed. @digitalentity I've ordered and SPI microsd slot 4 months ago... haven't yet received it... If I receive it I can solder a openlog blackbox. It's strage issue because if you disable pos hold and you enable it again it works as far I can tell. The very first time I had this issue on a very windy day and I tough my quad could hold the wind. It started to fly away on position hold. I panicked and disabled it and recovered manually the quad. About the coverage: The very first happened in a place were I had "only" 12 satellites but now happened with 18-19 in view without any obstacle as you can see from the video. There aren't pratically any interferences in that place. No power wires, no base stations and so on. It could be due GPS outputting bad positions but as I said there aren't logged GPS errors and position hold works if you immediately disable and enable it again. I could try maybe a self compiled version with glitch detection enabled that increments GPS error count in case of a glitch so I can easily monitor it from ezgui without the needing of a blackbox. But @digitalentity already told me that glitch detection isn't very tuned. If you can provide better glitch radius and acc parameters I can try it in order to check is the GPS is sending crazy positions. |
Similar problem with my quad. Displayed speed in OSD disappears for 6 or 7 video frames then a coordinate jump around 30m and speed 246km/h. Inav responds with very fast correction in poshold. Happend after 9 minutes flighttime with Inav 1.6.1 |
Could maybe switching to INAV computed GPS speed (from lat and lon change) instead of using the GPS module one fix this issue? |
@Feldsalat yes as your osd display a high speed departure from PH. It would seem (GPS) fault that triggers the wild reaction - If the GPS only sent good solid data (which is unlikely) we possibly would not see this issue but there is more to it as fortunately my Micro iNAV quad (Afromini F1 ublox7) does not exhibit this problem, and this has had lots of Flying. The difference is it has "Stronnag special" fw (stripped out with Blheli passthrough and Frsky telemetry added) Also a better Power supply for the board with a nice capacitor across the regulator. |
I've enabled glitch detection logic using built-in parameters by decomenting line 638 in navigation_pos_estimator.c
and also adding gpsStats.errors++ around line 382. This should let us easily without blackbox if glitch detection logic fired up by simply checking GPS errors with phone/configurator after landing.
I've build the firmware using gcc-arm-none-eabi-6_2-2016q4. I hope this is the correct compiler. GPS works but I cannot fly until this weekend. If someone want to try it I think it will be totally fine since those are the only modifications. Download Link: Edit: I left the board near a windows for some hours and glitch detection counter has increased: (i'm using an ublox 7M now) https://dl.dropboxusercontent.com/u/18187764/gps%20errors.png |
I had the same behaviour in the past and tracked it down to a malfunctioning compass. It did about the same as in the video, first passing waypoint, spiral around it, then flying away. |
I'll check the compass from sensors tab when I land if the problem happens again. |
Probably not going to help if it's a transient issue caused by power related mag interference. Hence the frequent requests for a bb log. |
Yes, you are right. But if the mag issue is transient it should not trash the whole PH. |
Right, I have just put some fw on the problem test Quad that has been no problem on something else. I might be able to test tonight if it does not rain. |
@Redshifft have you had time to fly my firmware? That's the real question. Maybe it receives wrong coordinates or speed from the GPS module. |
Ok, had about 6 flights 90% in PH and a couple of RTH, the wind and gusts were about the limit for iNAV and the 250 Quad, no problems encountered - Hardware was not touched in any shape or form from before and original configuration just copied across, down to you software boys to figure out now ;) |
@Redshifft pardon, what software modification have you done ? |
I said previously, my mate "software" compiled me a stripped out build. |
So without any code modifications? Just stripped out things? Can you list them please. |
I've crashed my F450. |
@giacomo892 What does that mean ? what fw ? |
I have no idea why it crashed. Some minutes before I did lot of yawing to check if mag was working and the position hold was working. |
Flip = motor |
I've tried to takeoff immediately after the crash and the copter stays in the air. I'll try yours soon. |
@Redshifft I've flashed your firmware. If the weather allows i'll try to fly it today. Have you tried mine if you still have PH issues? Do you all have experience of esc+motor that fails randomly in air but works right after? I've HobbyWing Xrotor 20A ESC. Should I put BLHELI on them? |
@giacomo892 mag data can't screw roll/pitch data and cause a flip. This is most likely hardware issue caused by one of the following:
|
@giacomo892 The weather has turned to crap for a few days here :( @digitalentity can you Just confirm in PH the max nav speed in all directions? I have some ideas but await @giacomo892 results first. |
So, just to recap, we have now a "randomly" stripped down INAV 1.3 firmware which is bug free. |
The only changes, afaik in a 1.4 pre-release build was to remove some standard features and add in some non-standard. No other code changes. Just a placebo. |
Maybe I should try building 1.6.1 with the same feature set and try to fly it. It should have:
Correct me if the feature set should be different. |
What's all this random and placebo stuff ? :D |
I can check the features later. |
@giacomo892 main/src/target/Naze/target.h, near end of file: |
andre92 Thanks. I use it sometimes to check ESCs but I want to include it just to have the most similar firmware to the modified 1.3 |
I've compiled the firmware as I said earlier. I've used gcc-arm-none-eabi-6_2-2016q4 :
inav_1.6.1_NAZE_minimal.hex.zip The firmware size went from default 127676 bytes to 118400 bytes. Here are target and common modified and commented files. I'm unable to fly till the next weekend. So if someone can try this before me it will be awesome. |
Did you do as you said ? |
@Redshifft I've attached common.h and target.h if you want to check. |
LOL, I did what's all this Mac stuff :) |
Holy cow. Compression Utility leaves some files inside zip :) Ignore them |
I flew F1 (FLIP32) 1.6.3 on my half rebuilt 420mm quad. Somewhat unsatisfactory as it was completely untuned (just copied a CLI dump from a 250 onto it), and due to the rebuild, the mag was closer to the power than I'd like. Regardless it works (for me). After about 12 minutes of entirely OK POSHOLD (no flyaways, no crashes), bit bouncy due to the lack of tune, but in the same place POSHOLD, I went to do something less tedious. |
HI all. I'm building a DIY serial openlog blackbox so I can connect it to the official 1.6.1 and let you all see what is going on. I hope it will work ok and so I will finally post some logs here. Even if I don't get a flyaway we should see strange things happening when in POS HOLD. I just miss a level converter between SD and Arduino and I should ready to go. On sunday there will be rain here, so I hope I'll have time to set it up for saturday. Beside that, anyone has flown the stripped 1.6.1? @stronnag I'm glad you don't have the issue but trust me, it's somewhere hiding there. EDIT: Perfect! My soldering iron broke down. I hope I can find a new one today. |
Yay! I've flown with the blackbox! i've setted 1/32 logging ratio and using cleanflight explorer I still have some corruption? Or maybe the SD CARD is not fast enough. I'm using 250000 as baudrate so that should not be a problem. I had no flyaway today and all worked really well. Can you take a look in the logs and say me if they are ok or not? Thanks |
I replayed the logs in mwp, looks normal (just like I'd expect for iNav on a supported FC); at least for the amount of time I'm prepared to watch a replay of PH. So what's all this fuss about? btw. You do know the two LOG files are identical? btw, btw: You should use the iNav Explorer (or mwp for pretty geospatial display) |
Ok. Blackbox explorer show weird data. |
Rate is OK for general navigation debug, if you can identify a specific problem, then a higher rate would help. |
Are they 100% identical? If so it could be an issue with upload If the log is ok I double the rate. It should not be a problem. |
100% the same. I didn't look at the whole log, but random bits looked ok in INav Explorer |
Really strange since the file size are different. How can they be identical? |
Seems I can download the same file under two names. Strange indeed. |
btw: https://github.com/iNavFlight/blackbox-log-viewer We need to update some links ... |
Sorry for "spamming " the issue . Btw. Yesterday I did almost 25 minutes of GPS holding including moving in GPS cruise. No flyaways. Now that I have a blackbox ( I've configured it to log 1/2) and it just drops some loops every now and then I'm ready to chase the bug more than ever. |
I recorded a GPS glitch on blackbox on the 5th flight. You can notice the position jumps many meters far away from the quadcopter after it took off and other many succesful flights in the past weeks. While the quad was still glitching and GPS position was converging to the right position I enabled GPS HOLD and visually it felt very unsure on holding position but without any weird accelerations and fly aways. After some seconds I disabled the HOLD and renabled it again without any flyaways. After landing I tried another flights and they worked well as you can see. Now imagine what can happen if the position jumps while the GPS HOLD is on. Can you get some useful info from the log to prevent this? EDIT: It glitched also on the first part of the 6th flight but the position quickly converged to the correct one and the it flew well. Viewing this log can be nice to see: |
This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. |
Automatically closing as inactive. |
Hi. I've already wrote about this issue in the forum and no, unluckly, I do not have a blackbox log but a video. I'm posting here just because a better analysis could maybe fix the issue and cause i've found a previous similar issue that is now declared as closed. (#431)
First of all. Setup.
1.6.1 NAZE. F450 QUADX. UBLOX M8N,HMC5883,BMP280,MPU6050.
And the conf diff:
Basically I had some other times when the quad was in position hold and magically started to drift away (fast!) like @xdigyx reported in #431 "Today I had a situation when at pos hold mode my hexacopter rapidly started to fly away. "
So maybe the fact that this time happened during a mission (and at the final stage = position hold) urged me to post this issue since there maybe something left from that issue.
I've checked for I2C errors and GPS errors after landing and they were at zero, so I assume all the sensors were working.
More, I did another flight without rebooting the FC also in position hold, even fully yawing the multi to check for mag issues, and it held correctly without toilet bowling. (an issue I never had before to be clear)
Here is the video on what happened https://www.youtube.com/watch?v=_kv2N9qdhfc
I've annotated the video , please check it using desktop version of youtube.
The text was updated successfully, but these errors were encountered: