Closed tiriad closed 5 years ago
Do you have a blackbox log?
Do you have a blackbox log?
Not this time, the next time I'm gonna try to get a blackbox in flight another day.
You are engaging FS with a switch, right? Long time ago I remember it didn't work for me either, however when engaged by switching off the transmitter it worked as it should. Since then I simply no longer have FS on a switch and I test it by switching off the transmitter. Did you use the switch-FS on previous versions?
You are engaging FS with a switch, right? Long time ago I remember it didn't work for me either, however when engaged by switching off the transmitter it worked as it should. Since then I simply no longer have FS on a switch and I test it by switching off the transmitter. Did you use the switch-FS on previous versions?
Yes, I have it placed in a stick and I use the failsafe as RTH, since version 2.0 I had it like this and it has always worked for me. FS fails both ways from stick or no radio signal. https://youtu.be/glNb3gESNPY
I was able to try something else and I think it only happens in acro mode, in angle it doesn't happen and only with acro an the FailSafe mode, however if I activate the RTH mode from a stick it works correctly. Could it be that it doesn´t force to use the angle mode when you activate the failsafe rth?. Seeing the data in the blackbox log when I activate the FailSafe and it fails me the phase 3 appears, failsafe phase landed, and when I quit it, failsafe phase idle, it could be a failure on the phases of the failsafe probably that are not the ones that correspond
If you have the log. Please post it @tirad
If you have the log. Please post it @tirad
@giacomo892
Here's to see if we can get something clear
LOG: https://1drv.ms/t/s!ApZg0bgutSkzglD4iJ5DL1KGcofK
From second 17 to 50 the failsafe fails
Here's the various state transitions from the log:
inav_modes.rb /t/inav-contrib/logfs.TXT
logfs.TXT: INAV 2.1.0 (7bdd5967e) OMNIBUSF4V3
Iteration Time(s) Elapsed(s) State
0 26.4 ( 0.0) nav_state_undefined (0)
14304 33.7 ( 7.4) nav_state_poshold_3d_in_progress (7)
14528 33.9 ( 7.5) nav_state_idle (1)
30179 41.9 ( 15.6) F/S=RETURN_TO_HOME (1500,1501,1500,1371);(1,1)
30179 41.9 ( 15.6) nav_state_rth_head_home (10)
70228 62.7 ( 36.3) nav_state_emergency_landing_in_progress (23)
72130 63.6 ( 37.3) F/S=IDLE (1500,1568,1500,1372);(1,1)
72130 63.6 ( 37.3) nav_state_idle (1)
78900 67.1 ( 40.8) F/S=RETURN_TO_HOME (1500,1500,1497,1434);(1,1)
78900 67.1 ( 40.8) nav_state_rth_head_home (10)
93996 74.9 ( 48.6) F/S=IDLE (1500,1567,1500,1435);(1,1)
93996 74.9 ( 48.6) nav_state_idle (1)
97888 77.0 ( 50.6) nav_state_rth_head_home (10)
124000 90.5 ( 64.1) nav_state_idle (1)
157472 107.7 ( 81.4) F/S=RETURN_TO_HOME (1500,1501,1500,1402);(1,1)
157472 107.7 ( 81.4) nav_state_rth_head_home (10)
195687 127.5 ( 101.2) F/S=IDLE (1500,1552,1500,1401);(1,1)
195687 127.5 ( 101.2) nav_state_idle (1)
238409 149.6 ( 123.2) F/S=RETURN_TO_HOME (1500,1501,1499,1431);(1,1)
238409 149.6 ( 123.2) nav_state_rth_head_home (10)
256489 158.9 ( 132.5) F/S=IDLE (1499,1567,1500,1430);(1,1)
256489 158.9 ( 132.5) nav_state_idle (1)
274464 168.2 ( 141.8) nav_state_rth_head_home (10)
291904 177.2 ( 150.8) nav_state_idle (1)
315183 189.2 ( 162.8) F/S=RETURN_TO_HOME (1499,1500,1500,1407);(1,1)
315183 189.2 ( 162.8) nav_state_rth_head_home (10)
352433 208.5 ( 182.1) F/S=IDLE (1500,1551,1500,1406);(1,1)
352433 208.5 ( 182.1) nav_state_idle (1)
484340 276.5 ( 250.2) end of log
Disarmed by: SWITCH
And, for what it's worth, is a graphical reconstruction, https://youtu.be/CW4pCPLEYks . The mwp compass anomaly checker is conservative and naïve; however, were it my machine, I'd want to understand why it is kicking in (maybe the machine is being flown sideways?).
This looks like a classic compass issue. Before engaging in long-range flights where you might need RTH, make sure POSHOLD is reliably working with quad facing all directions.
A simplest flight test is to enable POSHOLD and slowly (over a timespan of a minute) do a 360 yaw. Quad should maintain it's position steadily regardless of heading. If it's not - it's a compass issue - either calibration or interference.
Sorry to disagree, poshold works, return to home works, failsafe makes mistakes, take a look at the videos carefully, the response that gives me interference is the easiest way to explain it, when I active failsafe it turns to my but the quad is static, another thing that happens is that if I activate any assisted mode, subsequently the failsafe works relatively well
@tiriad I found some weird data in the log, but it's not detailed enough. I've located the most likely place where error manifests and built a 2.1.0-RC2 + some verbose debug
so we can collect more information.
inav_2.1.0_OMNIBUSF4V3.hex.zip
Please flash it, set set debug_mode = GENERIC
and try catching the bug in the logs again. This time we'll collect much more information from the velocity controller which I believe is misbehaving. TIA
I have a solid theory on what was happening:
Sequence of events:
POSHOLD
NAV_CRUISE_BRAKING_BOOST
stateBB[stateFlags]
field is 8 bit while NAV_CRUISE_BRAKING_BOOST
is bit 13 (https://github.com/iNavFlight/inav/issues/4333)
b) BB[flightModeFlags]
is 32 bit, but BOXBRAKING
is bit 36 (not so trivial to fix)POSHOLD
FLIGHT_MODE(FAILSAFE_MODE)
, so braking controller doesn't get called and never gets the chance to reset NAV_CRUISE_BRAKING_BOOST
(https://github.com/iNavFlight/inav/blob/development/src/main/navigation/navigation.c#L2729-L2731)braking_boost_speed_threshold
, boostFactor
is ZERO (https://github.com/iNavFlight/inav/blob/development/src/main/navigation/navigation_multicopter.c#L422-L432)
b) Our roll/pitch response is dampend as we decelerate towards braking_boost_speed_threshold
c) The whole thing balances out at a steady rate of 2.4m/s away from home (with wind)FLIGHT_MODE(FAILSAFE_MODE)
when we enter navigation controller
a) Braking mode controller finally is called and gets a chance to disengage NAV_CRUISE_BRAKING_BOOST
@digitalentity the explanation makes all the sense and I was able to check it and is especially dangerous when you are in mc braking mode and there is failsafe. I collected new data, first of all I flash the verbose debug version , and I have captured the bug in two cases, one when there is a flyaway in failsafe, related with this case #4228: https://1drv.ms/t/s!ApZg0bgutSkzglKm2tDn35Xq8-II At seconds 70, 173, 290
Another when in failsafe the quad stands still: https://1drv.ms/t/s!ApZg0bgutSkzglHqw8Q4iDCtdUQQ At seconds 28, 155, 185, 229
Next time I'll try the version with fixed code
I have tested the new version with the fixed code and I have not found any bad behavior in poshold mode combined with mc braking mode and failsafe so we can consider this problem fixed. Congratulations for the quick localization of the bug and its correction, good work
Current Behavior
After continuing to test version 2.1 RC2 continued to experience problems in the RTH, the steps to follow to reproduce the error are, armed and flight start in ANGLE, ACRO (manual mode), run the FS-RTH and fail. As seen in the video the arrow pointing home is always pointing in the right direction. Subsequently active the POSHOLD works correctly and to start FS-RTH works perfectly, attached DVR video. I think its correction is important before the final version before goes out if there really is a bug.
<img src="http://img.youtube.com/vi/kEFMnTI74Zs/0.jpg" alt="FS" width="240" height="180" border="10" /> https://youtu.be/kEFMnTI74Zs
DIFF https://pastebin.com/Tdp2ZsqX
https://youtu.be/glNb3gESNPY
------
Another day another flight
https://youtu.be/_LV5jqjGSzI
LOG: https://1drv.ms/t/s!ApZg0bgutSkzglD4iJ5DL1KGcofK