Real-time Trajectory Optimization and Control for Ball Bumping with Quadruped Robots