Motion Planning To Avoid Obstacles With Hybrid Dynamics