nv-tlabs / ASE

Other
755 stars 122 forks source link

GPU and CPU give different results #36

Open ZQX323 opened 1 year ago

ZQX323 commented 1 year ago

Hi Jason,

In order to get more contact information, I want to try to use CPU to run ASE. However, the results of CPU and GPU are somewhat different. You can see that during the CPU simulation, the friction between the robot's feet and the ground will be smaller, and there will be a slippery state, and when I print self._contact_forces under humanoid.py, the result is very wrong, basically 0. Do you have any idea about this?

command: python ase/run.py --test --task HumanoidStrike --num_envs 16 --cfg_env ase/data/cfg/humanoid_sword_shield_strike.yaml --cfg_train ase/data/cfg/train/rlg/hrl_humanoid.yaml --motion_file ase/data/motions/reallusion_sword_shield/RL_Avatar_Idle_Ready_Motion.npy --llc_checkpoint ase/data/models/ase_llc_reallusion_sword_shield.pth --checkpoint ase/data/models/ase_hlc_strike_reallusion_sword_shield.pth --sim_device cpu --rl_device cpu

Besides I add a config['device_name'] = 'cpu' in init funtion under ase/learning/common_player.py to make sure policy also use cpu.

Thanks in advance!

xbpeng commented 1 year ago

We've only tested this code on the GPU, so I've never tried running on the CPU before. I'm surprised that the results will be that different though. Maybe some settings are somehow not configured properly for the CPU simulator somewhere? Sorry I've never tried this before, so don't really have much insight to share on that.

ZQX323 commented 1 year ago

I haven't been able to figure out what the problem is. Nonetheless, thank you for your response.