Skip to content

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

Open
@gaalb

Description

@gaalb

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions