Skip to content

feat: wasd keyboard controls (DIM-660)#9

Merged
spomichter merged 1 commit intomainfrom
feat/dim-660-keyboard-controls
Mar 5, 2026
Merged

feat: wasd keyboard controls (DIM-660)#9
spomichter merged 1 commit intomainfrom
feat/dim-660-keyboard-controls

Conversation

@spomichter
Copy link
Copy Markdown

Related

What

adds wasd keyboard controls to dimos-viewer that publish twist commands over lcm. wasd moves forward/back and turns left/right, qe strafes, space stops everything, shift doubles the speed. only captures keys when the 3d viewport has focus so you can still type in text fields normally. publishes geometry_msgs/TwistStamped on /cmd_vel channel that dimos autoconnect can pick up. shows a little green overlay when keyboard control is active. all 27 tests pass including new keyboard handler tests. maintains existing click-to-nav functionality.

Add keyboard controls that publish TwistStamped on /cmd_vel over LCM:

Key bindings:
- WASD/arrows: forward/back + turn left/right
- QE: strafe left/right
- Space: emergency stop
- Shift: 2x speed multiplier

Implementation:
- Add TwistCommand struct and encode_twist_stamped() to lcm.rs
- Add KeyboardHandler module with focus management
- Wrap re_viewer::App in DimosApp for keyboard interception
- Add keyboard status overlay when active
- Full LCM wire format compatibility (82-byte TwistStamped)
- Comprehensive test coverage (27/27 tests pass)

Maintains existing click-to-nav functionality while adding teleop controls.
Ready for integration with DimOS autoconnect on /cmd_vel channel.
@spomichter spomichter merged commit 707880e into main Mar 5, 2026
28 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant