-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Question is very similar to #2524 in my case I have a manager based RL environment and I am not deleting/adding any objects on reset, but rescaling some of the meshes I already have. As per the discussion in the linked issue, the solution seems to be using the Isaacsim core World api to start and stop simulation before rescaling the meshes.
[Error] [omni.physx.tensors.plugin] Simulation view object is invalidated and cannot be used again to call setDofActuationForces
I was getting a similar error as mentioned above when I tried to rescale without using world start and stop. After adding the below lines in my events function, I am not getting any errors but the training does not begin. I am using skrl to train and made some custom changes to the reach environment provided.
world = World(env.sim)
if(env.sim.is_playing()):
world.stop()
*** Some processing to modify scale of certain prims in the scene ***
world.start()
As of now, these are the options I am aware of as a workaround
- Use deformable objects if the rescaling is for primitive meshes like cylinder, cuboid (Found this in a forum discussion, but I haven't figured out how to do this)
- Spawn the same meshes at multiple scales before the training begins and just use the desired scale one and set the positions of remaining meshes to be some random pose which is out of the desired space. (This has serious limitations for my current use case because of resolution I want the scaling in)
It would be very helpful if you could provide an example of how to use the world api to do this or suggest any better alternative methods. Thanks!