Ballbot balancing ... kinda!

Merry Christmas everyone!

The robot should ideally move back to its original position as fast as possible. It still needs lots of tuning, and I may need to slow down the frequency of the system, since it can be a bit jerky. The robot performs much better on softer surfaces like carpet compared to hard surfaces like tiles.

Currently two PID control loops with only the proportional term enabled are being used. The first loop is for correcting roll/pitch whilst the second loop is for setting the target roll/pitch based on the location of the robot.

The location of the robot is determined using data from the encoders of the motors and some linear algebra (see previous post).