If you know about the "boolprop testingcheatsenabled" code, you can also hold shift and click on the stuck sim, select the Force Error option and then choose Reset.
Sometime's my sims will get stuck at tables if the dining chairs happen to move wrong; I just reset them like that and they'll pop up beside the table and the problem's fixed.

It also comes in handy if a sim's face gets stuck in a perpetual scream or grimace. lol
