Hi, a simple rig that does a rolling cube. It uses one copylocation constraint and 2 drivers ( using a scripted expression ), with a simple heirarchy . . .
I also provided a GN solution to this last year if you want to get / look at that . . .
though it’s considerably more complex.
File for the above animation . . .
Roll_Cube_01.blend (111.4 KB)
Cheers,
Dj.