If you went to engineering school, which I’d guess at least some readers here have, you may have seen a problem or even implemented a real-world solution to control an inverted pendulum. Unlike a normal pendulum, where most of the mass is below the pivot point, inverted pendulums keep the mass vertical by applying a control scheme based on motion equations described here.
It’s the same principle that keeps Hoverboards and Segways vertical, and isn’t trivial to implement. On the other hand, with the correct components available, it shouldn’t be that hard. This is shown in the excellent writeup found here, and in the corresponding video below:
Though you can see how it can be built, there are quite a few components to be sourced, a body that needs to be cut out, and quite a bit of soldering to be done. Another simpler option is outlined in this article, and can be seen on display in the video below. Though easier to build, it features DC motors instead of the steppers used in the first example, making the control less precise.
Bots like these would be much simpler to implement with a proper PCB and all the parts available in one place. As far as I know, this style robot isn’t available on Tindie, as a kit or otherwise, presenting what seems like a great opportunity. For that matter, I’d find an inverted pendulum on a fixed axis pretty interesting, so that could be a simpler related build.