I get this error while adding a new dynamic cube to the scene. I have no idea why I get this error. FYI this only happens when the PhysX device is cuda. I dont get this error with cpu. I am using latest IsaacSim 2022.2.1
For context, I am trying to remove an existing cube and add a new cube with the same prim path. I remove it with the scene.remove_object(object_name) function and I also delete the object instance for completeness. When I try to add a new cube with the same prim_path and same object_name I get this error. The weird thing is that I get this error only with the GPU backend device. I am using RTX3090 on a desktop computer with i9 13 gen processor.
The problem is that after populating the new objects, they are unstable when I step the physics. These objects just fly around like being pushed by some force. It only happens after I delete the previous cube instance and respawn new cubes at the same location. The initial instances of those cubes do not flay around and they behave normally.
Thanks for your help.
this error should be harmless, it failed to create some attribute in Flatcache, but this particular attribute is not used.
Based on what you are describing, it looks like some physics remained in place of the original cube. It looks like some stuff was not removed properly from Flatcache, but maybe even physics? Without a repro hard to tell, you can enable physics debug visualization to see what is in physics (Windows->Physics/Simulation->Debug, physx debug visualization).
Thanks @AlesBorovicka for the quick response.
I tried to debug the issue and found that the robot arm configuration after the world reset changes and one of the child prims of the arm remains in collision with the cube at the start of the simulation. but this happens after first reset. My robot is an imported urdf and the default joint position are specified in it. I dont see the problem in the very first import where the joint positions are same as default values in urdf. The problem starts after first reset.
The problem only occurs for cuda device and that is what confuses me. The same program works without any issue when device is set to cpu. Is there a way to assert and set default joint state after world reset?
Thanks for your help
Can you please double check that physics setting Reset Simulation on Stop is set to true (Edit->Preferences)?
Just curious what is not resetting right, is it the arm or the cube? If its the cube, is the cube created before simulation starts or during simulation? Also is the cube a dynamic body or kinematic body? Kinematic bodies are not reset by physics since physics is not the one moving the kinematic bodies.
Reset simulation on stop is checked. The arm is not resetting right. Actually after every reset a new arm is spawned at the same location with the same prim path after removing the old arm. My experiments require generating robotic arms on fly so every arm is different.
The robotic arm and obstacles are removed from the stage and re-created within the “cleanup” function of a Task. So according to the control flow for tasks the objects are created before reset. The cube is dynamic.
I see, so there is more to that then just play and stop. Please would you be able to send me the repro through a PM. I can take a look and try to fix it or ask IsaacSim team to fix it if its more related to IsaacSim.
Sorry about the trouble,