Skip to content

[FEATURE] Introduce interactive viewer plugins.#2004

Merged
duburcqa merged 10 commits intoGenesis-Embodied-AI:mainfrom
Milotrince:viewer_plugin
Feb 5, 2026
Merged

[FEATURE] Introduce interactive viewer plugins.#2004
duburcqa merged 10 commits intoGenesis-Embodied-AI:mainfrom
Milotrince:viewer_plugin

Conversation

@Milotrince
Copy link
Contributor

@Milotrince Milotrince commented Nov 17, 2025

Description

nice-to-have feature, allows users to integrate interactive viewer plugins.

  • Remove dependency on pynput
  • gs.vis.keybindings.Keybind callback registration
  • in gs.options.ViewerOptions:
    • disable_keyboard_shortcuts replaced with disable_default_keybinds
    • add disable_help_text

Related Issue

Resolves #713

Motivation and Context

  • ViewerPlugin enables directly interfacing with pyviewer mouse/keyboard controls.
  • Replaces pynput
  • Simple keybind callback registration

How Has This Been / Can This Be Tested?

added tests/test_viewer.py

Screenshots (if appropriate):

Screenshot 2026-01-30 at 16 08 08 registered keys automatically show in help text :)

Checklist:

  • I read the CONTRIBUTING document.
  • I followed the Submitting Code Changes section of CONTRIBUTING document.
  • I tagged the title correctly (including BUG FIX/FEATURE/MISC/BREAKING)
  • I updated the documentation accordingly or no change is needed.
  • I tested my changes and added instructions on how to test it for reviewers.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@duburcqa
Copy link
Collaborator

This feature looks very convenient!

@Milotrince
Copy link
Contributor Author

  • Should we keep under genesis/ext/pyrender/interaction/plugins/ or genesis/vis/plugins ?
  • Do we want to use Vec3, Quat, Color, Ray, etc. classes in the codebase?
  • now that pyrender viewer mouse/keyboard interaction is exposed, we can get rid of pynput in examples

@duburcqa
Copy link
Collaborator

Should we keep under genesis/ext/pyrender/interaction/plugins/ or genesis/vis/plugins ?

Do you consider this as a "universal" plugin or something pyrender-specific? This would give you the answer :)

Do we want to use Vec3, Quat, Color, Ray, etc. classes in the codebase?

I'm not a fan of these objects. Overly complicated and not very pythonic in my view.

now that pyrender viewer mouse/keyboard interaction is exposed, we can get rid of pynput in examples

That would be great! But we need a way to expose this in a clean way.

@Milotrince Milotrince force-pushed the viewer_plugin branch 2 times, most recently from 98601bb to 1e672b0 Compare November 24, 2025 21:42
@duburcqa
Copy link
Collaborator

duburcqa commented Jan 1, 2026

@Milotrince If you could finish this PR I would be happy to review it and merge it :)

@Milotrince Milotrince marked this pull request as ready for review January 11, 2026 04:56
@Milotrince
Copy link
Contributor Author

Milotrince commented Jan 11, 2026

@duburcqa Could I get your opinion on the state of the PR? there are some design decisions I'd like your input on!

  • removed pynput, see examples/* changes for new usage
  • I kept the mouse spring interaction implementation and moved it as a plugin
  • there existed a register key system in pyrender viewer but was not exposed in genesis viewer. I made a Keybind/Keybindings class and exposed register_keybind to viewer

I still need to add tests.

@duburcqa
Copy link
Collaborator

Could I get your opinion on the state of the PR? there are some design decisions I'd like your input on!

Sure ! I will do it this week ! Could you fix the conflicts in the meantime? Thank you :)

@Milotrince Milotrince force-pushed the viewer_plugin branch 2 times, most recently from 7639573 to 0a14941 Compare January 13, 2026 04:17
@duburcqa
Copy link
Collaborator

@duburcqa
Copy link
Collaborator

Could you split the introduction of ViewerPlugin feature, with the ability to interactively add markers on geometries from the viewer? Because this PR is getting quite bug already and both features are quite orthogonal. It would make my life easier for the review.

You can open a (stacked) PR for the second part right away, merging on top of this branch instead of main (with draft status).

@Milotrince
Copy link
Contributor Author

Milotrince commented Jan 30, 2026

updated snapshot pr: https://huggingface.co/datasets/Genesis-Intelligence/snapshots/discussions/7
posting the "stacked pr" here again (raycaster changes moved here) Milotrince#3

@Milotrince Milotrince force-pushed the viewer_plugin branch 2 times, most recently from 02edb5a to 5b2796b Compare February 1, 2026 23:52
@YilingQiao
Copy link
Collaborator

Look forward to landing this PR. I created a GUI on top of that

imgui.mp4

@Milotrince
Copy link
Contributor Author

@duburcqa some tests are failing from importlib.metadata.PackageNotFoundError: No package metadata was found for gstaichi do i need to worry about this?

@duburcqa
Copy link
Collaborator

duburcqa commented Feb 4, 2026

@duburcqa some tests are failing from importlib.metadata.PackageNotFoundError: No package metadata was found for gstaichi do i need to worry about this?

This is concerning. We should fix this before merging. Weird.

EDIT: the only failure I could find on the CI is this one:

image

EDIT2: Ok I found the bug!

@duburcqa duburcqa changed the title [FEATURE] Interactive viewer plugins [FEATURE] Introduce interactive viewer plugins. Feb 5, 2026
@duburcqa duburcqa merged commit 5fd25fe into Genesis-Embodied-AI:main Feb 5, 2026
19 of 21 checks passed
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

⚠️ Abnormal Benchmark Result Detected ➡️ Report

@realmtai
Copy link

realmtai commented Feb 7, 2026

I'm trying to from genesis.vis.keybindings import Key, KeyAction, Keybind

and getting ModuleNotFoundError: No module named 'genesis.vis.keybindings'

  • This is due to gensis-world 0.3.13 does not have the keybindings yet? and will most likely make it into a later release

@duburcqa
Copy link
Collaborator

duburcqa commented Feb 7, 2026

This is due to gensis-world 0.3.13 does not have the keybindings yet?

Yes, you need to install Genesis main branch. It will be part of 0.3.14 release.

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.

[Feature]: Capture keyboard commands

4 participants