RRT-based trajectory design for autonomous automobiles and spacecraft