Skip to content
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

[v1.14] RC signal lost -> actuators stuck at last commanded position (Prearm = Always & RC loss Failsafe = Disarm) #23035

Open
junwoo091400 opened this issue Apr 19, 2024 · 0 comments

Comments

@junwoo091400
Copy link
Contributor

junwoo091400 commented Apr 19, 2024

Describe the bug

Little Story:

Imagine you are flying a Fixed Wing in Manual mode and lose RC signal. When the RC signal lost failsafe is set to "disarmed", but the prearm mode is set to "always", after RC signal is lost, should the Servo actuators (control surfaces) be at disarmed position or at the last manually commanded position?


Detailed description:

  1. v1.14.0 stable release Firmware
  2. Fixed wing vehicle (Flying wing configuration)
  3. Current flight mode = Manual (the same problem will exist for Stabilized / Altitude / Position modes too, where it's not fully autonomous and requires Manual control input)
  4. Commander Prearm mode = Always
  5. RC loss failsafe action = Disarm

When the RC signal is lost, and Disarm is triggered, the Actuator does not go to 'Disarmed' position but rather continuously gives out the actuator output as if the RC signal is at it's last packet's value.

To Reproduce

  1. Have at least 1 Servo actuator in actuators (to be influenced by prearm)
  2. Set COM_PREARM_MODE to 2 (Always)
  3. Set RC loss failsafe action to Disarm
  4. Set Actuator disarmed values to specific value (e.g. extreme low / high)
  5. Set to Manual Flight mode and command RC roll/pitch, etc commands to move the actuator
  6. Turn off the RC controller

Then the actuator will stay stuck (in Manual mode), and in other modes probably as if the RC control is constantly coming in as it's last values.

Expected behavior

I expected that as "Failsafe" action was to "Disarm", the actuators would all go to Disarmed values. At least I think that constantly treating the last manual control setpoint value as valid while the RC signal is lost seems really absurd to me.

Also, this is only relevant for the "Disarm" or "None" RC loss failsafe action cases, as in other RTL / Land / Terminate cases, vehicle will fully automatically guide themselves, or the prearm mode will be overridden (terminate case).

Perhaps there should be a way to *not use the RC input when it is not valid anymore for prearmed actuator output value. Some solutions I thought of were:

  1. Command 0 torque & thrust setpoint instead for FW rate control when manual control is not valid (Not so elegant, error prone)
  2. In mixer module check if it's "Manual" flight mode & whether "Prearm" mode is active, and if so send out "Disarmed" values instead? (Will affect Hybrid VTOL systems and every little RC loss can lead to Servos twitching)

Not sure what the solution should be, or whether current behavior should be accepted, but open for discussion!

Screenshot / Media

image

Flight Log

https://logs.px4.io/plot_app?log=a45dca4b-9975-43de-9499-cee5690c984a

Software Version

v1.14

Flight controller

Cube Orange

Vehicle type

Fixed Wing

How are the different components wired up (including port information)

No response

Additional context

This is the case due to the following logic in FW Rate controller:

} else {
// Manual/direct control, filled in FW-frame. Note that setpoints will get transformed to body frame prior publishing.
_vehicle_torque_setpoint.xyz[0] = math::constrain(_manual_control_setpoint.roll * _param_fw_man_r_sc.get() +
_param_trim_roll.get(), -1.f, 1.f);
_vehicle_torque_setpoint.xyz[1] = math::constrain(-_manual_control_setpoint.pitch * _param_fw_man_p_sc.get() +
_param_trim_pitch.get(), -1.f, 1.f);
_vehicle_torque_setpoint.xyz[2] = math::constrain(_manual_control_setpoint.yaw * _param_fw_man_y_sc.get() +
_param_trim_yaw.get(), -1.f, 1.f);
_vehicle_thrust_setpoint.xyz[0] = math::constrain((_manual_control_setpoint.throttle + 1.f) * .5f, 0.f, 1.f);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant