Skip to content

mjcf loading consistency with unity plugin and python interface #2396

Discussion options

You must be logged in to vote

As far as setting qpos, it is very much possible. Naturally it introduces a discontinuity in your physics, and there will be missing dynamics (unless you do inverse dynamics as well) for the frames you do the "teleportation". It is appropriate and common however for a custom reset function like this to just set the kinematics.

Using reset_context lets you skip calling mj_forward manually, which would be needed to ensure all you global positions and contacts will be correct immediately.
(The context calls forward after exiting it: https://github.com/google-deepmind/dm_control/blob/a4b9b312c4ae82dded5d2a331d0b5904bf33b869/dm_control/mujoco/engine.py#L307)

As long as the values of the new qp…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@spoonbobo
Comment options

@Balint-H
Comment options

Balint-H Feb 3, 2025
Collaborator

Answer selected by spoonbobo
@spoonbobo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants