Improbable-AI / rapid-locomotion-rl

Code for Rapid Locomotion via Reinforcement Learning
Other
163 stars 38 forks source link

TypeError: argument of type 'Meta' is not iterable #7

Open KK-Zhou opened 10 months ago

KK-Zhou commented 10 months ago

When I tried to use the IsaacGym_Preview_4, this error occured.

  File "scripts/test.py", line 51, in <module>
    run_env(render=True, headless=False)
  File "scripts/test.py", line 32, in run_env
    env = VelocityTrackingEasyEnv(sim_device='cuda:0', headless=False, cfg=Cfg)
  File "/home/user/rl/rapid-locomotion-rl/mini_gym/envs/mini_cheetah/velocity_tracking/velocity_tracking_easy_env.py", line 38, in __init__
    gymutil.parse_sim_config(vars(cfg.sim), sim_params)
  File "/home/user/isaacgym/python/isaacgym/gymutil.py", line 407, in parse_sim_config
    parse_physx_config(sim_cfg["physx"], sim_options)
  File "/home/user/isaacgym/python/isaacgym/gymutil.py", line 438, in parse_physx_config
    parse_float_int_bool(physx_cfg, sim_options.physx, params)
  File "/home/user/isaacgym/python/isaacgym/gymutil.py", line 448, in parse_float_int_bool
    if opt in cfg:
TypeError: argument of type 'Meta' is not iterable

It seems that the type of the cfg can't match. Have you used the isaacgym4 for the gym training? And how you solved this kind of errors?

percypeng5221 commented 8 months ago

I met the same problem!

Zenif-NIght commented 7 months ago

Me too, do you know if there is a way to download IsaacGym_Preview_3? I have a Ubuntu 20.04.6 LTS, Python 3.7.12 , NVIDIA-SMI 530.30.02, Driver Version: 530.30.02, CUDA Version: 12.1, NVIDIA GeForce RTX 2080 Ti

Zenif-NIght commented 7 months ago

I found in my downloads an old IsaacGym_Preview_3 and it still gave me that same error,

So I started from scratch with IsaacGym_Preview_3, I had to create a new conda env and did not find a way to correct all the conflicting dependencys but it seems to work now he is my pip list, its working now. pip_list.txt

sduligw commented 4 months ago

How to solve TypeError: argument of type 'Meta' is not iterable

File "/home/lgw/isaacgym/python/isaacgym/gymutil.py", line 407, in parse_sim_config parse_physx_config(sim_cfg["physx"], sim_options) File "/home/lgw/isaacgym/python/isaacgym/gymutil.py", line 438, in parse_physx_config parse_float_int_bool(physx_cfg, sim_options.physx, params) File "/home/lgw/isaacgym/python/isaacgym/gymutil.py", line 454, in parse_float_int_bool if opt in cfg: TypeError: argument of type 'Meta' is not iterable

georgao35 commented 3 months ago

I also met the same problem, and I believe it is because sim_cfg["physx"] is still a proto object which is not compatible with isaacgym

a simple way is to change line 38 in mini_gym/envs/mini_cheetah/velocity_tracking/velocity_tracking_easy_env.py into the following lines:

        cfg_sim = vars(cfg.sim)
        cfg_sim['physx'] = vars(cfg_sim['physx'])
        gymutil.parse_sim_config(cfg_sim, sim_params)

i tested this in isaacgym preview 4, and i can run train.py now. but i am not sure if it will affect the final results, since they have different dependencies.

or you can install some older version of params-proto that the author used, but i amnot sure which particular version they are using.