Security Of Autonomous Systems Under Physical Attacks: With Application To Self-Driving Cars