If your car is idling rough then your EGR valve is most likely failing. A rough idling car engine is the most common symptom letting you know your EGR valve is failing.
An EGR valve is an Exhaust Gas recirculation device.
The EGR usually becomes stuck open allowing the Exhaust gas to recirculate causing the rough idle.