[Question] particle render issue, when using device as cpu in simulation
Question
After updating to the latest version, simulating with the CPU no longer renders particles.
Previously, if I set the SimulationCfg of EnvCfg as below and ran it, the particles were simulated as shown in the video below. However, after updating to the latest version of Isaac lab 2.0 and Isaac sim 4.5, the particles are not rendered even if I do this. (My previous version was Isaac lab 1.1, Isaac sim 4.1)
sim_cfg = sim_utils.SimulationCfg(dt=0.01, use_fabric=False, device='cpu')
https://github.com/user-attachments/assets/8789d120-e53f-45d8-8560-613089cbc9f1
I would like to know where this happened and how to make the particle move when I run the simulation in ISAAC LAB.
For your reference, when I originally set the device in the SimulationCfg to cuda, the particle does not seem to move to the initially created position as shown in the video below, but it is actually simulated. https://github.com/user-attachments/assets/c6f3dc00-e1fd-4e28-ba8d-4020e4ad984f
Thank you for posting this question. We are taking a closer look into this to define what exactly is the issue.
I'm also having the same issue!
Following up, is there any code you could share so we could reproduce this issue? Thanks
My problem can simply be reproduced by proceeding to the next two steps.
- Create particles using particle sampler in IsaacSim -> save as
water.usdfile - in IsaacLab, import to below code
water = sim_utils.UsdFileCfg(usd_path=f"mypath/water.usd")
water.func("/World/envs/env_0/water", water, translation=(0.0, 0.0, 0.0))
This is what I created particles in IsaacSim.
@RandomOakForest
I think this is because physx only manages the calculated results internally and doesn't communicate them externally. I understood that for Rigid Objects and Articulation characters, there is a physx View API, so the information is communicated with physx during execution, so it is possible to get the state of the simulation every step and render it.
However, in the case of particles, there is no such physx View API, so only the initial state is rendered, and even if information is obtained (I believe using the UsdGeom.Points(particle Prim).GetPointsAttr().Get() function), only the initial state is obtained. Therefore, it seems that particles are only rendered in their initial state, even though they interact with other objects (such as rigid objects) inside physx and the effects of particles are represented on other objects.
Is my understanding correct?
I want to see the results of my learning in Isaac Lab simulating with the particle movement, so I would like to somehow get the particles to render in real time, even if it is slow. Since Isaac Sim is able to render real-time movement of particles, what settings can I use to enable particle rendering in Isaac Lab?
Also, as I asked above, in previous versions, particles were rendered in real-time when simulating with CPU, but I'm wondering if something has changed in the latest version that makes it not work anymore.
Also, I see that Isaac Sim 5.0 is coming out, and I would like to know if this issue can be fixed in Isaac Lab compatible with that version or if there are any plans to address this issue.
Thank you.
Hi, @NAMHAUK
Do you know if the recent updates have fixed the issue? Or is it still impossible to render particles?
Hi, @robegi I don't know about that issue yet. I'm waiting for a response. Isaac Sim supports real-time particle rendering, so I'm currently trying to figure out how to use Isaac Sim. Do you know of any other ways to do real-time particle rendering?
@NAMHAUK the only way I knew was by using the cpu in previous versions, but since I was about to update both Isaac Sim and Isaac Lab I was wondering if this issue had been addressed in the update. Thanks anyway.
Hi @NAMHAUK
just wanted to report that the old method (issue https://github.com/isaac-sim/IsaacLab/issues/428) that I am testing on the latest versions of IsaacLab and Isaac Sim is still working. Don't know if you have noticed it, but I just wanted to report it.
Unfortunately the only way I found is still by using the CPU pipeline, and another solution does not seem to be available at the moment (this seems to confirm that).
Did you find a way to make it more efficient?
Hi @robegi
Does this mean that in the latest version (Isaac Sim 5.0 and the main branch of Isaac Lab), running simulations on the CPU can again render particles, just like in previous versions (as shown in the code below)?
sim_cfg = sim_utils.SimulationCfg(dt=0.01, use_fabric=False, device='cpu')
Since I only need the resulting video, running on the CPU should be sufficient for me. Thank you!
From what I’ve searched, I understand that real-time particle behavior (including rendering) on the GPU isn’t possible unless NVIDIA provides a View API that can read particle information from PhysX.
@NAMHAUK yes, as far as I can tell. It is working or me. Also, remember to add these two lines when setting the scene up:
physx_interface = acquire_physx_interface()
physx_interface.overwrite_gpu_setting(1)
If you did not previously do it, this is most likely the cause of your issues, so try and use these even in your current version. I believe that it is a persistent setting, so even if you delete these two line the gpu setting will still be overwritten if you executed just it once.
Yes I saw that the view API is missing for the particles. This is absurd since the internal buffers must have the particle's positions somewhere, but they are not accessible. Hope they fix it someday.
Once this issue is resolved, it will open up so many more possibilities. I really hope it gets fixed soon.
Anyway, thanks for sharing this information! @robegi