Abstract— We study optimal trajectory generation for nonholonomic mobile robots in the presence of moving obstacles. The trajectory is presented by a parameterized higher-order polynomial and is feasible for car-like robots whose motion is nonholonomic. An optimal performance index is set up so that the parameterized trajectory stays close to the shortest straight-line path. Combining with the collision avoidance criterion, optimal collision-free trajectory can be generated real time as the solution is expressed in its closed-form. We show Matlab simulation results to demonstrate the performance of the trajectories.