I'm sorry for triple-posting but it seems that the problem is the battery. When the vehicle is connected to my pc it works fine but when the battery comes in it crashes.
I use a single 9V battery, is that not enough? From the arduino 5V pin I power one ultrasonic sensor (hc-sr04), the IR receiver and a couple of leds.
Also, sometimes after a while the L led on the arduino stops blinking and that's when the vehicle goes out of control...