joystick: add "reverse" mode and "gain" functionality#2477
Open
ES-Alexander wants to merge 5 commits intobluerobotics:masterfrom
Open
joystick: add "reverse" mode and "gain" functionality#2477ES-Alexander wants to merge 5 commits intobluerobotics:masterfrom
ES-Alexander wants to merge 5 commits intobluerobotics:masterfrom
Conversation
612edcb to
1672a31
Compare
1672a31 to
945c25b
Compare
Contributor
Author
|
I've just raised #2480, and realised this is probably the ideal place to implement that, because then both can be made available simultaneously (and these definitions will likely be hard/annoying to migrate for users once they already have them). Implementing both gain and reversing in a single compound variable would also be marginally more performant, because then the output messages only need to pull in one "scale" variable value. |
945c25b to
00b7ed1
Compare
- Avoids reversing the vertical or yaw axes, as we typically intuit those as world-frame. - Only applies gain to translation axes by default - Users can edit the compound variables if they want to add it to rotations as well
00b7ed1 to
810ef8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based over #24761 and #2478 (the first two commits) - I figured it would be easier to review them separately and rebase this over master before it gets reviewed. If not, we can just review and merge this one instead of those 🤷♂️
Fixes #2221, by adding a base
reversedata-lake variable (which can be used to trigger additional related functionality), then splitting that into per-axis compound variables*. The base variable can be directly (momentarily) controlled by a joystick button, or statefully controlled with the provided Actions.Fixes #2480, with a base
gaindata-lake variable, and applying it by default to only translation axes (a suggestion from @Williangalvani) for each vehicle type, falling back to a gain of 1 for rotation / undefined axes. The base variable can be directly controlled with range input widgets (like a slider), or incremented and decremented with the provided Actions. Unlike the reversing state, the gain state and number of steps are persistent across reboots.Footnotes
If you've been testing joystick: migrate MANUAL_CONTROL axes to data lake #2476, you'll need to delete the
Axis * Outputcompound variables before this one will work, since it doesn't currently include a migration. ↩