iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.08k stars 1.46k forks source link

INAV 7.1 equipped glider goes BANANAS when RTH is turned on #10076

Open Mafracao opened 3 months ago

Mafracao commented 3 months ago

Hello guys. My name is Marco, from Brazil, and I'm currently developing a high performance FPV glider. I've been having an issue that I simply can't solve. I've tried everything. EVERYTHING for the past 2 months, working and testing almost every weekend with no success so far.

Firstly, the equipment used:

At the moment the glider is flying fine. The main issue is: when RTH button is pressed, the plane simply dives hard after a few seconds and starts to wobble out of control. Imagine a half inverted loop, and then it starts tumbling out of the skies...

I've checked all configurations, FC orientation is configured properly (due to lack of room, it's on its side and with the arrow pointing backwards), RTH parameters are stock....

I don't know what else to do, honestly. Is someone can give me some light, it would be very well appreciated, since I'm about to quit this project...

sensei-hacker commented 3 months ago

Hello again. I'll walk you through some troubleshooting. My first question - have you flown in Angle mode successfully?

Mafracao commented 3 months ago

Firstly, thank you for answering. I’ll be able to make new tests this Saturday.

So far I believe I haven’t flown it in Angle mode yet, only Acro (standard, no mode selected) and manual mode;

Regards; Marco Aurélio Silveira Fração

Em 23 de mai. de 2024, à(s) 14:44, Sensei @.***> escreveu:

Hello again. I'll wank you through some troubleshooting. My first question - have you flown in Angle mode successfully?

— Reply to this email directly, view it on GitHub https://github.com/iNavFlight/inav/issues/10076#issuecomment-2127723149, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGW5RDAK46IYI3UJQO5DUQLZDYTGPAVCNFSM6AAAAABIF6YTYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG4ZDGMJUHE. You are receiving this because you authored the thread.

sensei-hacker commented 3 months ago

That's good to know and points us more in the direction I was already thinking. The same thing that a few people said on Facebook.

On the Setup / Status page, double check the 3D model. While pointing away from you, the red wing should be on the left. Ensure it moves correctly in all three axis. I suspect the board orientation is set upside down or backwards.

If the orientation is in fact upside-down or backwards, it won't fly well in Angle mode either*. That's why I asked about that. If you HAD been flying it successfully in Angle mode, we would look in a different direction.

Mafracao commented 3 months ago

That’s the same thing I’ve been thinking all this time: some sensor orientation must be wrong and the FC can’t fly the plane by itself since something is inverted. It seems obvious, but not so much…. …since in the SETUP page the 3d model shows in the correct orientation: all movements I make with the plane is shown in the correct axis and direction (but it wasn’t always like that and I’ll explain later).

My glider is a 6 servo model (2 ailerons, 2 flaps and V-Tail). Flaps are bypassing the FC and only being controlled by the transmitter. Ailerons, V-tail and motor are controlled by the FC.

One strange thing is that prior to this latest test I’ve done I had to update the INAV Configurator. On the previous version, I couldn’t make the 3d model work right: if I set the FC and GPS in the same orientation as it is in the plane, the 3d model in Setup page would have some axis inverted… so I had to choose: Orientation page correct or setup page correct. After the update, it seems to be correct.

On this new CONFIGURATOR, this doesn’t happen, and I can setup everything correctly (at least in the interface of the configurator).

I’ll try to update the FC to the latest version again, erase all current setup and check it once again…. I’ll test some other autonomous function such as LOITER to see if the problem affects all autonomous flight or just RTH…. If it does affect other flight mode, it will be clear that the FC is getting some inverted data...

Regards; Marco Aurélio Silveira Fração

Em 23 de mai. de 2024, à(s) 15:20, Sensei @.***> escreveu:

That's good to know and points us more in the direction I was already thinking. The same thing that a few people said on Facebook.

On the Setup / Status page, double check the 3D model. While pointing away from you, the red wing should be on the left. Ensure it moves correctly in all three axis. I suspect the board orientation is set upside down or backwards.

If the orientation is in fact upside-down or backwards, it won't fly well in Angle mode either*. That's why I asked about that. If you HAD been flying it successfully in Angle mode, we would look in a different direction.

Actually sometimes it flies well with the board orientation set upside-down - it just flies well upside-down. :) — Reply to this email directly, view it on GitHub https://github.com/iNavFlight/inav/issues/10076#issuecomment-2127779800, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGW5RDFA2OVC5JNNJGW2A2LZDYXQHAVCNFSM6AAAAABIF6YTYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG43TSOBQGA. You are receiving this because you authored the thread.

sensei-hacker commented 3 months ago

Sounds like you're on the right track. If the orientation page doesn't match, that doesn't matter - it's the Setup tab (renamed Status) that needs show the right thing.

After that, the next step is to put it in Angle mode and physically move the aircraft in each axis. Ensure all control surfaces move in the correct direction to counteract you movement. They won't move very much, which is fine, but they need to move in the correct direction.

breadoven commented 3 months ago

Hello again. I'll wank you through some troubleshooting. My first question - have you flown in Angle mode successfully?

Think you might want to edit that post @sensei-hacker, think you meant "walk" perhaps ?

schnupperm commented 3 months ago

The same thing happend to me (Maybe I can use my color blindness as an excuse ;-). I nearly lost my loved z84 wing after changing its old f3 FC for a new more modern one. I think that sort of user error could be avoided, if the 3D model had a vertical stabilizer, to make it more clear which side of the plane is UP.

breadoven commented 3 months ago

A log would be useful. And I assume the compass is disabled or at least correctly calibrated ?

Mafracao commented 3 months ago

Sorry for the delay on answering guys.. I haven’t got the free time I thought I would on those last couple of days…

Compass is enabled and calibrated. All calibrations are done as they should, all configs regarding positioning of the sensors (compass and FC) are correct, the model is flying fine in ACRO and MANUAL model.

Hopefully I’ll be able to test again this weekend and check how the FC is reacting on angle mode. One possibility is that the FC is trying to fly the model with inverted elevator inputs…

Regards; Marco Aurélio Silveira Fração

Em 31 de mai. de 2024, à(s) 06:50, breadoven @.***> escreveu:

A log would be useful. And I assume the compass is disabled or at least correctly calibrated ?

— Reply to this email directly, view it on GitHub https://github.com/iNavFlight/inav/issues/10076#issuecomment-2141641864, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGW5RDH6ACCRQO3XMM7Q6FLZFBBWNAVCNFSM6AAAAABISPWIVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGY2DCOBWGQ. You are receiving this because you authored the thread.

breadoven commented 3 months ago

If it flies OK in ACRO that indicates the control responses are working correctly.

Please provide a Diff of the settings you're using.

Mafracao commented 2 months ago

Eureka!

By adding ANGLE MODE I’ve found out the elevator compensation was working reversed…. I’ve reversed it on the configurator and in the Tx and it finally worked as it should.

Only thing I found a bit strange is that the plane comes back on RTH and doesn’t go into circling around the home point (as I think it should)…. It stays flying in the “region” around it, but sometimes makes a 8 figure, sometimes not, sometimes it goes left-right-left right as it was in a slalom procedure….

Anyways, the main issue is solved...

Thanks and best regards; Marco Aurélio Silveira Fração

Em 1 de jun. de 2024, à(s) 06:19, breadoven @.***> escreveu:

If it flies OK in ACRO that indicates the control responses are working correctly.

Please provide a Diff of the settings you're using.

— Reply to this email directly, view it on GitHub https://github.com/iNavFlight/inav/issues/10076#issuecomment-2143375922, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGW5RDEFKIR4RUIK7TYDS5DZFGGYTAVCNFSM6AAAAABISPWIVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGM3TKOJSGI. You are receiving this because you authored the thread.

breadoven commented 2 months ago

Eureka! By adding ANGLE MODE I’ve found out the elevator compensation was working reversed…. I’ve reversed it on the configurator and in the Tx and it finally worked as it should. Only thing I found a bit strange is that the plane comes back on RTH and doesn’t go into circling around the home point (as I think it should)…. It stays flying in the “region” around it, but sometimes makes a 8 figure, sometimes not, sometimes it goes left-right-left right as it was in a slalom procedure…. Anyways, the main issue is solved... Thanks and best regards; Marco Aurélio Silveira Fração

The loiter issue may be because the loiter radius is too small and can't be achieved with the other settings such as bank angle. A Diff would be useful as requested above.