unitree_rl_gym
unitree_rl_gym copied to clipboard
fail to load pre_trained model using sim2sim code
when I run the code, the problem is "python deploy/deploy_mujoco/deploy_mujoco.py g1.yaml
1
terminate called after throwing an instance of 'c10::Error'
what(): isTuple()INTERNAL ASSERT FAILED at "../aten/src/ATen/core/ivalue_inl.h":1400, please report a bug to PyTorch. Expected Tuple but got String
Exception raised from toTuple at ../aten/src/ATen/core/ivalue_inl.h:1400 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x42 (0x7fdd83f24d62 in /home/zeran/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x5b (0x7fdd83f2168b in /home/zeran/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #2: c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::string const&) + 0x3e (0x7fdd83f21bbe in /home/zeran/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #3:
已放弃 (核心已转储) " and I debugging the code which I found out it comes from loading the model "m = mujoco.MjModel.from_xml_path(xml_path) d = mujoco.MjData(m) m.opt.timestep = simulation_dt print(1) # load policy policy = torch.jit.load(policy_path) print(22222222222)"
The pytorch I am using is torch2.3.1+cu121
Im also getting an error when running sim2sim pipeline, not sure what is the fix?
I updated the checkpoint in the g1.yaml. The same checkpoint works on isaacgym
python deploy/deploy_mujoco/deploy_mujoco.py g1.yaml
Traceback
Traceback (most recent call last):
File "deploy/deploy_mujoco/deploy_mujoco.py", line 77, in <module>
policy = torch.jit.load(policy_path)
File "/home/youliang/miniconda3/envs/rl/lib/python3.8/site-packages/torch/jit/_serialization.py", line 158, in load
cpp_module = torch._C.import_ir_module(cu, os.fspath(f), map_location, _extra_files, _restore_shapes) # type: ignore[call-arg]
RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found
you need to first play that checkpoint using legged gym and there will be a new .pt model outputted in the exported folder. Using this model for sim2sim
you need to first play that checkpoint using legged gym and there will be a new .pt model outputted in the exported folder. Using this model for sim2sim
Hello,Can you explain this step in detail?