PHC icon indicating copy to clipboard operation
PHC copied to clipboard

IndexError when loading the pkl file in sample folder

Open Qiuxsi opened this issue 10 months ago • 0 comments

Many thanks for your work! I've installed the dependencies and successfully run the following scripts to make sure I'm ready to start.

python scripts/vis/vis_motion_mj.py
python scripts/joint_monkey_smpl.py

So, I downloaded the model in download_data.sh and tried to do some inference, using the provided command:

python phc/run_hydra.py learning=im_pnn_big exp_name=phc_x_pnn  env=env_im_x_pnn robot=smplx_humanoid env.motion_file=sample_data/standing_x.pkl env.training_prim=0 epoch=-1 test=True  env.num_envs=1  headless=False

But the following error occured:

Error executing job with overrides: ['learning=im_pnn_big', 'exp_name=phc_x_pnn', 'env=env_im_x_pnn', 'robot=smplx_humanoid', 'env.motion_file=sample_data/standing_x.pkl', 'env.training_prim=0', 'epoch=-1', 'test=True', 'env.num_envs=1', 'headless=False']
Traceback (most recent call last):
  File "phc/run_hydra.py", line 339, in main
    runner.run(cfg)
  File "/home/normal_user/qxs/anaconda3/envs/isaac/lib/python3.8/site-packages/rl_games/torch_runner.py", line 142, in run
    player = self.create_player()
  File "/home/normal_user/qxs/anaconda3/envs/isaac/lib/python3.8/site-packages/rl_games/torch_runner.py", line 128, in create_player
    return self.player_factory.create(self.algo_name, config=self.config)
  File "/home/normal_user/qxs/anaconda3/envs/isaac/lib/python3.8/site-packages/rl_games/common/object_factory.py", line 15, in create
    return builder(**kwargs)
  File "phc/run_hydra.py", line 262, in <lambda>
    runner.player_factory.register_builder('im_amp', lambda **kwargs: im_amp_players.IMAMPPlayerContinuous(**kwargs))
  File "/home/normal_user/qxs/PHC/phc/learning/im_amp_players.py", line 27, in __init__
    super().__init__(config)
  File "/home/normal_user/qxs/PHC/phc/learning/amp_players.py", line 23, in __init__
    super().__init__(config)
  File "/home/normal_user/qxs/PHC/phc/learning/common_player.py", line 16, in __init__
    BasePlayer.__init__(self, config)
  File "/home/normal_user/qxs/anaconda3/envs/isaac/lib/python3.8/site-packages/rl_games/common/player.py", line 17, in __init__
    self.env = self.create_env()
  File "/home/normal_user/qxs/anaconda3/envs/isaac/lib/python3.8/site-packages/rl_games/common/player.py", line 136, in create_env
    return env_configurations.configurations[self.env_name]['env_creator'](**self.env_config)
  File "phc/run_hydra.py", line 246, in <lambda>
    env_configurations.register('rlgpu', {'env_creator': lambda **kwargs: create_rlgpu_env(**kwargs), 'vecenv_type': 'RLGPU'})
  File "phc/run_hydra.py", line 141, in create_rlgpu_env
    task, env = parse_task(args, cfg, cfg_train, sim_params)
  File "/home/normal_user/qxs/PHC/phc/utils/parse_task.py", line 60, in parse_task
    task = eval(args.task)(cfg=cfg, sim_params=sim_params, physics_engine=args.physics_engine, device_type=args.device, device_id=device_id, headless=args.headless)
  File "/home/normal_user/qxs/PHC/phc/env/tasks/humanoid_im.py", line 100, in __init__
    super().__init__(cfg=cfg, sim_params=sim_params, physics_engine=physics_engine, device_type=device_type, device_id=device_id, headless=headless)
  File "/home/normal_user/qxs/PHC/phc/env/tasks/humanoid_amp_task.py", line 37, in __init__
    super().__init__(cfg=cfg,
  File "/home/normal_user/qxs/PHC/phc/env/tasks/humanoid_amp.py", line 112, in __init__
    self._load_motion(motion_file)
  File "/home/normal_user/qxs/PHC/phc/env/tasks/humanoid_im.py", line 338, in _load_motion
    self._motion_lib.load_motions(skeleton_trees=self.skeleton_trees, gender_betas=self.humanoid_shapes.cpu(),
  File "/home/normal_user/qxs/PHC/phc/utils/motion_lib_base.py", line 213, in load_motions
    self.curr_motion_keys = self._motion_data_keys[sample_idxes]
IndexError: index 3610033952 is out of bounds for axis 0 with size 1

I would appreciate it if you could give me some tips.

Qiuxsi avatar Jan 14 '25 01:01 Qiuxsi