Combining Sampling and Optimizing for Robotic Path Planning