Understanding IsaacSimTeleportPrim and IsaacSimSpawnPrim

IsaacSimTeleportPrim and IsaacSimSpawnPrim say they use “dynamic_control to properly handle physics objects and articulation.”

What precisely does this mean? How is this utility better than setting the position & rotation on an existing prim using prim.set_world_pos(…) , or creating a new prim using scene.add.(…)?

The IsaacSimTeleportPrim and IsaacSimSpawnPrim functions are designed to handle the teleportation and spawning of physics objects and articulations in a way that is safe and consistent with the physics simulation.

When you use prim.set_world_pos(...), you are directly setting the position of a prim in the world. However, this does not take into account the physics simulation. For example, if you teleport a physics object into a wall, it may cause unexpected behavior because the physics simulation was not aware of the teleportation.

On the other hand, IsaacSimTeleportPrim and IsaacSimSpawnPrim are designed to handle these situations correctly. They will ensure that the physics simulation is updated to reflect the new position or existence of the physics object or articulation. This can prevent issues such as objects being teleported into walls or other objects.

In addition, IsaacSimSpawnPrim can handle the creation of new prims in a way that is consistent with the physics simulation. When you use scene.add(...), you are directly adding a new prim to the scene. However, this does not take into account the physics simulation. For example, if you add a new physics object into a wall, it may cause unexpected behavior because the physics simulation was not aware of the new object.

In summary, IsaacSimTeleportPrim and IsaacSimSpawnPrim are utilities that handle the teleportation and spawning of physics objects and articulations in a way that is safe and consistent with the physics simulation. They are better than setting the position & rotation on an existing prim using prim.set_world_pos(...), or creating a new prim using scene.add(...) because they prevent issues that can arise when the physics simulation is not aware of changes to the scene.