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
Fix: In Fixedwing, when RC is lost in MANUAL mode and throttle is red, the motor keeps turning with the last commanded throttle and does not go to RC_LOST_MODE #2287
Conversation
f56a6c2
to
e21d951
Compare
|
Any objection to merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I can see here, is that if you enter HOME mode on the ground, you have no guarantee that the throttle is killed. It means that you'll have stabilization + nav + throttle, which is even worse, than the problem you want to solve:
If you are in MAN + RC_LOST + throttle but not launched, it may start flying, but when launch becomes true, it will enter HOME in kill mode -> no more throttle.
I think we need a solution that cuts the throttle without changing the mode when launch is false and RC is lost.
I personally think it is worse that on RC loss in MANUAL you do NOT enter the configured RC_LOST_MODE because it creates danger for third parties in normal operating conditions while the throttle on the ground HOME MODE creates danger for yourself in bad practice conditions. Now without GPS or in case of GPS problem, or in case you get RC loss with high headwind you do not enter the RC_LOST_MODE. First, if you are in manual mode, it is good practice to switch off you plane before your transmitter. on RC-LOSS with zero throttle from MANUAL or AUTO1 and entering HOME_MODE then kill. |
e21d951
to
2b10abc
Compare
Here is a new proposition: (see code)
|
2b10abc
to
d3d15fa
Compare
If I got it right, If you are running the motor on ground in manual and loose the RC, it will enter HOME with throttle, which is not completely solving the initial issue |
Yes, you are right:
Then, HOME mode will become active without kill mode, and throttle, (which you already had) will increase to HOME-MODE throttle values. The current situation is when you lose RC in manual with throttle, than throttle also stays on. |
@gautierhattenberger : if you have another suggestion, you are very welcome but:
This pull request solves all this and makes nothing worse as far as I can see. The behavior becomes:
*** every model airfield wants to see: turn on the transmitter, turn on plane, give a bit of throttle, turn off the transmitter, the throttle must turn off. right now paparazzi fixed-wing does not do that. |
For now, I don't have a magic solution. What is really annoying me is that an aircraft not kill in MAN with a bit of throttle, in case of RC lost will:
I can see big issues in both case. |
With this pull request: if you lose RC with a bit of throttle BEFORE launch, then it switches to HOME mode WITHOUT throttle. Without this pull request, with a bit of throttle, on RC_LOST, then throttle stays until RC is restored. Even the kill button on the ground station does not work. The only problem that remains is that after launch (and if you flightplan did not have kill on land), if you had throttle in RC while losing RC, and you have RC_LOST_MODE as HOME or NAV and you have good GPS, then will it throttle up, while before this pull request it would stay at the last received RC throttle value. However, IMHO, this is not a normal condition: Normal use conditions:
Problem cases:
Possible solutions:
|
I agree that the proper solution would be an efficient and robust "in_flight" detector, which is not so easy on a fixedwing platform. I guess we could start listing the possible criteria for this. Some comments:
What about:
So if RC is lost in MAN/AUTO1, go to RC_LOST_MODE unless you have not start flying (then stop motors). Problems that may arise after flight are less likely to happen as you said, and a "in_flight" detection might improve this later. |
|
Any idea to reintegrate this pull request? We can not fly fixedwing with master until this is fixed. Our minimum viable requirement is:
(This should also solve the fly-away condition that master has now when flying without GPS: then inflight is not set and throttle stays with stabilization) |
Extra detail: we set RC_LOST_MODE to failsafe. |
what about the last code I proposed ? if rc lost and not launched, turn off motor (either directly or by implementing the proper function in autopilot.c if setting kill_throttle is not enough) |
side note: with autopilot generation, you can define the failsafe behavior you like ;) |
After checking, the |
@gautierhattenberger Your proposed solution would be an improvement compared to the current master. Nevertheless, I still think it has several problems:
The only logical solution to me (and the ones I asked) is
|
So something like
and replace https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/firmwares/fixedwing/autopilot_static.c#L235
? |
d3d15fa
to
4adaccf
Compare
…en pressed. When not launched, the RC_LOST_MODE is not set and throttle is kept from the last manual input. Solves #2286
4adaccf
to
7bf43f6
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hopefully we won't have side effect...
CI builds failure are not related to PR
…en pressed. When not launched, the RC_LOST_MODE is not set and throttle is kept from the last manual input. Solves paparazzi#2286 (paparazzi#2287)
Solves #2286