Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Implement Frame-by-Frame Input Control Signals and Rendering in dm_control? #499

Open
binbinbai opened this issue Nov 3, 2024 · 0 comments

Comments

@binbinbai
Copy link

Hi,I would like to know how to achieve similar frame-by-frame input control signals and rendering logic in dm_control,like
`for i in range(len(retargeting_list['ctrl_history']) - 1):
ctrl = retargeting_list['ctrl_history'][i]
qfrc = retargeting_list['qfrc_history'][i]

if i == 0:
    env.data.qpos[:30] = ctrl[:30]
    mujoco.mj_forward(env.model, env.data)
else:
    env.data.qfrc_applied = qfrc   
    env.data.ctrl[:30] = ctrl[:30]
    for _ in range(5):
        mujoco.mj_step(env.model, env.data)  
    viewer.render()`

Thank you!

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

No branches or pull requests

1 participant