In this paper, we propose a nonlinear control strategy for swinging up a pendulum to its upright equilibrium position by shaping its swinging energy along with regulating the cart to a desired location. While the base of a usual cart-pole system is restricted to move in a straight line, the present system is allowed to move in the x-y plane with a nonholonomic consraint that its allowable velocity is only along its orientation. A simple time invariant control law has been presented and its effectiveness has been demonstrated using numerical experiments.