Add optional keyboard control for MuJoCo sim2sim (no gamepad required)#6
Open
lez666 wants to merge 3 commits intojloganolson:mainfrom
Open
Add optional keyboard control for MuJoCo sim2sim (no gamepad required)#6lez666 wants to merge 3 commits intojloganolson:mainfrom
lez666 wants to merge 3 commits intojloganolson:mainfrom
Conversation
Main Changes: - Add complete keyboard control functionality (run_sim2sim_keyboard.py) - Implement cross-platform keyboard input handling using pynput library - Support all original gamepad features including movement control, mode switching, policy switching, and gain adjustment Key Features: - Arrow keys for forward/backward and lateral movement - IJK keys for mode switching (I=stand, J=damped, K=crawl) - Z/C keys for rotation control - SPACE key for policy cycling - Q/A/H keys for real-time gain adjustment - ESC key to exit program Technical Details: - Uses pynput library, no root required on Linux - Complete key state management and edge detection - Seamless integration with original code architecture - Preserves all safety monitoring features Documentation: - README_keyboard_zh.md (Chinese version) - README_keyboard_en.md (English version) - Updated main README.md with enhanced features section - Added demo animation (robot_crawling_demo.gif) Dependencies: - Updated requirements.txt to include pynput>=1.7.6
Changes: - Add KEYBOARD_SIM2SIM.md as main keyboard control reference - Update main README.md with keyboard control section - Consolidate sim2sim_mj/README.md content into KEYBOARD_SIM2SIM.md - Remove redundant sim2sim_mj/README.md - Update last modified dates to 2026.1 in keyboard documentation Documentation improvements: - Streamlined keyboard control overview - Clear separation between quick reference and detailed docs - Better integration with main project README
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.
Summary
This PR adds an optional keyboard-based controller for the MuJoCo sim2sim pipeline.
The goal is to remove the hard dependency on a physical gamepad for interactive playback,
making sim2sim usable on laptops, remote machines, and development environments.
Key Points
sim2sim_mj/Features
How to Test