Refactor whl-can to make the buttons more concise.#159
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the whl-can keyboard controller to provide a more intuitive and ergonomic control mapping for Apollo autonomous vehicle control. The refactoring changes button mappings to be more consistent with gaming conventions (WASD for driving), adds a comprehensive UI with real-time visual feedback, introduces multiple control modes (SPEED/THROTTLE/ACCEL), and reorganizes the code architecture to make the controller more self-contained.
Changes:
- Remapped keyboard controls to be more intuitive (e.g., V for brake decrease instead of B, Q/E for turn signals, L to cycle lights)
- Added rich terminal UI with colored status display, progress bars, and visual steering indicator
- Implemented three control modes (SPEED, THROTTLE, ACCEL) switchable via 1/2/3 keys
- Refactored architecture so KeyboardController creates its own Cyber RT node and writer
- Added help screen toggle and improved user feedback with timed message display
ef4451b to
fb1a628
Compare
Signed-off-by: Pride Leong <lykling.lyk@gmail.com>
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.
Control Key Mapping
steering)c: Cancelbutcis not mapped in the codemas toggleEPB,GEAR,SIGNAL, etc.)