Skip to content
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

Improving the flexibility of the python passive simulator callbacks. #2038

Open
gaalb opened this issue Sep 3, 2024 · 1 comment
Open

Improving the flexibility of the python passive simulator callbacks. #2038

gaalb opened this issue Sep 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gaalb
Copy link

gaalb commented Sep 3, 2024

The feature, motivation and pitch

Hello, mujoco team!

I'm reworking a project that I inherited from a previous coworker, regarding simulation of quadcopters and their controllers. This project was born before the passive viewer was implemented, however, in my iteration, I would like to use it, as it makes development way easier. I have several keypress callbacks I'd like to implement (such as connecting to our local motion capture system upon keypress, or modifying control parameters), but the vast majority of keybinds are already taken (rendering flag toggles, group toggles, etc.). I can still write callbacks to these keybinds, however, it makes very little sense to do so, since if I did, both my new actions, and the default behaviour would occur at the same time.
To this end I'd like to propose two new features:

  • Make the default keybinds editable, or at least allow them to be disabled in python. Mabye I don't want my 'S' key to be the toggle for shadows, maybe I want it to move the camera along with 'W', 'A' and 'D'.
  • Pass more information to the key_callback function than the keycode: is it a keypress or a key release event? Was it modified by shift/control/alt?
@gaalb gaalb added the enhancement New feature or request label Sep 3, 2024
@gaalb
Copy link
Author

gaalb commented Sep 26, 2024

This seems to be similar to #766, except it's broader than the most common use case mentioned by @saran-t in that issue. Providing some way to query additional information about the glfw context would partly solve this, as it would allow the use of shift-control-alt modifiers to use in addition to the default keybinds. The cleaner solution would be to be able to edit the default keybinds in addition to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant