A tiny robot, no bigger than a hockey puck, danced across Paul Glotfelter’s desk as he worked at his computer. Last he checked, it had been standing still, next to his keyboard. Now it spun in circles.

“This is weird,” Mr. Glotfelter, a robotics Ph.D. candidate, recalls thinking, worried he might have damaged it somehow. But then he shrugged, placed it on its back, wheels up, and returned to work.

So...