From what I could find on Google
A cam sensor tells the computer when number one compression stroke is happening, the crank sensor tell the computer when to fire the sparkplugs.
A faulty coil pack can cause rough idle among other things, I would suggest that if after replacing the sensor / sensors if the problem remains it would probably be worth checking