Confusion of use of gpu pipeline

What does it mean by using gpu_pipeline? After I set sim_params.use_gpu_pipeline to be true in terrain_creation example, it turn out to have such errors:

/buildAgent/work/99bede84aa0a52c2/source/physx/src/NpScene.cpp (4705) : invalid operation : PxScene::copyBodyData, data has to be valid pointer.

[Error] [carb.gym.plugin] Gym cuda error: an illegal memory access was encountered: …/…/…/source/plugins/carb/gym/impl/Gym/GymPhysX.cpp: 5754

In default, the terrain creation uses gpu but it seems it’s incompatible with gpu pipeline. Why is that?

Hi @kaiwen2

Using the GPU pipeline means that all the data from physics simulation stays on the GPU, and is converted into a PyTorch tensor for access within your RL observation and reward code. You can read more about it and the options in the programming/tensors.html documentation for the standalone Isaac Gym Preview.

If you’re seeing crashes with the terrain, it’s likely due to another problem - possibly running out of VRAM or similar. If you’re able to run other examples, low VRAM is your most likely culprit. You may be able to modify the example to use a less dense height field to compensate.

Take care,

1 Like

I also had same error, this error is happening because we need to add one more line in the code when using gpu_pipeline. Add gym.prepare_sim(sim) after creation of env, loading of assests and creation of viewer i.e. add this line before simulation loop starts.

Here gym comes from this line of code gym = gymapi.acquire_gym()

Adding this line initialize the internal data structures used by the tensor API. Check programming/tensors.html as mentioned in the reply, I got it from there.