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

Encountered some problems while executing the code #15

Closed SanMumumu closed 8 months ago

SanMumumu commented 8 months ago

Hi, Thank you for sharing such great work. I finish configuring all environments. When running the codepython raisimGymTorch/env/envs/dgrasp/runner_motion.py -ao -e 'all_objs' -sd 'pretrained_policies' -w 'full_6000.pt', the following error occurred

Experiment name: "021_bleach_dexycb"
num envs 18
Traceback (most recent call last):
  File "raisimGymTorch/env/envs/dgrasp_test/runner.py", line 169, in <module>
    env = VecEnv(mano.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment'])
  File "/data1/ws/anaconda3/envs/raisim/lib/python3.8/site-packages/ruamel.yaml-0.18.6-py3.8.egg/ruamel/yaml/main.py", line 1251, in dump
    error_deprecation('dump', 'dump', arg="typ='unsafe', pure=True")
  File "/data1/ws/anaconda3/envs/raisim/lib/python3.8/site-packages/ruamel.yaml-0.18.6-py3.8.egg/ruamel/yaml/main.py", line 1037, in error_deprecation
    raise AttributeError(s)
AttributeError: 
"dump()" has been removed, use

  yaml = YAML(typ='unsafe', pure=True)
  yaml.dump(...)

instead of file "raisimGymTorch/env/envs/dgrasp_test/runner.py", line 169

env = VecEnv(mano.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment'])

Then I modified the code to

# env = VecEnv(mano.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment'])
# ------------------------------- # 
yaml = YAML(typ='unsafe', pure=True)
with open("env_config.yaml", "w") as file:
    yaml.dump(cfg['environment'], file)
env = VecEnv(mano.RaisimGymEnv(home_path + "/rsc", "env_config.yaml"), cfg['environment'])
# ------------------------------- # 

But the following error occurred:

Configuration file: "cfg.yaml"
Experiment name: "all_objs"
num envs 376
[2024:03:18:14:27:53 ArticulatedSystem.cpp:376] /data1/ws/Grasp/code/dgrasp/raisimGymTorch/raisimGymTorch/env/envs/dgrasp/../../../../../rsc/mano/: unsupported file type

I'm confused, can you help me solve this problem? Really thankful.

SanMumumu commented 8 months ago

When I downgrade ruamel, it can be compiled (I don't know if this is a good operation). But there are still the following problems

After executing the code ’python raisimGymTorch/env/envs/dgrasp/runner_motion.py -ao -e 'all_objs' -sd 'pretrained_policies' -w 'full_6000.pt', the simulator can display the grabbing interface. But some prompts appeared 屏幕截图 2024-03-18 202301

And other problems occurred when executing the following codes.

屏幕截图 2024-03-18 203024

Can you take the time to give me some help? Thank you very much!

christsa commented 8 months ago

Hi,

the missing file indicates a newer version of RaiSim which we don't support. You need to install everything through the D-Grasp repository (RaiSim is already integrated in the codebase). Is it possible you tried to install RaiSim separately from the D-Grasp repo?

For ruamel, downgrading seems to be the correct solution.

SanMumumu commented 8 months ago

Thank you for your help. Now it works. ;) 屏幕截图 2024-03-19 100800