Checking for codes is always a good start, since it will give you an idea.
The rough idle can be caused by several things. May need some more info, including:
- Does it run fine, so no backfiring/stalling whilst driving?
- how long does it take for the rough idle to settle?
- when was last tune up done?
Rough idle on startup is not related to your battery. A possible cause could be fuel 'leaking' from the injectors. With this , the rough idle is caused by the engine getting rid of the extra fuel and should usually settle when thats done, 1-2 minutes.