christsa / dgrasp

Official code release for CVPR 2022 paper D-Grasp: Physically Plausible Dynamic Grasp Synthesis for Hand-Object Interactions
Other
80 stars 13 forks source link

cannot find the module "dgrasp" #18

Open Cai-ang opened 7 months ago

Cai-ang commented 7 months ago

Hi, i'm trying to run dgrasp in win11 machine, i've matched the environment, the file named dgrasp.cp39-win_amd64.pyd is already in this path: '....\raisim\dgrasp\raisimGymTorch\raisimGymTorch\env\bin', but when i run this order 'python raisimGymTorch/env/envs/dgrasp/runner_motion.py -o 12 -e '021_bleach_dexycb' -sd 'pretrained_policies' -w 'full_3000.pt', it has something wrong: Traceback (most recent call last): File "D:\Desktop\raisim\dgrasp\raisimGymTorch\raisimGymTorch\env\envs\dgrasp\runner_motion.py", line 2, in from raisimGymTorch.env.bin import dgrasp as mano ImportError: DLL load failed while importing dgrasp: ModuleNotFoundError: No module named 'raisimGymTorch.env' I looked in the raisim official project problem, but it didn't work out. can u help me solve this problem? Thanks!

christsa commented 7 months ago

Hi,

Did you add the environment variables as instructed in the official RaiSim guide for Windows installation (https://raisim.com/sections/Installation.html) and follow the other steps described there?

manuelbirlo commented 6 months ago

I installed dgrasp on my Windows 11 computer and had the same issue. I think the official RaiSim guide doesn't cover all required steps. I had to add "...\raisim\dgrasp\raisimGymTorch\raisimGymTorch\env\bin" and "...\raisim\dgrasp\raisim\win32\bin" to my Path variable as well.

christsa commented 6 months ago

I see. Did these additional steps resolve the issue?

manuelbirlo commented 5 months ago

I also had to add the dll directory directly within the python script:

import os os.add_dll_directory(r"C:\git_repos\raisim\dgrasp\raisim\win32\bin") # change path to your respective bin directory