Autonomous Trajectory Planning by Convex Optimization