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

Prevent TECS throttle from exceeding FW_THR_MAX in underspeed mode #15321

Closed
wants to merge 1 commit into from

Conversation

supergra
Copy link
Contributor

When TECS goes into underspeed mode, it sets the throttle to 100%, instead of respecting FW_THR_MAX.

This is obviously quite dangerous if people rely on FW_THR_MAX to keep their motor in a safe operating level.

We've been flying this one-line fix for over a year now.

Fixes #12716

@supergra
Copy link
Contributor Author

More SITL segfaults:

[2020-07-14T01:11:35.318Z] PX4 Exiting...
[2020-07-14T01:11:35.318Z] Exiting NOW.
[2020-07-14T01:11:35.585Z] terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
[2020-07-14T01:11:35.586Z]   what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
[2020-07-14T01:11:35.843Z] 6714, 3.328000000]: VER: 1.1: UID:                 4954414c44494e4f
[2020-07-14T01:11:35.843Z] [ INFO] [1594689027.230065982, 17.324000000]: WP: mission received
[2020-07-14T01:11:35.843Z] [ INFO] [1594689030.589104682, 20.552000000]: WP: mission sended
[2020-07-14T01:11:35.843Z] [ INFO] [1594689032.706607878, 22.612000000]: FCU: ARMED by Arm/Disarm component command
[2020-07-14T01:11:35.843Z] [ INFO] [1594689032.758154316, 22.664000000]: FCU: Takeoff to 18.0 meters above home.
[2020-07-14T01:11:35.843Z] [ INFO] [1594689033.734267853, 23.632000000]: FCU: Takeoff detected
[2020-07-14T01:11:35.843Z] Segmentation fault (core dumped)

Compare #15300, not sure if it's the same

@dagar
Copy link
Member

dagar commented Jul 15, 2020

This has been proposed before, but @priseborough was opposed to it. PX4/PX4-ECL#563 (comment)

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@MaEtUgR
Copy link
Member

MaEtUgR commented Oct 19, 2022

Is this problem still present on main? @sfuhrer @tstastny There were plenty of TECS changes recently.

I'm asking because it again came up here: https://discord.com/channels/1022170275984457759/1031677385625583627

The commit would need to be rebased to somewhere close to

void TECS::_update_throttle_setpoint()
but I'm not familiar enough with TECS (yet) to tell if it was resolved or where the same part is now.

@stale stale bot removed the stale label Oct 19, 2022
@tstastny
Copy link

@MaEtUgR @supergra no longer an issue. underspeed logic was changed in #19869

and throttle is now ramped to throttle max here:

throttle_setpoint = _percent_undersped * _throttle_setpoint_max + (1.0f - _percent_undersped) * throttle_setpoint;

@tstastny tstastny closed this Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throttle goes up to 100 % and over FW_THR_MAX
5 participants