An Exact Optimal Kinodynamic Planner Based on Homotopy Class Constraints