mujoco-python-viewer
mujoco-python-viewer copied to clipboard
How do I apply force to the actuator?
Hello, I want to apply force to ur5 model but I don't found the function. I use 'sim.data.ctrl' when I use mujoco-python, anyone can tell me which function can I use ? Thank you for your answer very much.
Simplest working model. Need more details for a better answer.
m = mujoco.MjModel.from_xml_path(<xml>)
d = mujoco.MjData(m)
while <simloop>:
mujoco.mj_step(m, d)
d.ctrl[<act_id>] = <your_control_value>