A Differential Flatness-based Trajectory Planner for Endpoint Control