I wanted to do something like this: simulate the stack box scenario, determine that the simulation is stable, and record the position and pose of the box.
Here's how I think about it: there is a plane in the scene, there are some boxes above the plane, add rigid body properties to these objects, turn on the animation, and then check whether the scene has stationary or not for each frame. If it is stationary, judge the end of simulation, and then record the position and pose.
My question is: how do you tell if everything in the scene is stationary? I need to do this in a python script.