Discrete States-Based Trajectory Planning for Nonholonomic Robots