I am currently writing an extension, that assembles a robot (robot + gripper + gripper fingers etc.) based on a configuration file.
The objects are defined as Xform Prims and are oriented and positioned using the following functions:
obj = world.scene.add(XFormPrim(scene_path, name = object_name))
I then connect the appropriate objects using fixed joints (not the objects directly, but the apropriate prims of the objects, for example the tool0 xform of the UR robot, with the main body of the gripper):
But when the robot is loaded, the object orientations and positions initially do not match with the orientations and positions, specified in the code (although they still match directly after creating the joints). When I then start the simulation and stop it, the objects snap back to the positions and orientations specified in the code. When I then run the simulation, the objects change again. You can see the described behavior in this video:
The fixed joint is completely inactive while the timeline is stopped. You can move around the attached bodies relative to each other, and there will be no problem. Then when you click PLAY, the bodies will snap back together to satisfy the constraint.
The behavior of pressing STOP is for the asset to go back to the position that is written into its USD file (the position it would be loaded with). You tried to override the default position to be something else with obj.set_default_state() . That default state you are setting is only going to be used if you use world.reset() to control the timeline . It won’t be used if the STOP button is pressed.
If this is in an extension workflow, you can add a callback function for if the STOP timeline event happens and set the pose there.