Open
Description
Intro
Hi!
I am an undergrad student at Technion, I use MuJoCo for my research on Robotic arms.
My setup
I am using MuJoCo on python on Mac(M-series chip) with Sequoia 15.3.2, and I cannot import not pre-built packages when running with mjpython
What's happening? What did you expect?
Well, I expected it to run, but it does not
Steps for reproduction
- Load the package below.
pip3 install mink
- Run the code below.(with mjpython setup.py)
import mujoco
import mink
import numpy as np
def setup():
XML_PATH = "ur5e_scene.xml"
model = mujoco.MjModel.from_xml_path(XML_PATH)
data = mujoco.MjData(model)
key_name = "home"
key_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_KEY, key_name)
if key_id >= 0:
data.qpos[:] = model.key_qpos[key_id].copy()
data.ctrl[:] = model.key_ctrl[key_id].copy()
# Make sure the state is updated:
mujoco.mj_forward(model, data)
return model, data
if __name__ == "__main__":
setup()
- See the error
Traceback (most recent call last):
File "/universal_robots_ur5e/setup.py", line 2, in <module>
import mink
ModuleNotFoundError: No module named 'mink'
Minimal model for reproduction
The model is not that relevant, to be honest, but for argument's sake, you can use the default one:
minimal XML
<mujoco>
<worldbody>
<light pos="0 0 1"/>
<geom type="sphere" size="1" rgba="1 0 0 1"/>
</worldbody>
</mujoco>
Code required for reproduction
import mujoco
import mink
import numpy as np
def setup():
XML_PATH = "ur5e_scene.xml"
model = mujoco.MjModel.from_xml_path(XML_PATH)
data = mujoco.MjData(model)
key_name = "home"
key_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_KEY, key_name)
if key_id >= 0:
data.qpos[:] = model.key_qpos[key_id].copy()
data.ctrl[:] = model.key_ctrl[key_id].copy()
# Make sure the state is updated:
mujoco.mj_forward(model, data)
return model, data
if __name__ == "__main__":
setup()
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.