You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a graduate at EPFL, I use MuJoCo for my master thesis.
My setup
When trying to modify body position and orientation in MuJoCo 3.3.4, I've found that directly editing mjsBody or mjsFrame doesn't visually update the model, even though model->body_pos shows the correct values.
I have to delete and recreate bodies/geoms for changes to appear.
However, editing geom sizes works fine without recreating them.
This suggests the issue is how MuJoCo's mjSpec handles pose updates during compilation/recompilation, rather than a visualization problem (I'm creating new scenes and calling mjv_updateScene).
My question
Deleting to then re-add element is of course not an ideal implementation and I would like to instead use the FULL POWER of model editing, that is being able to correctly set my new frame values in MjSpec
What are you thoughts on that ?
Thanks!
Some code
mjsBody* body = mjs_findBody(spec, "mybody");
// Some random values..
body->pos[0] = 1.0;
body->pos[1] = 2.5
body->pos[2] = 543.6;
body->alt.type = mjtOrientation::mjORIENTATION_EULER;
body->alt.euler[2] = 52.0;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi!
I am a graduate at EPFL, I use MuJoCo for my master thesis.
My setup
When trying to modify body position and orientation in MuJoCo 3.3.4, I've found that directly editing mjsBody or mjsFrame doesn't visually update the model, even though model->body_pos shows the correct values.
I have to delete and recreate bodies/geoms for changes to appear.
However, editing geom sizes works fine without recreating them.
This suggests the issue is how MuJoCo's mjSpec handles pose updates during compilation/recompilation, rather than a visualization problem (I'm creating new scenes and calling mjv_updateScene).
My question
Deleting to then re-add element is of course not an ideal implementation and I would like to instead use the FULL POWER of model editing, that is being able to correctly set my new frame values in MjSpec
What are you thoughts on that ?
Thanks!
Some code
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions