On the Simulation of Perception Errors in Autonomous Vehicles