How to implement custom GUI elements and trajectory visualization in MuJoCo C API (for beginners) #2467
Replies: 3 comments
-
Hello, I am a MuJoCo user. This answers your second point. I believe the first two snapshots are just sites being visualised. For adding decorative geometries-- If you write in C/C++, you can add decorative geometries by calling mjv_initgeom followed by mjv_connector. I made some custom functions for myself based on the code of the above functions. They might be helpful to you as well. Example1: draw a sphere.
One should also specify orientation for objects like ellipsoids, lines, capsules or arrows.
You need to call these functions after updating and before rendering the scene. For e.g., in
If you use Python bindings, please check out Modifying the scene in the introductory tutorial. |
Beta Was this translation helpful? Give feedback.
-
In the tutorial colab, you can find a section on adding custom geoms to a scene. |
Beta Was this translation helpful? Give feedback.
-
The two answers above refer to the 3D scene. It is also possible to add plots via the low-level API. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi!
I am an undergraduate student conducting research on force control. I'm relatively new to computer programming.
My setup
My question
My question
I've been watching Yuval Tassa's YouTube videos on MJPC and I'm trying to implement similar visualization features as shown in the screenshots.
**Specifically, I want to implement:
I've written basic MuJoCo code, but I can't figure out how to add these GUI and visualization features. As a coding beginner, I would really appreciate any tutorials, examples, or API documentation that could help me understand how to implement these GUI features using the MuJoCo 2.3.7 C API.
Minimal model and/or code that explain my question
If you encountered the issue in a complex model, please simplify it as much as possible (while still reproducing the issue).
Model:
minimal XML
Code:
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions