This paper presents experimental results of a two-wheeled inverted pendulum path planning. The model of the robot, which has six identified variables, is linearized by least squares estimation. A Linear-quadratic Regulator is designed to maintain the robot stabilized, while it moves over a path. Furthermore, an integral part is added to the controller in order to achieve steady state equal to zero. Thus the result is an optimal PI controller. The path planning is designed using a Rapidly Exploring Random Tree Connect method. In addition, two algorithms are presented to improve the quality of the path, the first algorithm reduces the redundant paths and the second algorithm uses the Bezier curves to smooth the path.