Isaac Sim 4.2.0: Access to Particle Set

Isaac Sim Version

4.2.0

Operating System

Ubuntu 22.04

GPU Information

  • Model: RTX4090
  • Driver Version:

Topic Description

Detailed Description

Does there is a way on the Isaac Sim API to have access to a particle set (Point type) to modify the position of the whole set on the go?

Hi @bechir.tabia ,

You can update the particle positions in a particle set through USD:
In Python something like this:

import carb.events
import omni.kit.app
from pxr import Usd, UsdGeom, Gf
import omni.usd

update_stream = omni.kit.app.get_app().get_update_event_stream()
sum_dt = 0.0
moved = False

def on_update(e: carb.events.IEvent):
	global sum_dt
	global moved
	dt = e.payload['dt']
	
	if sum_dt > 2.0 and not moved:
		stage = omni.usd.get_context().get_stage()
		prim = stage.GetPrimAtPath("/World/ParticleSet")
		points_attr = UsdGeom.Points(prim).GetPointsAttr()
		points = points_attr.Get()
		for i in range(len(points)):
			points[i] = points[i] + Gf.Vec3f(0.0, 0.0, 1.0)
		points_attr.Set(points)
		moved = True
	
	sum_dt = sum_dt + dt

sub = update_stream.create_subscription_to_pop(on_update, name="My Subscription Name")

Thanks for the tips!

Another question, does Isaac Lab can run particle simulation (without prim access of course).

When I import my scene to Isaac Lab, it seems that the particle simulation does not work even though the system is supposed to run on the GPU.

You can find below my environment usd that I included in Isaac Lab and screenshot showing the non-simulation of particles

Note: For any Isaac Lab topics, please submit your topic to its GitHub repo (GitHub - isaac-sim/IsaacLab: Unified framework for robot learning built on NVIDIA Isaac Sim) following the instructions provided on Isaac Lab’s Contributing Guidelines (Contribution Guidelines — Isaac Lab Documentation).

Hiya bechir.tabia!

The particle simulation for your stage appears to be working fine in Isaac Sim. Can you please provide a test script that demonstrates the issue in Isaac Lab? It may come down to how you are loading the assets in lab and I want to make sure we aren’t missing something.

Thanks!
Gus

Hello and Thanks for replying to my message.

Yes, my scene works fine in Isaac Sim and I can run a RL training in Isaac Sim using the following dirty trick:

  • backend set to numpy
  • device set to “cuda:0”
  • set defaults set to “False”

However, this solution can become very slow if you use multiple camera as the transfer of memory to cpu takes a lot of memory and cpu time. Also not mentioning that in Isaac Sim, cameras and articulations can’t work with the backend set to torch as their interface are only set to numpy.

So I decided to move to Isaac Lab but I was expecting that using the torch backend would work but it seems that it does not. Shall I deactivate Fabric or use the cpu device to get the particle set rendered and simulated?

Many Thanks

What would really help us is a testable script! It sounds like things aren’t working as expected, but we can’t help you without additional details on what you’re doing and how in Isaac Lab :)