Motion Planning and Safety for Autonomous Driving