Balancing the Inverted pendulum with LQR

Keywords: #ros2 #kiwi #lqr #inverted pendulum
I’m back, and as promised we’re now doing a dive on LQR. I had to do a ton of scope adjustments for this post, as it was difficult trying to estimate what the “stopping point” should be. The initial vision for this segment also included an introduction to Control Barrier functions, Control-Lyapunov to be specific. However this would have required a primer on not only stability, but also on convergence and initial guesses.

Balancing the Inverted pendulum

Keywords: #ros2 #kiwi #gazebo #docker #pid #inverted pendulum
I have (finally) gotten around to getting KIWI to balance in simulation. All in took me about an hour to write up the pid_controller and get it to stay upright. A little longer to nail down twist tracking via a /cmd_vel command. The core logic is remarkably simple, and I think serves as a great showcase of the “power of PID”. In the same way I think that people tend to overlook linear regression for their solutions as it’s not shiny enough, I really think people under-estimate how far a well-tuned PID can get you.