Open logic110 opened 9 months ago
Hi,
Could you explain more details about your problem?
The file barrier_track.py
is not designed to be run alone.
As I remembered, "IndexError: tensors used as indices must be long, int, byte or bool tensors." happened when some of the field in the configuration becomes a float rather than an integer. But I need more details to help you.
Could you show more about how you run the script and what does the error message says?
Best,
Thank you for your fast reply! These are the wrong details.
python play.py --task a1_crawl --load_run /home/robot/parkour/parkour/legged_gym/legged_gym/field_a1/crawl_raw_919_ok
Importing module 'gym_38' (/home/robot/parkour/IsaacGym_Preview_4_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/robot/parkour/IsaacGym_Preview_4_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 2.1.0+cu121
Device count 1
/home/robot/parkour/IsaacGym_Preview_4_Package/isaacgym/python/isaacgym/_bindings/src/gymtorch
Using /home/.cache/torch_extensions/py38_cu121 as PyTorch extensions root...
Emitting ninja build file /home/.cache/torch_extensions/py38_cu121/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module gymtorch...
Setting seed: 1
Using LeggedRobotField.init, num_obs and num_privileged_obs will be computed instead of assigned.
Not connected to PVD
+++ Using GPU PhysX
Physics Engine: PhysX
Physics Device: cuda:0
GPU Pipeline: enabled
/home/anaconda3/envs/parkour/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3526.)
return _VF.meshgrid(tensors, *kwargs) # type: ignore[attr-defined]
Total number of volume estimation points for each robot is: 2909
Traceback (most recent call last):
File "play.py", line 340, in
What is your pytorch version? Probably because line 698 in barrier_track.py. Maybe try forcing the data type on every possible values?
I meet this question too. It can be fixed by change your pytorch to version 1.10.0
Besides, mismatched versions of pytorch and cuda worked fine on my computer (pytorch 1.10.0 + cuda 11.7, RTX 3090)
I meet this question too. It can be fixed by change your pytorch to version 1.10.0
I got the same error, using pytorch 1.10.0 + cuda 11.3, RTX 4090, is there any fix?
i fixed it by adding .long() to the indices in this line, then it works with newer versions of pytorch
i fixed it by adding .long() to the indices in this line, then it works with newer versions of pytorch
Thanks! This worked for me too.
i fixed it by adding .long() to the indices in this line, then it works with newer versions of pytorch
Are you using a 4090 GPU? I tried pytorch2.1.0+cuda12.1, pytorch2.0.0+cuda11.8, and pytorch1.10.0+cuda11.3, and they all reported the same error! I'm not sure if my change to "torch.zeros_like(track_idx[0]).long()" on line 698 is correct or not.
i fixed it by adding .long() to the indices in this line, then it works with newer versions of pytorch
Based on your suggestion, I changed the .to(int) in line 737 to .long(), and added .long() after line 742 as well, and it then worked fine with the env of pytorch2.0.0+cuda11.8 on RTX4090.
change newer version of pytorch pytorch2.0.0+cuda11.8 and add .long()
Hi, thank you for your great job about parkour. I encountered some problems when I ran "barrier_track.py". "IndexError: tensors used as indices must be long, int, byte or bool tensors." What I need to do?