Real-Time Planning And Nonlinear Control For Robust Quadrupedal Locomotion With Tails