In the past few years, we have covered plenty of self balancing robot here. Researchers are always working on perfecting algorithms for them. This upper body vertical control framework enables robot to keep moving in the right direction when given a nudge. It also enables them to walk on slopes.
The above video from DrGuero2001 shows how a bipedal robot can be enhanced to walk naturally with this approach.