-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Remove RC Throttle trim calibration value getting hard-set to Minimum value #10497
base: master
Are you sure you want to change the base?
Remove RC Throttle trim calibration value getting hard-set to Minimum value #10497
Conversation
hotfix - A hotfix commit from 7 years ago was forcing RC transmitters to always have a trim value set to 'Min', effectively only allowing the [0, 1] range of the `manual_control_setpoint.throttle`. This was the commit: mavlink@0577af2 - This removes this hotfix, and allows setting the trim values automatically in the state machine (need to check logic once again) - Discussion was here: PX4/PX4-Autopilot#15949 (comment)
I don't quite understand what the original code that was removed was actually doing. That said as long as spring loaded throttle still works fine. But this comment is concering: "although some legacy parameter translations / user awarenesses would be needed" In general there is pretty much no user awareness on anything. |
In short:
We have to be careful with:
An alternative would be to replace the calibration with an autopilot-based one compared to the ground station doing all the logic based on the telemetry of the autopilot. That way compatibility on the exact ranges and values becomes less of an issue and e.g. also MAVSDK could easier trigger a calibration and just follow the steps. Just a suggestion.
@DonLakeFlyer With compatible PX4 that's not an issue. From PX4 perspective it currently doesn't matter if the throttle is spring-loaded or not. It has its full range and in certain modes a spring-loaded throttle just makes more sense than in others. We could add this information in the future to possibly enhance UX in some cases but the pure control input is independent. |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/driving-backwards-with-a-boat-rover-in-manual-mode/25714/6 |
Should we get this in? |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-maintainers-call-june-06-2023/32473/1 |
Descrption
A hotfix commit from 7 years ago was forcing RC transmitters to always have a trim value set to 'Min', effectively only allowing the [0, 1000] range.
While for legacy reasons & to bypass cases of spring-loaded transmitters, this may be ok, it is certainly not true regarding reversible thrust vehicles (e.g. Boat / Rovers), and it is confusing why only the throttle would be in the range [0, 1], and not [-1 ,1], as defined in theMANUAL_CONTROL
MAVLink message definition.Changes
Removed this hotfix, and allows setting the trim values automatically in the state machine (need to check logic once again)
Context
The discussion that discovered this flaw is here: PX4/PX4-Autopilot#15949 (comment)
We need to also clearly define the point about the definition ofMANUAL_CONTROL
's throttle (z
) definition. As it doesn't really make sense to have throttle vector's orientation interfere with the RC transmitter's setpoint values (it should be agnostic to vehicle's behavior to be basic).Also, PX4 will be able to handle this change using this logic (although some legacy parameter translations / user awarenesses would be needed): PX4/PX4-Autopilot#15949
And we need to make sure for ArduPilot this will work out as well. Judging from the way Steer / Throttle Manual override isn't differentiated in Rover code, I guess ArduPilot already uses full range (-1000 ~ +1000) definition for the internal RC throttle data, @peterbarker. Did you not have problem with QGC, regarding this point?
TODOs